How iftekhartamim595/gradbridge works
1. GradBridge is a two-tier monolith: a Django backend API and a React/Vite frontend SPA. The backend is split into feature apps rather than microservices, and the frontend consumes those APIs plus a WebSocket chat channel.
2. The backend’s architectural root is backend/config, which wires Django settings, ASGI/WGI entrypoints, URL routing, static file serving, JWT auth, CORS, Channels, and production deployment behavior. Procfile, render.yaml, runtime.txt, and build.sh show it is intended for hosted deployment with Gunicorn and a managed runtime.
3. Identity and access control are concentrated in accounts. This app owns the custom user model, role/approval workflow, Google OAuth integration, serializers/views for auth endpoints, and permission logic. It is the foundation for role-based branching across the rest of the platform.
4. User-facing profile data lives in profiles, which models student and alumni profiles, certificates, visibility controls, and profile enrichment. Signals in this app indicate that profile creation/update side effects are automatic rather than manually triggered from the UI.
5. Discovery and matching are handled by search, projects, and community. search provides filtered alumni discovery, projects stores portfolio/work samples, and community appears to support broader social or feed-style interactions. These features depend heavily on profile visibility and user role.
6. Mentorship and job workflows are separate bounded areas. mentorship models mentorship requests and their lifecycle, while jobs owns job postings, recruiter-specific fields, applications, and related utilities. The README’s recruiter approval flow suggests accounts and jobs cooperate to enforce who can publish jobs.
7. Real-time communication is implemented with Django Channels in chat. The presence of consumers.py, middleware.py, and routing.py indicates WebSocket-based messaging, while REST endpoints still exist for conversation and message history. The frontend has a chat context and socket hook, so chat uses both HTTP for persistence and WebSockets for live delivery.
8. Notifications are a separate event-driven concern in notifications. The signals.py file suggests notifications are produced by model events across other apps, not only by explicit API calls. This makes notifications a cross-cutting subsystem rather than a standalone user action flow.
9. AI-powered resume analysis is isolated in ai_insights, with an openrouter.py integration and utilities for processing resume content. The frontend’s AIInsights and ResumeAnalysis pages likely upload a resume to this API, which then returns scoring, skill-gap analysis, and recommendations. ml_engine looks like a separate internal service layer for ML-related logic, but the primary external LLM integration is OpenRouter.
10. Email delivery and validation are centralized under utils, especially email_service.py and validators.py. This keeps outbound communication and shared input checks out of individual feature apps, which is important because chat, mentorship, account actions, and notifications all appear to trigger email side effects.
11. The frontend is a role-aware SPA organized around pages, reusable components, and React contexts. AuthContext, ChatContext, and ModalContext provide shared client-side state, while route guards like PrivateRoute and ApprovedRecruiterRoute enforce access rules before a screen is rendered.
12. API access on the frontend is centralized in src/api, with apiClient.js and ai.js acting as the main service layer. This means pages do not talk directly to the backend; they go through a common request layer that likely handles JWT attachment, error handling, and environment-based base URLs.
13. The user journeys are clearly role segmented in the page structure: student dashboards and profile views, alumni dashboards and search, recruiter hiring flows, admin pages, messages, community, jobs, mentorship, and resume analysis. That separation mirrors the backend app boundaries, which makes the diagram easier to draw as matching frontend modules to backend domains.
14. Overall data flow is: browser auths against accounts, receives JWTs, then uses REST APIs for profiles/search/jobs/mentorship/notifications/AI and WebSockets for chat. Cross-cutting events like profile updates, mentorship actions, and job/application changes can emit notifications and emails, while AI resume uploads go out to OpenRouter through the backend.
Main entry points: api API layer · profiles Profiles · notifications Notifications · accounts Accounts
Components 19
Backend
Django monolith and feature apps
- Core config · Settings, routing, ASGI/WSGI, auth, CORS, Channels, deployment
backend/config - Accounts · Custom user model, roles, approval flow, OAuth, permissions
backend/accounts - Profiles · Student and alumni profiles, certificates, visibility, signals
backend/profiles - Search · Filtered alumni discovery and matching queries
backend/search - Projects · User work samples and project records
backend/projects - Community · Broader social or feed-style interactions
backend/community - Jobs · Job posts, recruiter fields, applications, utilities
backend/jobs - Mentorship · Mentorship requests and lifecycle management
backend/mentorship - Chat · WebSocket consumers, routing, middleware, and message history
backend/chat - Notifications · Notification records and signal-driven event generation
backend/notifications - AI insights · Resume analysis, OpenRouter integration, scoring and recommendations
backend/ai_insights - Shared utils · Email delivery and shared validation helpers
backend/utils
Frontend
React/Vite SPA and client state
- SPA shell · Vite application composition and route assembly
frontend/src/App.jsx - API layer · Centralized HTTP clients for backend access
frontend/src/api - Client state · Auth, chat, and modal shared state
frontend/src/contexts - Route guards · Private and recruiter-approved client-side route protection
frontend/src/components - Chat UI · Chat window and socket hook for live messaging
frontend/src/components/chat - Role pages · Student, alumni, recruiter, admin, jobs, community, mentorship, search, and profile screens
frontend/src/pages - AI pages · Resume analysis and insights screens
frontend/src/components/AIInsights.jsx
Connections 30
- Core config → Accounts: auth wiring · Installs user model, JWT, OAuth, and permissions into the Django stack
- Core config → Chat: channels · ASGI and websocket routing enable live chat
- Core config → Notifications: events · Global settings support signal-driven notification flow
- Accounts → Profiles: role base · Profile visibility and branching depend on approved user roles
- Profiles → Search: visibility · Discovery uses profile data and visibility controls
- Profiles → Projects: showcase data · Projects complement profile enrichment and portfolio views
- Accounts → Jobs: recruiter gate · Job publishing and hiring flows depend on account role and approval
- Accounts → Mentorship: access rules · Mentorship participation follows identity and role checks
- Profiles → Community: identity data · Community features are shaped by user profile information
- Chat → Notifications: activity alerts · Messaging events can surface as notifications
- Profiles → Notifications: signals · Profile changes emit notification side effects
- Jobs → Notifications: applications · Job and application events can trigger notifications
- Mentorship → Notifications: request events · Mentorship lifecycle changes can trigger notifications
- AI insights → Shared utils: validation · Resume processing reuses shared input checks and email helpers indirectly
- SPA shell → Route guards: renders · The SPA composes protected and role-aware screens
- SPA shell → Client state: shared state · Contexts provide auth, chat, and modal state across the app
- SPA shell → API layer: data access · Pages go through centralized API clients
- Client state → Chat UI: socket state · Chat context and hook support live conversation updates
- API layer → Accounts: auth API · Login, registration, and approval flows call account endpoints
- API layer → Profiles: profile API · Profile views and edits use REST endpoints
- API layer → Search: discovery API · Alumni and student search is fetched from the backend
- API layer → Jobs: jobs API · Hiring screens interact with job and application endpoints
- API layer → Mentorship: mentorship API · Mentorship pages use request and lifecycle endpoints
- API layer → Community: community API · Social feed interactions are loaded through the API layer
- API layer → Notifications: notifications API · Notification lists and status are fetched from the backend
- API layer → AI insights: analysis API · Resume analysis uploads are submitted to AI endpoints
- Chat UI → Chat: websocket · Chat UI subscribes to live messages over Channels
- Role pages → API layer: uses · Role-specific screens consume the shared client layer
- Role pages → Chat UI: messages · Messages and inbox screens embed the chat UI
- AI pages → AI insights: resume analysis · AI insights screens call the resume analysis backend