How asha0ahmed/study-squad-duchbag works
Study Squad is a student-and-mentor squad learning platform: students register and profile their subjects, join matched or invited squads, then use squad learning tools; mentors manage tasks and students submit work. The frontend centralizes HTTP calls in frontend/lib/api.ts; the Express backend owns domain routes and PostgreSQL access. The README and sampled source establish the API, matching, chat, payments/subscriptions, complaints, admin, uploads, and password-reset capabilities. The 120 KB backend server excerpt is partial, so unsampled route-level relationships are not expanded.
Main entry points: api.ts API client · server.js Express API · db.js PostgreSQL pool · auth.js Request authentication
Components 19
Student and mentor experience
- Student screens
frontend/app/auth/student/signup/page.tsx - Mentor screens
frontend/app/auth/mentor/signup/page.tsx - Student profiler
frontend/app/profiler/page.tsx - Mentor desk
frontend/components/desk/MentorDesk.tsx - Complaints
frontend/app/complaints/page.tsx
Squad learning
- Squad screens
frontend/app/squad/page.tsx - Squad chat
frontend/app/admin/squads/chat/page.tsx - Task workflows
frontend/app/tasks/page.tsx
Administration
- Admin console
frontend/app/admin/page.tsx
Backend services
- API client
frontend/lib/api.ts - Express API
backend/server.js - Request authentication
backend/middleware/auth.js - Squad matching
backend/utils/matching.js - Upload validation
backend/middleware/upload.js - Password reset mail
backend/utils/mailer.js
Persistence and integrations
- PostgreSQL pool
backend/db.js - File storage
backend/utils/cloudinary.js
Other components
- SMTP provider
- PostgreSQL
Connections 19
- Student screens → API client: uses
frontend/lib/api.ts - Mentor screens → API client: uses
frontend/lib/api.ts - Student profiler → API client: uses
frontend/lib/api.ts - Squad screens → API client: uses
frontend/lib/api.ts - Squad chat → API client: uses
frontend/lib/api.ts - Task workflows → API client: uses
frontend/lib/api.ts - Mentor desk → API client: uses
frontend/lib/api.ts - Complaints → API client: uses
frontend/lib/api.ts - Admin console → API client: uses
frontend/lib/api.ts - API client → Express API: sends requests
frontend/lib/api.ts - Express API → PostgreSQL pool: queries
backend/server.js - Request authentication → PostgreSQL pool: checks accounts
backend/middleware/auth.js - Express API → Request authentication: guards routes
backend/server.js - Express API → Squad matching: runs matching
backend/server.js - Express API → Upload validation: validates uploads
backend/server.js - Express API → File storage: stores files
backend/server.js - Express API → Password reset mail: sends reset mail
backend/server.js - Password reset mail → SMTP provider: sends email
backend/utils/mailer.js - PostgreSQL pool → PostgreSQL: connects
backend/db.js