Register / Sign in
→ Browse Tracks
→ Choose a Track and Enroll
→ Open the first Module
→ Study ordered Lessons and their sources
→ Submit answers for the Module exam (server grades)
→ Solve practice problems (Codeforces API verification / GitHub tasks)
→ Record score, exam pass, and problem completion states
→ Unlock only the next Module when BOTH exam and required problems are passed
→ Review progress
→ Deliver Track Capstone project
This is the target MVP flow, not a claim that every step currently works. Authentication, most HTTP endpoints, the shared progression gate and problem-side unlock trigger, practice problem verification, and capstone milestone verification are not implemented yet. User/password persistence, the entity and configuration layers, Track/Module/Lesson read services, server-side exam grading, the exam-side unlock, and Track enrollment are implemented.
HTTP request
→ API Controller
→ Application service interface (Abstraction)
→ Application service implementation (Concrete, via IUnitOfWork)
→ Domain repository interface / UnitOfWork
→ Infrastructure repository
→ AppDbContext
→ SQLite database
- API binds HTTP input and returns HTTP responses. It should not contain business rules or access repositories directly.
- Application defines service contracts, implements all business logic / use cases, and owns DTOs. It receives explicit user IDs, not
HttpContextor JWT types, and accesses persistence only throughIUnitOfWork(never a DbContext abstraction). - Domain owns entities, business rules, repository contracts, and domain exceptions.
- Infrastructure implements repositories and owns EF Core persistence (
DbContext/,Configurations/,Repositories/). It contains no business logic.
GET /api/healthreturnshealthydirectly fromHealthController.GET /api/tracksis wired, callsITrackService.GetPagedAsync, and returns paged track summaries.POST /api/tracksbindsCreateTrackRequestand throwsNotImplementedException.ExamService.GetByIdAsyncloads an Exam throughIUnitOfWorkand throwsNotFoundExceptionwhen missing. Server-side grading is implemented inExamService.SubmitAsync.ExamsControllerendpoints remain placeholders.TrackEnrollmentService.EnrollAsyncvalidates and records track enrollment, creating the first module's progress row. The HTTP enrollment endpoint is not yet wired.UserProgressServicereads per-module and per-track progress. Controller actions currently return 501.Program.cscomposition root callsAddInfrastructure(builder.Configuration)andAddApplication(), registering SQLite, repositories, services, validators, and OpenAPI in development. Authentication and authorization middleware are not registered.
- The API authenticates the learner and passes the learner ID to the Application service.
ExamServiceloads the Exam and its questions through repository contracts.- The learner submits selected option IDs. The server compares them with the stored answer key; it does not trust a client-provided score.
- The service uses
Exam.HasPassed(score)and updatesUserProgress.ScoreandPassedExam = true. ModuleProblemServiceverifies external problem solves via Codeforces public API (user.status) orTaskVerificationServiceverifies GitHub tasks via GitHub REST API (workflow run success and test/workflow SHA integrity check), settingUserProgress.CompletedRequiredProblems = true.- Progression check runs inside the same
UnitOfWorktransaction after either event (exam submit or problem completion): when bothPassedExamandCompletedRequiredProblemsare satisfied, the service finds the next Module in the same Track by Order and unlocks that Module for this learner only. UnitOfWork.SaveChangesAsync()commits the result and progress changes together atomically.- The service returns results; the controller maps domain errors to HTTP responses through the registered middleware. Unique and foreign-key violations are translated into
ConflictException(409) byUnitOfWork.SaveChangesAsync. Field-keyed validation responses are produced byExceptionHandlingMiddleware(#321); domainValidationExceptionresponses keep the single-detailshape.
Question storage, answer submission, problem verification, enrollment initialization, and unlock behavior are still target design; they must not be described as existing functionality until implemented and tested.