How harshgupta2902/dev-o-lingo-api works
Dev-O-Lingo is a language-learning app API. Learners authenticate and set onboarding preferences, retrieve lessons, submit answers, and receive progression rewards; separate API branches support daily practice, social activity, purchases, and engagement. Express mounts the API routes, which dispatch feature controllers; controllers use Prisma for application state. The README documents additional feature areas and scheduled notifications, but excerpts do not show every route-to-controller call, so those detailed links are omitted.
Main entry points: prismaClient.js Prisma client · language.controller.js Lessons · routes.js Route mount · auth.controller.js Authentication
Components 24
API runtime
- Express app
src/app.js - Route mount
src/routes/routes.js - Authentication
src/controller/auth.controller.js - Auth routes
src/routes/auth.routes.js - JWT middleware
src/middleware.js
Learning progression
- Lessons
src/controller/language.controller.js - Lesson routes
src/routes/language.routes.js - Stats and refill
src/controller/progress.controller.js - Daily practice
src/controller/dailyPractice.controller.js - Practice routes
src/routes/dailyPractice.routes.js - Leaderboard
src/controller/leaderboard.controller.js - Achievements
src/controller/achievement.controller.js
Engagement features
- Social features
src/controller/social.controller.js - Shop and IAP
src/controller/shop.controller.js - Ad rewards
src/controller/ads.controller.js - Notifications
src/controller/notification.controller.js - Scheduled reminders
src/jobs - Push helpers
src/services
Persistence and integrations
- Prisma client
src/prismaClient.js - Application data
prisma/schema.prisma
Other components
- Learner
- MySQL
- Firebase services
- Google Play
Connections 27
- Learner → Express app: sends requests
- Express app → Route mount: mounts API
- Route mount → Auth routes: mounts routes
- Route mount → Lesson routes: mounts routes
- Route mount → Practice routes: mounts routes
- Auth routes → Authentication: dispatches
- Auth routes → JWT middleware: protects routes
- Practice routes → JWT middleware: protects routes
- Practice routes → Daily practice: dispatches
- Lesson routes → Lessons: dispatches
- Lessons → Stats and refill: ensures user state
- Lessons → Leaderboard: updates rankings
- Lessons → Achievements: checks unlocks
- Daily practice → Leaderboard: updates rankings
- Authentication → Achievements: checks unlocks
- Authentication → Firebase services: verifies sign-in
- Shop and IAP → Google Play: verifies purchase
- Scheduled reminders → Push helpers: uses push helpers
- Push helpers → Firebase services: sends push
- Express app → Scheduled reminders: registers scheduler
- Authentication → Prisma client: reads and writes
- Lessons → Prisma client: reads and writes
- Stats and refill → Prisma client: reads and writes
- Daily practice → Prisma client: reads and writes
- Shop and IAP → Prisma client: reads and writes
- Prisma client → Application data: uses models
- Prisma client → MySQL: persists data