How codebyartem/english-api works
The README describes a NestJS starter rather than documenting a product workflow. The sampled runtime code supports an API for registration/login and learning content, plus assignment submission, automatic scoring, and staff review. PostgreSQL is configured through TypeORM. Edges reflect shown controller/service calls, indexed module wiring, or entity relationships; unsampled behavior is not inferred.
Main entry points: lesson.entity.ts Lesson · app.module.ts Nest application · seed.service.ts Content seeding · unit.entity.ts Unit
Components 21
API entry points
- Nest application
src/app.module.ts - Auth endpoints
src/auth/auth.controller.ts - Content endpoints
src/content/content.controller.ts - Assignment endpoints
src/assignments/assignments.controller.ts - Submission endpoints
src/assignments/submissions.controller.ts
Identity and users
- Authentication
src/auth/auth.service.ts - User management
src/users/users.service.ts - User account
src/users/user.entity.ts - User roles
src/common/role.enum.ts
Learning content
- Content access
src/content/content.service.ts - Content seeding
src/content/seed.service.ts - Textbook
src/content/entities/textbook.entity.ts - Unit
src/content/entities/unit.entity.ts - Lesson
src/content/entities/lesson.entity.ts - Exercise
src/content/entities/exercise.entity.ts - Material
src/content/entities/material.entity.ts
Assignments
- Assignment workflow
src/assignments/assignments.service.ts - Assignment record
src/assignments/entities/assignment.entity.ts - Submission record
src/assignments/entities/submission.entity.ts
Persistence
- PostgreSQL
Other components
- API client
Connections 33
- API client → Auth endpoints: requests
src/auth/auth.controller.ts - API client → Content endpoints: requests
src/content/content.controller.ts - API client → Assignment endpoints: requests
src/assignments/assignments.controller.ts - API client → Submission endpoints: requests
src/assignments/submissions.controller.ts - Auth endpoints → Authentication: delegates
src/auth/auth.controller.ts - Authentication → User management: looks up users
src/auth/auth.service.ts - User management → User account: creates and finds
src/users/users.service.ts - User account → User roles: uses role
src/users/user.entity.ts - Content endpoints → Content access: delegates
src/content/content.controller.ts - Nest application → Auth endpoints: registers module
src/app.module.ts - Nest application → Content endpoints: registers module
src/app.module.ts - Nest application → Assignment endpoints: registers module
src/app.module.ts - Nest application → Submission endpoints: registers module
src/app.module.ts - Assignment endpoints → Assignment workflow: delegates
src/assignments/assignments.controller.ts - Submission endpoints → Assignment workflow: delegates
src/assignments/submissions.controller.ts - Assignment workflow → Lesson: loads lesson exercises
src/assignments/assignments.service.ts - Textbook → Unit: has units
src/content/entities/textbook.entity.ts - Unit → Lesson: has lessons
src/content/entities/unit.entity.ts - Unit → Material: has materials
src/content/entities/unit.entity.ts - Lesson → Exercise: has exercises
src/content/entities/lesson.entity.ts - Assignment record → Lesson: references lesson
src/assignments/entities/assignment.entity.ts - Submission record → Assignment record: may reference
src/assignments/entities/submission.entity.ts - Submission record → Lesson: references lesson
src/assignments/entities/submission.entity.ts - Submission record → User account: belongs to student
src/assignments/entities/submission.entity.ts - Nest application → PostgreSQL: configures TypeORM
src/app.module.ts - User management → PostgreSQL: queries and saves
src/users/users.service.ts - Assignment workflow → PostgreSQL: queries and saves
src/assignments/assignments.service.ts - Content access → PostgreSQL: uses repositories
src/content/content.service.ts - Content seeding → Textbook: populates content
src/content/seed.service.ts - Content seeding → Unit: populates content
src/content/seed.service.ts - Content seeding → Lesson: populates content
src/content/seed.service.ts - Content seeding → Exercise: populates content
src/content/seed.service.ts - Content seeding → Material: populates content
src/content/seed.service.ts