How shrav883/hackwestx24-officehours works
Project type and purpose
• From the README ("Teaching AI assistant for answering queries related to class content/textbook content") and the presence of Node.js package files, this is a full-stack web application (monorepo) whose frontend serves an interactive UI (plain HTML/JavaScript) and whose backend (quiz-backend) is an Express.js server that routes user questions to an AI service (or local knowledge base).
File structure
• Top level:
• README.md – project description
• Untitled-1.html – likely the single‐page frontend UI
• package.json & package-lock.json – frontend or root build scripts/dependencies
• Subfolder quiz-backend:
• package.json & package-lock.json – backend dependencies
• server.js – Express.js server entrypoint
• sample/ – local sample data or knowledge base files
• No separate “src” folders implies a simple folder‐per‐tier layout.
• No Docker/Kubernetes configs, so deployment is likely a simple “npm start” on each tier.
README for additional insights
• The README confirms that the backend is an AI teaching assistant. While it doesn’t list tech stack explicitly, the presence of package.json files and server.js shows Node.js/Express. Frontend is vanilla HTML/JS.
a. Main components
1. Client Browser / Frontend (Untitled-1.html + supporting JS/CSS)
2. Backend API Server (Express.js in quiz-backend/server.js)
3. Knowledge Base (quiz-backend/sample folder)
4. External AI Service (e.g., OpenAI GPT API)
5. (Optional) User Authentication / Session Store – if implemented in server.js
b. Relationships & interactions
• Browser → HTTP(S) requests → Backend API
• Backend → reads from local Knowledge Base for static data
• Backend → HTTP(S) calls → External AI Service
• AI Service → returns generated answer → Backend → forwards to Browser
c. Architectural patterns & design principles
• Client-Server pattern (separation of concerns)
• Thin frontend, “smart” backend routing logic
• Externalizing AI logic to a third‐party service or microservice
• Local sample data as a simple persistence layer
d. Relevant technologies
• Frontend: HTML5, vanilla JavaScript
• Backend: Node.js, Express.js
• Data: local JSON/files in sample/
• External API: OpenAI or similar RESTful AI endpoint