How karthik-kurup/sahakaar-setu works
Sahakaar Setu is a role-based cooperative training and careers platform. Users enter through public pages or sign in, then use administrator, institute staff, trainer, trainee, or employer portals for programme administration, learning, attendance, certification, skills, and jobs. The React client calls an Express API; authentication and domain routes use Prisma-backed data. The README documents these product capabilities, while the sampled files show routing, auth, and offline quiz syncing. Some domain-route details are unsampled, so their links are limited to documented mounts and indexed references.
Main entry points: index.ts Express API · App.tsx Route selection · api.ts API client · prisma.ts Prisma client
Components 34
Client experience
- Route selection
client/src/App.tsx - Public home
client/src/pages/HomePage.tsx - Sign in
client/src/pages/LoginPage.tsx - Registration
client/src/pages/RegisterPage.tsx - Admin portal
client/src/pages/admin/AdminDashboard.tsx - Staff portal
client/src/pages/staff/StaffDashboard.tsx - Trainer portal
client/src/pages/trainer/TrainerDashboard.tsx - Trainee portal
client/src/pages/trainee/TraineeDashboard.tsx - Employer portal
client/src/pages/employer/EmployerDashboard.tsx - Demo workflow
client/src/pages/admin/DemoWorkflow.tsx - Portal sections
client/src/hooks/usePortalSection.ts - Translations
client/src/i18n.ts
Identity and connectivity
- Session context
client/src/context/AuthContext.tsx - Connectivity context
client/src/context/ConnectivityContext.tsx - Offline records
client/src/lib/offlineStorage.ts
Training and attendance
- Programmes and institutes
server/src/routes/programmes.ts - Attendance
server/src/routes/attendance.ts - Learning modules
server/src/routes/modules.ts - Quizzes
server/src/routes/quizzes.ts - Trainer services
server/src/routes/trainer.ts - Nominations
server/src/routes/nominations.ts
Careers and credentials
- Certificates
server/src/routes/certificates.ts - Skills profiles
server/src/routes/skills.ts - Employment
server/src/routes/jobs.ts
API and persistence
- API client
client/src/lib/api.ts - Express API
server/src/index.ts - Auth routes
server/src/routes/auth.ts - JWT authorization
server/src/middleware/auth.ts - Runtime config
server/src/lib/config.ts - Prisma client
server/src/lib/prisma.ts - Analytics
server/src/routes/analytics.ts - User management
server/src/routes/users.ts - Notifications
server/src/routes/notifications.ts
Other components
- Platform users
Connections 44
- Platform users → Route selection: opens portal
client/src/App.tsx - Route selection → Public home: routes public
client/src/App.tsx - Route selection → Sign in: routes sign-in
client/src/App.tsx - Route selection → Registration: routes registration
client/src/App.tsx - Route selection → Admin portal: routes admin
client/src/App.tsx - Route selection → Staff portal: routes staff
client/src/App.tsx - Route selection → Trainer portal: routes trainer
client/src/App.tsx - Route selection → Trainee portal: routes trainee
client/src/App.tsx - Route selection → Employer portal: routes employer
client/src/App.tsx - Route selection → Session context: provides session
client/src/App.tsx - Sign in → Session context: signs in
client/src/context/AuthContext.tsx - Registration → Session context: registers account
client/src/context/AuthContext.tsx - Session context → API client: requests session
client/src/context/AuthContext.tsx - Connectivity context → Offline records: reads pending
client/src/context/ConnectivityContext.tsx - Connectivity context → API client: syncs attempts
client/src/context/ConnectivityContext.tsx - Admin portal → API client: requests data
client/src/pages/admin/AdminDashboard.tsx - Staff portal → API client: requests data
client/src/pages/staff/StaffDashboard.tsx - Trainer portal → API client: requests data
client/src/pages/trainer/TrainerDashboard.tsx - Trainee portal → API client: requests data
client/src/pages/trainee/TraineeDashboard.tsx - Employer portal → API client: requests data
client/src/pages/employer/EmployerDashboard.tsx - API client → Express API: sends API requests
client/src/lib/api.ts - Express API → Auth routes: mounts auth
server/src/index.ts - Express API → Programmes and institutes: mounts routes
server/src/index.ts - Express API → Attendance: mounts routes
server/src/index.ts - Express API → Learning modules: mounts routes
server/src/index.ts - Express API → Quizzes: mounts routes
server/src/index.ts - Express API → Trainer services: mounts routes
server/src/index.ts - Express API → Certificates: mounts routes
server/src/index.ts - Express API → Skills profiles: mounts routes
server/src/index.ts - Express API → Employment: mounts routes
server/src/index.ts - Express API → Analytics: mounts routes
server/src/index.ts - Express API → Nominations: mounts routes
server/src/index.ts - Express API → User management: mounts routes
server/src/index.ts - Express API → Notifications: mounts routes
server/src/index.ts - Auth routes → Prisma client: reads users
server/src/routes/auth.ts - Auth routes → JWT authorization: protects profile
server/src/routes/auth.ts - JWT authorization → Runtime config: verifies with secret
server/src/middleware/auth.ts - Programmes and institutes → Prisma client: queries data
server/src/routes/programmes.ts - Attendance → Prisma client: queries data
server/src/routes/attendance.ts - Trainer services → Prisma client: queries data
server/src/routes/trainer.ts - Skills profiles → Prisma client: queries data
server/src/routes/skills.ts - Employment → Prisma client: queries data
server/src/routes/jobs.ts - Analytics → Prisma client: queries data
server/src/routes/analytics.ts - Route selection → Demo workflow: launches workflow