How shehzadvx/capacity-connect works
Capacity Connect is a role-based learning and training platform. Trainees discover approved courses, enroll, complete lessons and quizzes, then earn certificates, credits, skills and rewards; trainers create courses and monitor learner outcomes, while admins approve trainers/courses and review platform analytics. The React client provides role-aware screens and authentication state; the Express API dispatches domain routes to MongoDB-backed models. The sampled code confirms enrollment completion and quiz award flows; other capability links reflect the route inventory, not inspected route implementations.
Main entry points: App.jsx Role-based app · server.js API server · quizRoutes.js Quiz and certification · adminRoutes.js Approval and analytics
Components 26
React client
- Role-based app
SIH hackathon/App.jsx - Auth and app state
SIH hackathon/AppContext.jsx - Admin console
SIH hackathon/AdminDashboard.jsx
Course learning
- Course screens
SIH hackathon/CourseListing.jsx - Learning and quiz
SIH hackathon/LearningPage.jsx - Course authoring
SIH hackathon/CreateCourse.jsx
Rewards and insights
- Learner rewards
SIH hackathon/Rewards.jsx - Analytics screens
SIH hackathon/AdminAnalytics.jsx
API services
- API server
backend/server.js - Authentication
backend/routes/authRoutes.js - Course management
backend/routes/courseRoutes.js - Enrollment progress
backend/routes/enrollmentRoutes.js - Quiz and certification
backend/routes/quizRoutes.js - Approval and analytics
backend/routes/adminRoutes.js - Rewards and community
backend/routes - Role authorization
backend/middleware/auth.js
MongoDB data
- User records
backend/models/User.js - Course records
backend/models/Course.js - Enrollment records
backend/models/Enrollment.js - Quiz attempts
backend/models/QuizAttempt.js - Certificates
backend/models/Certificate.js - Credit transactions
backend/models/CreditTransaction.js
Other components
- Trainee
- Trainer
- Admin
- MongoDB
backend/config/db.js
Connections 38
- Trainee → Role-based app: uses
- Trainer → Role-based app: uses
- Admin → Role-based app: uses
- Role-based app → Auth and app state: provides state
- Role-based app → Course screens: routes to
- Role-based app → Learning and quiz: routes to
- Role-based app → Course authoring: routes to
- Role-based app → Admin console: routes to
- Role-based app → Learner rewards: routes to
- Role-based app → Analytics screens: routes to
- Auth and app state → Authentication: calls login/signup
- API server → Authentication: mounts
- API server → Course management: mounts
- API server → Enrollment progress: mounts
- API server → Quiz and certification: mounts
- API server → Approval and analytics: mounts
- API server → Rewards and community: mounts
- Authentication → Role authorization: protects routes
- Course management → Role authorization: protects writes
- Enrollment progress → Role authorization: protects routes
- Quiz and certification → Role authorization: protects routes
- Approval and analytics → Role authorization: protects routes
- Role authorization → User records: loads user
- Authentication → User records: reads/writes
- Course management → Course records: reads/writes
- Enrollment progress → Course records: reads course
- Enrollment progress → Enrollment records: creates/updates
- Enrollment progress → Credit transactions: records deductions
- Quiz and certification → Course records: reads questions
- Quiz and certification → Quiz attempts: records attempts
- Quiz and certification → Certificates: issues certificate
- Quiz and certification → Credit transactions: records awards
- Approval and analytics → Course records: approves courses
- Approval and analytics → User records: approves trainers
- Approval and analytics → Enrollment records: reads completion
- Approval and analytics → Credit transactions: reads totals
- Rewards and community → MongoDB: uses models
- API server → MongoDB: connects