How siva1632000/startgoals works
StartGoals is an Express/Sequelize backend for a learning platform. Users register or sign in, verify identity by OTP, then manage profiles and onboarding; course APIs support course setup and retrieval with nested sections, lessons, and resources. Separate documented-by-tree branches cover live sessions, homepage discovery, uploads, and reference catalogs. The sampled controllers show persistence and OTP delivery; many route/controller implementations were not sampled, so uncertain connections are omitted.
Main entry points: otpController.js OTP operations · sendOtp.js OTP delivery · user.js User records · db.js PostgreSQL
Components 28
API entry
- Express app
index.js - API router
routes/router.js - User routes
routes/userRoutes.js - OTP routes
routes/otpRoutes.js - Course routes
routes/courseRoutes.js - Section routes
routes/sectionRoutes.js
Identity
- Account operations
controller/userController.js - OTP operations
controller/otpController.js - Profile onboarding
controller/onboardingController.js - JWT authentication
middleware/authMiddleware.js - Token utility
utils/jwtToken.js - OTP delivery
utils/sendOtp.js
Learning catalog
- Course management
controller/courseController.js - Course structure
controller/sectionController.js - Catalog operations
controller - Homepage discovery
controller/homepageController.js
Learning delivery
- Live sessions
controller/liveSessionController.js - File uploads
controller/fileUploadController.js
Persistence and integrations
- User records
model/user.js - OTP records
model/otp.js - Course catalog models
model/course.js - Lesson and resource models
model/section.js - PostgreSQL
config/db.js
Other components
- API client
- Email service
- SMS service
- Video meeting services
- Object storage
Connections 33
- API client → Express app: sends requests
index.js - Express app → API router: mounts routes
index.js - API router → User routes: registers routes
- API router → OTP routes: registers routes
- User routes → Account operations: dispatches
routes/userRoutes.js - OTP routes → OTP operations: dispatches
routes/otpRoutes.js - Account operations → User records: reads and writes
controller/userController.js - Account operations → OTP delivery: requests OTP
controller/userController.js - Account operations → Token utility: creates token
controller/userController.js - OTP operations → OTP delivery: verifies and sends
controller/otpController.js - OTP operations → OTP records: updates records
controller/otpController.js - OTP operations → User records: updates account
controller/otpController.js - OTP operations → Token utility: creates token
controller/otpController.js - OTP delivery → OTP records: stores OTPs
utils/sendOtp.js - OTP delivery → Email service: sends email
utils/sendOtp.js - OTP delivery → SMS service: sends SMS
utils/sendOtp.js - JWT authentication → User records: loads user
middleware/authMiddleware.js - Profile onboarding → User records: updates profile
controller/onboardingController.js - Profile onboarding → Catalog operations: uses profile catalogs
- Course routes → Course management: dispatches
- Section routes → Course structure: dispatches
routes/sectionRoutes.js - Course management → Course catalog models: reads and writes
controller/courseController.js - Course management → Lesson and resource models: loads course structure
controller/courseController.js - Course structure → Course catalog models: checks course
controller/sectionController.js - Course structure → Lesson and resource models: creates and reads
controller/sectionController.js - Homepage discovery → Course catalog models: queries discovery data
controller/homepageController.js - Live sessions → Video meeting services: configures meeting services
- File uploads → Object storage: stores uploaded files
- Course catalog models → PostgreSQL: uses Sequelize
model/course.js - Lesson and resource models → PostgreSQL: uses Sequelize
model/section.js - User records → PostgreSQL: uses Sequelize
model/user.js - OTP records → PostgreSQL: uses Sequelize
model/otp.js - Express app → PostgreSQL: connects database
index.js