How ankan00v/ivy-league-portal works
1. Purpose and runtime entry points
VidyaVerse is an opportunity-intelligence platform for student internships, jobs, and events. It combines source ingestion, personalized retrieval/ranking, an AI assistant, applications, and employer/admin workflows.
• FastAPI service bootstrap and API assembly: backend/app/main.py, backend/app/api/api_v1/api.py
• Separate background-job runtime: backend/app/worker.py, backend/app/services/job_runner.py
• Next.js frontend entry, routing, and backend proxy: frontend/src/app/page.tsx, frontend/src/app/api/[...path]/route.ts, frontend/src/proxy.ts
2. API, identity, and security boundary
The backend exposes versioned endpoint domains for opportunities, applications, chat, experiments, MLOps, source governance, and administration. Requests cross centralized dependency, middleware, rate-limit, and cookie-session boundaries before services access data.
• API domains: backend/app/api/api_v1/endpoints/opportunities.py, backend/app/api/api_v1/endpoints/auth.py, backend/app/api/api_v1/endpoints/admin.py
• Security/session infrastructure: backend/app/core/http_middleware.py, backend/app/core/security.py, backend/app/services/session_security_service.py
• Admin access is a distinct privileged plane with identity/TOTP/audit behavior: backend/app/services/admin_identity_service.py, backend/app/models/recruiter_audit_log.py
3. Opportunity acquisition and curation pipeline
Scheduled scraper jobs acquire listings and source candidates. Discovery qualifies and probes new sources; provider clients and company-board scraping handle extraction. Records are normalized, quality/trust assessed, deduplicated, then persisted rather than deleted when expired.
• Orchestration and ingestion: backend/app/services/scraper.py, backend/app/services/source_discovery.py, backend/app/services/company_careers_intelligence.py
• External-fetch boundary: backend/app/services/firecrawl_client.py, backend/app/services/apify_unstop_client.py, backend/app/services/scraper_fetch_bridge.py
• Curation controls: backend/app/services/duplicate_detector.py, backend/app/services/opportunity_quality_service.py, backend/app/services/opportunity_trust.py
4. Core data and storage layers
MongoDB is the primary operational store through Beanie-style models, holding users, profiles, opportunities, interactions, jobs, experiments, model versions, and audits. Redis supports session state, rate limiting, queues, caching, and online features. ClickHouse receives privacy-governed analytical exports and materializes reporting marts.
• Principal records: backend/app/models/opportunity.py, backend/app/models/profile.py, backend/app/models/opportunity_interaction.py
• Redis/cache integration: backend/app/core/redis.py, backend/app/core/cache.py
• Warehouse export and marts: backend/app/services/warehouse_export_service.py, backend/warehouse/clickhouse_schema.sql, backend/warehouse/models/mart_training_dataset.sql
5. Retrieval, personalization, and assistant
Opportunity text is enriched into embeddings/vector-index entries for semantic retrieval. Feed construction combines profile/context features, ranking mode selection, quality gating, and explanation signals. The RAG assistant has its own conversation, governance, feedback, and template/version records.
• Embedding/vector path: backend/app/services/embedding_pipeline.py, backend/app/services/vector_service.py, backend/app/models/vector_index_entry.py
• Recommendation/ranking path: backend/app/services/recommendation_service.py, backend/app/services/personalization/feature_builder.py, backend/app/services/personalization/learned_ranker.py
• Assistant/RAG path: backend/app/services/assistant_service.py, backend/app/services/rag_service.py, backend/app/services/rag_intelligence.py
6. Learning, experimentation, and MLOps control loop
Impression and interaction telemetry feeds experiments, warehouse datasets, offline evaluation, retraining, drift detection, and guarded rollout decisions. The README identifies semantic ranking as current trusted behavior; learned-ranking artifacts and rollout machinery exist but are not validated on real engagement data.
• Experiment and telemetry services: backend/app/services/experiment_service.py, backend/app/services/ranking_request_telemetry_service.py
• Lifecycle controls: backend/app/services/mlops/retraining_service.py, backend/app/services/mlops/drift_service.py, backend/app/services/mlops/rollout_guardrail_service.py
• Benchmark/training execution: backend/benchmarks/run_offline_benchmarks.py, backend/scripts/train_learned_ranker.py
7. Delivery, operations, and external dependencies
Frontend pages implement candidate, employer, admin-control, feed, profile, and assistant experiences; frontend API routes proxy to FastAPI. Deployment expects managed MongoDB, Redis, ClickHouse, S3-compatible artifact storage, plus SMTP, OAuth, Turnstile, scraping/LLM providers, and Slack/PagerDuty alert hooks. Docker compose is a local verification harness, while GitHub Actions enforce release and data/ML gates.
• Product surfaces: frontend/src/app/dashboard/page.tsx, frontend/src/app/opportunities/page.tsx, frontend/src/app/control/ops/page.tsx
• Container/runtime definitions: docker-compose.yml, backend/Dockerfile, frontend/Dockerfile
• Observability and release automation: ops/prometheus/prometheus.yml, ops/alerts/prometheus-rules.yml, .github/workflows/release-blocking-ml-gates.yml
Main entry points: api.py Versioned API domains · recommendation_service.py Personalized feed · opportunity.py MongoDB operational store · http_middleware.py Session and security boundary
Components 19
Product client
- Next.js product surfaces · Candidate, employer, admin, feed, profile, and assistant experiences.
frontend/src/app/page.tsx - Backend API proxy
frontend/src/app/api/[...path]/route.ts
API and control plane
- FastAPI service
backend/app/main.py - Versioned API domains · Opportunities, auth, applications, chat, experiments, MLOps, sources, and admin.
backend/app/api/api_v1/api.py - Session and security boundary · Applies identity, cookies, rate limits, and request controls.
backend/app/core/http_middleware.py - Privileged admin plane · Uses elevated identity, TOTP, and audit behavior.
backend/app/services/admin_identity_service.py
Opportunity pipeline
- Background job runtime
backend/app/worker.py - Source acquisition · Scrapes listings and discovers or qualifies sources.
backend/app/services/scraper.py - Scraping providers · Provider clients and fetch bridge retrieve source content.
backend/app/services/firecrawl_client.py - Curation and trust · Normalizes, deduplicates, quality-scores, and retains expired records.
backend/app/services/duplicate_detector.py
Retrieval and learning
- Personalized feed · Combines profile features, ranking mode, quality gates, and explanations.
backend/app/services/recommendation_service.py - Embedding and vector retrieval
backend/app/services/embedding_pipeline.py - RAG assistant · Maintains conversations, governance, feedback, and prompt versions.
backend/app/services/assistant_service.py - Experiments and ranking telemetry
backend/app/services/experiment_service.py - MLOps lifecycle controls · Retraining, drift detection, and guarded rollout decisions.
backend/app/services/mlops/retraining_service.py
Data and operations
- MongoDB operational store · Stores users, profiles, opportunities, interactions, jobs, experiments, models, and audits.
backend/app/models/opportunity.py - Redis online state · Supports sessions, rate limits, queues, caching, and online features.
backend/app/core/redis.py - ClickHouse warehouse · Receives governed exports and materializes reporting and training marts.
backend/warehouse/clickhouse_schema.sql - Delivery and observability · Containers, monitoring, alerts, and release/ML gates.
docker-compose.yml
Connections 24
- Next.js product surfaces → Backend API proxy: product requests
- Backend API proxy → FastAPI service: proxies
- FastAPI service → Session and security boundary: applies
- Session and security boundary → Versioned API domains: authorizes requests
- Versioned API domains → Privileged admin plane: admin endpoints
- Versioned API domains → Personalized feed: feed requests
- Versioned API domains → RAG assistant: chat requests
- Versioned API domains → MongoDB operational store: reads and writes
- Session and security boundary → Redis online state: sessions and limits
- Background job runtime → Source acquisition: runs scheduled jobs
- Background job runtime → Redis online state: consumes queues
- Source acquisition → Scraping providers: fetches sources
- Scraping providers → Curation and trust: listing candidates
- Curation and trust → MongoDB operational store: persists curated records
- MongoDB operational store → Embedding and vector retrieval: opportunity text
- Embedding and vector retrieval → Personalized feed: semantic candidates
- MongoDB operational store → Personalized feed: profiles and interactions
- Embedding and vector retrieval → RAG assistant: retrieval context
- Personalized feed → Experiments and ranking telemetry: impressions and ranking telemetry
- Experiments and ranking telemetry → ClickHouse warehouse: governed analytics export
- ClickHouse warehouse → MLOps lifecycle controls: training and evaluation datasets
- MLOps lifecycle controls → Personalized feed: guarded ranking rollout · Learned ranking remains unvalidated on real engagement data.
- Delivery and observability → FastAPI service: deploys and monitors
- Delivery and observability → Background job runtime: runs ML and data gates