How devrahulbanjara/convexhire works
1. This is a monorepo for a hiring/recruiting platform, split into a Python backend, a Next.js frontend, and a sizable set of AI/ML tooling, docs, and evaluation assets.
2. The frontend is a Next.js App Router application with clear product surfaces: public marketing pages, candidate portal, recruiter portal, auth flows, and legal pages. It uses a shared component library, Redux/RTK Query-style API services, and role-based route guarding to keep candidate and recruiter experiences separated.
3. The backend is a modular Python API organized by domain, with the usual service/router/schema/model layering. Each feature lives in its own module under app/modules, which makes the domain boundaries explicit and easy to map in a diagram.
4. Cross-cutting backend concerns live under app/core: configuration, database access, dependency wiring, security/auth, middleware, logging, caching, request context, response helpers, and background task/scheduler support. This is the shared platform layer that all domain modules depend on.
5. The main business domains are:
- auth and identity
- companies and recruiter settings/preferences
- profiles, resumes, and resume import
- jobs and job drafts
- applications and application sharing/sync
- interviews, including recordings and evaluations
- notifications, activity, audit logs
- outreach and dashboards
These domains are the core transactional data model of the product.
6. AI-assisted workflows are a major architectural layer rather than a thin add-on. There are dedicated subsystems for job drafting/search, recruiter chat, shortlisting, resume-gap analysis, profile AI import, interview evaluation, and shortlisting ML filtering. Several of these use graph/node/prompt/tool structures, indicating agent-style orchestration rather than single-call LLM usage.
7. The backend’s infrastructure adapters are isolated under app/infrastructures. They wrap external capabilities such as AWS/Bedrock, Qdrant, Redis, email, storage, search, HuggingFace Whisper, resume extraction, and guardrails. This separation suggests the domain services talk to provider-specific adapters rather than calling vendors directly.
8. Data persistence appears centered on a relational database with Alembic migrations for schema evolution. The migration history shows evolving support for jobs, applications, interviews, shortlisting, notifications, audit logs, recruiter chat sessions, job sync events, and evaluation schemas. That implies the database is the system of record for workflow state.
9. Some workflows are explicitly asynchronous or eventually consistent:
- sync modules and outbox-style tables for job/application events
- job expiry scheduling
- resume import tasks
- interview webhooks
- cache invalidation and SWR-style freshness handling
- search/vector reconciliation
This means not all updates are served synchronously from one request path.
10. A typical runtime flow is: user action in the frontend → API request to the backend domain router → service layer business logic → database/cache/AI adapter calls → response back to the UI. For AI-heavy features, the service layer may also invoke agent graphs, embeddings/vector search, or guardrails before returning results.
11. The frontend has at least one special boundary around recruiter chat: it includes its own API route handlers for session/message streaming and confirmation actions. That suggests the UI sometimes proxies or orchestrates backend chat interactions locally to support streaming and session state.
12. There is a strong evaluation and research footprint in the repo: golden resume datasets, benchmark runs, notebooks, training scripts, evaluation reports, and documentation diagrams. These are support artifacts for model quality and system validation, not part of the live product path.
13. Operationally, the repo includes Docker, environment examples, CI workflows, reset/seed scripts, and test suites. Integration tests cover auth, jobs, companies, applications, cache invalidation, recruiter chat memory, resume-gap grounding, and hybrid search behavior, which reinforces the main architectural seams.
14. If you draw the architecture, the clearest top-level boundaries are:
- Next.js client/UI
- Python domain API
- AI/ML orchestration layer
- external infrastructure/providers
- persistence/search/cache stores
- offline evaluation/training/tooling
The interesting data flows are job/application lifecycle, recruiter chat, shortlisting, resume parsing/gap analysis, and interview evaluation.
Main entry points: core Core Platform · alembic DB & Migrations · ai AI Providers · app UI Shell
Components 21
Next.js Frontend
App Router UI, role-separated experiences, and client-side orchestration.
- UI Shell · Public pages, auth flows, candidate and recruiter portals, legal pages, and layout guards.
frontend/src/app - Chat API · Recruiter chat session, message streaming, history, interrupt, and confirm actions.
frontend/src/app/api/recruiter-chat - Shared UI · Common components, layout pieces, recruiter chat widgets, and job/candidate surfaces.
frontend/src/components - Client State · API services, slices, hooks, role routes, and app-side state management.
frontend/src/store
Python API
Domain API, shared platform code, and service-layer business logic.
- Core Platform · Configuration, DB wiring, security, middleware, logging, cache, scheduler, and request context.
backend/app/core - Auth & Identity · Login, OAuth, account state, dependencies, and identity models and schemas.
backend/app/modules/auth - Profiles & Resumes · Candidate profiles, resumes, and AI-assisted profile import workflows.
backend/app/modules/profiles - Jobs & Drafts · Jobs, job drafts, sync hooks, lifecycle state, and job-facing APIs.
backend/app/modules/jobs - Applications · Applications, sharing, synchronization, and application state transitions.
backend/app/modules/applications - Interviews · Interview scheduling, recordings, evaluations, and webhook handling.
backend/app/modules/interviews - Companies & Recruiter · Company settings, recruiter preferences, company-scoped configuration, and team data.
backend/app/modules/companies - Activity & Audit · Activity feeds, notifications, audit logs, and operational history.
backend/app/modules/activity
AI Orchestration
Agentic and LLM-assisted workflows for drafting, ranking, parsing, and evaluation.
- Job AI · Job drafting, search, prompt/tool orchestration, runtime, and validation.
backend/app/modules/job_ai - Recruiter Chat · Conversational recruiter assistant with prompts, tools, sessions, and stateful flows.
backend/app/modules/recruiter_chat - Shortlisting AI · Graph-based shortlisting with router, critique, role-specific nodes, prompts, and tools.
backend/app/agents/shortlisting - Resume Gap AI · Gap analysis, grounding, provider abstraction, and safety helpers for resume review.
backend/app/modules/resume_gap
External Adapters
Provider integrations for storage, search, embeddings, email, and guardrails.
- AI Providers · Bedrock, AI service wrapper, guardrails, HuggingFace Whisper, embeddings, and model access.
backend/app/infrastructures/ai - Data Adapters · Qdrant, Redis, search, storage, email, resume extraction, and AWS integration.
backend/app/infrastructures
Persistence
Relational system of record plus cache/vector/search stores.
- DB & Migrations · Relational system of record and schema evolution for product workflows and events.
backend/alembic - Cache & Vector · Freshness cache, SWR behavior, vector search, and reconciliation stores.
Offline Tooling
Evaluation, training, and dataset generation artifacts.
- Eval & Research · Golden datasets, evaluation runs, notebooks, benchmarks, reports, and training scripts.
backend/evaluation
Connections 28
- UI Shell → Shared UI: renders · The app routes compose shared UI and page-level components.
- UI Shell → Client State: uses · Pages and features fetch data through client state services and slices.
- UI Shell → Chat API: proxies chat · Recruiter chat routes are partly handled locally for streaming and session state.
- Client State → Core Platform: calls API · RTK-style services call the backend via the shared HTTP boundary.
- Chat API → Recruiter Chat: streams to · Chat route handlers coordinate with the recruiter chat backend workflow.
- Chat API → Core Platform: auth/context · Route handlers rely on shared auth and request context conventions.
- Jobs & Drafts → Core Platform: depends on · Domain services rely on core config, database, security, and helpers.
- Applications → Core Platform: depends on · Application orchestration uses the shared backend platform layer.
- Profiles & Resumes → Core Platform: depends on · Profile and import services use core dependencies and helpers.
- Interviews → Core Platform: depends on · Interview flows use shared platform services and webhook helpers.
- Companies & Recruiter → Core Platform: depends on · Company and recruiter settings are built on the core platform layer.
- Activity & Audit → Core Platform: depends on · Activity, notifications, and audit services use core wiring and logging.
- Jobs & Drafts → DB & Migrations: persists · Jobs, drafts, sync events, and expiry state live in the relational database.
- Applications → DB & Migrations: persists · Applications and sharing state are stored as source-of-truth records.
- Interviews → DB & Migrations: persists · Interview records, recordings, evaluations, and webhook state are stored centrally.
- Activity & Audit → DB & Migrations: persists · Notifications, activity logs, and audit trails are database-backed.
- Jobs & Drafts → Cache & Vector: syncs · Job state uses cache invalidation and freshness controls.
- Job AI → AI Providers: invokes · Job AI uses model and provider adapters for generation and validation.
- Recruiter Chat → AI Providers: invokes · Recruiter chat uses LLM and guardrail services through adapters.
- Shortlisting AI → AI Providers: invokes · Shortlisting agents rely on model/provider access and guardrails.
- Resume Gap AI → AI Providers: invokes · Resume gap analysis uses provider-backed LLM and safety services.
- Job AI → Cache & Vector: uses · AI workflows use embeddings, cached results, or vector-backed retrieval.
- Shortlisting AI → Cache & Vector: retrieves · Shortlisting uses vector/search stores for candidate ranking signals.
- Resume Gap AI → Cache & Vector: retrieves · Gap analysis and grounding rely on vector/search state.
- Data Adapters → Cache & Vector: wraps · Adapters isolate Redis, Qdrant, search, and storage implementations.
- Data Adapters → DB & Migrations: integrates · Adapters bridge the domain code to durable storage and external services.
- Eval & Research → Resume Gap AI: validates · Golden datasets and eval runs measure resume-gap workflow quality.
- Eval & Research → Shortlisting AI: benchmarks · Offline evaluation supports shortlisting and model-quality comparisons.