Students entering college often struggle to find reliable, domain-specific guidance. Traditional mentoring programs suffer from poor matching, inconsistent quality, and information overload. Beacon solves this by building an intelligent, trust-scored peer mentoring network β where seniors' advice is weighted by verified achievements and past track records, queries are augmented by AI, and conflicts across multiple mentors are surfaced transparently.
Feature
Description
π Google OAuth + JWT Auth
Secure sign-in with Google, role-based access (Student / Senior), refresh-token rotation with blacklisting
π€ Rich User Profiles
Achievement tracking, domain tagging, experience levels, and availability management
π§ AI-Powered Query Pipeline
Submit questions β get instant provisional answers from Google Gemini β route to matched seniors β synthesise final advice
π€ Intelligent Mentor Matching
2-hop graph traversal on Neo4j + Pinecone embedding similarity to surface the best-fit seniors and peers
βοΈ Trust Score Engine
Multi-factor trust score (consistency, alignment, follow-through, achievement weight) to rank advice quality
βοΈ Conflict Detection
Automatically detects disagreements across senior responses and highlights areas of consensus
π¬ Direct Messaging
Real-time 1-on-1 conversations between students and seniors with request/accept flow
π
Adaptive Scheduler
Celery-powered load balancing, cold-start broadcasting, and fair query distribution
π Domain Graph
Neo4j-backed knowledge graph of academic/career domains with embedding-based linking via Pinecone
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β React 18 + Vite β
β Zustand State β React Router β Axios β
ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β REST API (JWT)
ββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββ
β Django 4.2 + DRF Backend β
β β
β ββββββββββββββ ββββββββββββββββ βββββββββββββββββββββββββββββ β
β β Auth β β User Profile β β Domain Management β β
β β Service β β Service β β Service (Neo4j + Pinecone)β β
β ββββββββββββββ ββββββββββββββββ βββββββββββββββββββββββββββββ β
β ββββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββββββββ β
β β Mentor Matchingβ β Trust Score β β Query Orchestrator β β
β β Service β β Service β β + AI Services (Gemini) β β
β ββββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββββββββ β
β ββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββ β
β β Direct Messaging β β Adaptive Scheduler (Celery+Redis) β β
β β Service β β β β
β ββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β
ββββββΌββββ βββββββΌβββββ βββββββΌβββββ
β SQLite β β Neo4j β β Pinecone β
β / PgSQLβ β Aura β β (Vector) β
ββββββββββ ββββββββββββ ββββββββββββ
Layer
Technology
Frontend
React 18, Vite 5, Zustand, React Router 6, Axios
Backend
Django 4.2, Django REST Framework, SimpleJWT
Graph DB
Neo4j 5 Aura (via neomodel)
Vector DB
Pinecone
SQL DB
SQLite (dev) / PostgreSQL 15 (prod)
Task Queue
Celery 5 + Redis
AI / LLM
Google Gemini (via google-genai)
Auth
Google OAuth 2.0, JWT (access + refresh)
Embeddings
Sentence Transformers
beacon/
βββ backend/ # Django project root
β βββ beacon/ # Project settings, URLs, WSGI
β β βββ settings.py
β β βββ urls.py
β β βββ wsgi.py
β βββ apps/ # Microservice-style Django apps
β β βββ auth_service/ # User registration, Google OAuth, JWT
β β βββ user_profile_service/ # Profiles, achievements, experience levels
β β βββ domain_management_service/ # Neo4j domain graph + Pinecone embeddings
β β βββ mentor_matching_service/ # 2-hop graph matching engine
β β βββ trust_score_service/ # Multi-factor trust scoring
β β βββ query_orchestrator/ # Query lifecycle management
β β βββ ai_services/ # Gemini RAG engine, conflict detection
β β βββ adaptive_scheduler_service/ # Celery load-balancing tasks
β β βββ direct_messaging_service/ # 1-on-1 DM with request/accept
β βββ manage.py
β βββ requirements.txt
β βββ seed_neo4j.py # Graph database seeding script
βββ frontend/ # React + Vite SPA
β βββ src/
β β βββ api/ # Axios API modules (auth, query, messagingβ¦)
β β βββ store/ # Zustand stores (authStore, queryStore)
β β βββ pages/ # Route-level views
β β β βββ AuthPage.jsx # Login / Register
β β β βββ StudentDashboard.jsx
β β β βββ SeniorDashboard.jsx
β β β βββ ProfilePage.jsx
β β β βββ QueryPage.jsx # AI-powered Q&A interface
β β β βββ MentorMatchPage.jsx
β β β βββ MessagingPage.jsx
β β β βββ SeniorInboxPage.jsx
β β β βββ SeniorOnboardingPage.jsx
β β βββ components/ # Reusable UI components
β β βββ Navbar.jsx
β β βββ QueryCard.jsx
β β βββ MentorCard.jsx
β β βββ PeerCard.jsx
β β βββ TrustScoreBadge.jsx
β β βββ ConflictAlert.jsx
β β βββ ProvisionalAnswerBox.jsx
β β βββ Aurora.jsx # Background visual effects
β βββ package.json
β βββ vite.config.js
βββ shared/
βββ schemas.md # JSON API contracts
Python 3.10+
Node.js 18+
Redis (for Celery)
Neo4j Aura instance (or local Neo4j 5)
Pinecone account
Google Cloud project (for OAuth + Gemini API key)
git clone https://github.com/your-org/beacon.git
cd beacon
cp .env.example .env
# Fill in: SECRET_KEY, NEO4J_*, PINECONE_API_KEY, GEMINI_API_KEY, GOOGLE_OAUTH_CLIENT_ID
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python seed_neo4j.py # Seed the domain graph
python manage.py runserver
cd frontend
npm install
npm run dev # Starts at http://localhost:5173
4. Celery Worker (for Adaptive Scheduler)
cd backend
celery -A beacon worker --loglevel=info
Prefix
Service
Description
api/auth/
Auth Service
Register, login, Google OAuth, token refresh
api/profile/
User Profile
CRUD profiles, achievements, experience levels
api/domains/
Domain Management
Domain graph queries, embedding-based linking
api/
Mentor Matching
Find mentors & peers (graph + vector search)
api/query/
Query Orchestrator
Submit queries, track status, get AI answers
api/scheduler/
Adaptive Scheduler
Load balancing, cold-start broadcast
api/dm/
Direct Messaging
Send/receive messages, manage conversations
internal/trust-score/
Trust Score
Internal trust score computation
internal/users/
Internal Auth
Service-to-service user lookups
internal/profile/
Internal Profile
Service-to-service profile lookups
Full JSON schemas for all requests/responses are documented in shared/schemas.md .
cd backend
# AI services tests
python -m pytest test_ai_services.py -v
# Neo4j integration tests
python -m pytest test_neo4j.py -v
# Query orchestrator tests
python -m pytest test_query_orchestrator.py -v
# User profile service tests
python -m pytest test_user_profile_service.py -v
π Environment Variables
Variable
Description
SECRET_KEY
Django secret key
DEBUG
Enable debug mode (True / False)
NEO4J_HOST
Neo4j Aura hostname
NEO4J_USERNAME
Neo4j username
NEO4J_PASSWORD
Neo4j password
PINECONE_API_KEY
Pinecone API key
PINECONE_INDEX
Pinecone index name (default: beacon-domains)
GEMINI_API_KEY
Google Gemini API key
GOOGLE_OAUTH_CLIENT_ID
Google OAuth client ID
REDIS_URL
Redis connection URL (for Celery)
POSTGRES_DB / POSTGRES_USER / POSTGRES_PASSWORD
PostgreSQL credentials (prod)
INTERNAL_SECRET
Shared secret for service-to-service auth
sequenceDiagram
participant S as Student
participant QO as Query Orchestrator
participant AI as AI Services (Gemini)
participant MM as Mentor Matching
participant Sr as Senior(s)
participant TS as Trust Score
S->>QO: Submit query
QO->>AI: Generate provisional answer (RAG)
AI-->>QO: Provisional answer + follow-up questions
QO->>MM: Find matching seniors
MM-->>QO: Matched senior list
QO->>Sr: Route query to seniors
Sr->>QO: Submit advice + follow-up answers
QO->>TS: Fetch trust scores
TS-->>QO: Senior weights
QO->>AI: Synthesise final answer (conflict detection)
AI-->>QO: Final answer + agreements/disagreements
QO-->>S: Deliver final advice
Loading
Mentor Matching Algorithm
Domain Linking β Student's query domain is embedded via Sentence Transformers and matched against the Pinecone vector index
Graph Traversal β 2-hop traversal on the Neo4j domain graph to find seniors with related expertise
Trust-Weighted Ranking β Candidates are ranked by composite trust score (consistency Γ alignment Γ follow-through Γ achievement weight)
Load Balancing β Adaptive scheduler ensures fair distribution; cold-start broadcasting is used when no seniors are immediately available
Role
Capabilities
Student
Ask questions, view AI answers, browse mentors/peers, message seniors, track profile
Senior
Receive routed queries, submit advice, manage availability, onboard with domains, accept DM requests