How karthikeya39g-af/nnrg_website works
NNRG Campus Navigator is a college information website with an AI question-answering chatbot and backend forms. Visitors browse institutional, academic, placement, research and facilities content; chatbot messages travel through the frontend service to the FastAPI chat service, which handles simple intents or retrieves context for an LLM response. Forms are handled by separate backend endpoints and stored in SQLite. Evidence is strongest for the sampled chat, facilities and backend wiring; unsampled page and RAG-ingestion details are represented only where documented.
Main entry points: chat_service.py Chat Orchestrator · contact.py Contact, Apply, Tour APIs · page.tsx Facilities and Campus · pipeline.py RAG Generation
Components 29
Campus Website
- Site Navigation
src/components/Navbar.tsx - Institution Pages
src/app/about/page.tsx - Academic Content
src/app/academics/page.tsx - Programs and Curriculum
src/app/programs/page.tsx - Placements
src/app/placements/page.tsx - Research
src/app/research/page.tsx - Facilities and Campus
src/app/facilities/page.tsx - Interactive Book
src/components/facilities/Book.tsx - Book Spreads
src/components/facilities/BookPages.tsx - Animated Page
src/components/facilities/Page.tsx - Department Directory Data
frontend/src/data/departments.ts
Chat Experience
- Chat Interface
src/contexts/ChatContext.tsx - Chat HTTP Client
src/services/chat.service.ts
Chat Backend
- Chat API
backend/app/api/chat.py - Chat Orchestrator
backend/app/services/chat_service.py - Intent Detection
backend/app/ai/intent.py - Conversation Memory
backend/app/ai/memory.py - Chat Schemas
backend/app/schemas/chat.py
Knowledge Retrieval
- RAG Generation
backend/app/rag/pipeline.py - Document Retriever
backend/app/rag/retriever.py - Text Embeddings
backend/app/rag/embedder.py - Document Chunking
backend/app/rag/chunker.py - Vector Store
backend/app/rag/vector_store.py
Forms and Storage
- Contact, Apply, Tour APIs
backend/app/api/contact.py - SQLite Database
backend/app/database/database.py - Form Data Models
backend/app/database/models.py - FastAPI Application
backend/app/main.py
Other components
- Prospective Student
- Ollama Model
Connections 28
- Prospective Student → Site Navigation: browses
README.md - Site Navigation → Institution Pages: navigates
src/components/Navbar.tsx - Prospective Student → Academic Content: browses
README.md - Prospective Student → Programs and Curriculum: browses
README.md - Prospective Student → Placements: browses
README.md - Prospective Student → Research: browses
README.md - Prospective Student → Facilities and Campus: browses
README.md - Facilities and Campus → Interactive Book: renders
src/app/facilities/page.tsx - Facilities and Campus → Book Spreads: generates pages
src/app/facilities/page.tsx - Book Spreads → Animated Page: uses
src/components/facilities/BookPages.tsx - Prospective Student → Chat Interface: asks questions
README.md - Chat Interface → Chat HTTP Client: sends messages
src/contexts/ChatContext.tsx - Chat HTTP Client → Chat API: posts messages
src/services/chat.service.ts - FastAPI Application → Chat API: registers route
backend/app/main.py - Chat API → Chat Orchestrator: dispatches to
backend/app/api/chat.py - Chat Orchestrator → Intent Detection: detects intent
backend/app/services/chat_service.py - Chat Orchestrator → Conversation Memory: reads and updates
backend/app/services/chat_service.py - Chat Orchestrator → RAG Generation: generates answers
backend/app/services/chat_service.py - Chat Orchestrator → Chat Schemas: uses schemas
backend/app/services/chat_service.py - RAG Generation → Document Retriever: retrieves context
backend/app/rag/pipeline.py - Document Retriever → Text Embeddings: embeds query
backend/app/rag/retriever.py - Document Retriever → Vector Store: searches
backend/app/rag/retriever.py - RAG Generation → Ollama Model: requests generation
backend/app/rag/pipeline.py - Text Embeddings → Document Chunking: uses chunking
backend/app/rag/embedder.py - Prospective Student → Contact, Apply, Tour APIs: submits forms
README.md - FastAPI Application → Contact, Apply, Tour APIs: registers routes
backend/app/main.py - Contact, Apply, Tour APIs → SQLite Database: accesses database
backend/app/api/contact.py - Contact, Apply, Tour APIs → Form Data Models: uses models
backend/app/api/contact.py