How abdulloh-dev03/ai-teach-atelier works
AI Teach Atelier combines coding practice, AI assistance, and judged execution. The main flow is sign-in, generate or browse a challenge, edit and run or submit code, then review stored results; persistent chat and image-assisted prompts form a parallel learning branch. The graph includes the documented frontend/API and backend layers, plus execution and AI internals visible in excerpts. Some service and controller links rely on README descriptions rather than sampled calls, so unsampled details are not expanded.
Main entry points: app.ts Express app · api.ts API state layer · problem.service.ts Problem lifecycle · executionRouter.ts Execution router
Components 24
Learning interface
- Learning pages
frontend/src/app/(protected) - Coding workspace
frontend/src/app/(protected)/problems/[id]/page.tsx - Chat interface
frontend/src/components/chat - Sign-in forms
frontend/src/app/(auth) - API state layer
frontend/src/store/api.ts
Backend API
- Express app
backend/src/app.ts - Auth routes
backend/src/routes/auth.route.ts - Problem routes
backend/src/routes/problem.route.ts - Chat routes
backend/src/routes/chat.routes.ts - Run routes
backend/src/routes/executeRoutes.ts
Learning services
- Authentication
backend/src/services/auth.service.ts - Problem lifecycle
backend/src/services/problem.service.ts - AI generation
backend/src/services/ai.service.ts - Chat service
backend/src/services/chat.service.ts
Code execution
- Code wrapper
backend/src/services/WrapperService.ts - Execution router
backend/src/services/executionRouter.ts - Submission judging
backend/src/services/judgeService.ts
Persistent state and media
- PostgreSQL data
backend/src/lib/prisma.ts - Image and avatar uploads
backend/src/utils/cloudinary.ts
Other components
- Learner
- Hugging Face
- Judge0
- Node runtime
- Cloudinary service
Connections 29
- Learner → Sign-in forms: signs in
README.md - Learner → Learning pages: browses challenges
README.md - Learning pages → API state layer: requests data
README.md - Coding workspace → API state layer: runs or submits
README.md - Chat interface → API state layer: sends prompts
README.md - Sign-in forms → API state layer: authenticates
- API state layer → Express app: calls API
README.md - Express app → Auth routes: mounts routes
backend/src/app.ts - Express app → Problem routes: mounts routes
backend/src/app.ts - Express app → Chat routes: mounts routes
backend/src/app.ts - Express app → Run routes: mounts routes
backend/src/app.ts - Chat routes → Chat service: dispatches to
backend/src/routes/chat.routes.ts - Auth routes → Authentication: handles auth
README.md - Problem routes → Problem lifecycle: handles problems
README.md - Problem lifecycle → AI generation: generates challenge
README.md - AI generation → Hugging Face: requests generation
backend/src/services/ai.service.ts - Chat service → Hugging Face: requests AI chat
README.md - Problem lifecycle → PostgreSQL data: stores challenges
README.md - Chat service → PostgreSQL data: persists sessions
README.md - Authentication → PostgreSQL data: reads and writes users
backend/src/services/auth.service.ts - Coding workspace → Code wrapper: prepares solution
README.md - Code wrapper → Execution router: wraps code for
backend/src/services/ai.service.ts - Execution router → Node runtime: executes JS and TS
backend/src/services/executionRouter.ts - Execution router → Judge0: dispatches Python
backend/src/services/executionRouter.ts - Submission judging → Execution router: runs test code
README.md - Problem lifecycle → Submission judging: submits solutions
README.md - Submission judging → PostgreSQL data: stores verdicts
README.md - Coding workspace → Cloudinary service: uploads images
README.md - Cloudinary service → Image and avatar uploads: uses integration
README.md