How hayden9898/syllascan works
Project Type and Purpose
• SyllaScan is a full-stack web application.
• Frontend: a React.js SPA styled with Tailwind CSS.
• Backend: a Python service (likely FastAPI/Flask based on structure) that handles syllabus processing, AI calls, and calendar integration.
• Purpose: upload syllabus → extract dates via OpenAI → integrate with Google Calendar.
File Structure
• Top-level:
• app/ – backend source (helpers, routers, main.py)
• frontend/ – React app (public, src, Tailwind config)
• backend “helpers” correspond to service adapters: OpenAI, Google OAuth, Google Calendar.
• routers define HTTP endpoints: upload/scan syllabus, OAuth flow, calendar sync.
• frontend/src contains pages (Home, Login, DrivePicker, ExportPage, Results) and shared components (Button, Loader).
README for Stack & Workflow
• Tech: React.js, OpenAI, Google Calendar API, Tailwind CSS.
• Flow: user authenticates with Google → uploads syllabus → backend uses OpenAI to parse dates → backend writes events via Google Calendar API → frontend displays results and status.
a. Main Components:
• Client Browser (React SPA)
• Frontend Application
• Backend Service (app/main.py)
• External AI Service (OpenAI API)
• External Calendar Service (Google Calendar API)
• (Optional) Local Storage (dummy_json.json or future DB)
b. Interactions:
1. User → Frontend: navigation, file upload
2. Frontend → Backend: REST/HTTP POST (upload syllabus)
3. Backend → OpenAI API: send document, receive parsed dates
4. Backend → Google OAuth API: authenticate & obtain tokens
5. Backend → Google Calendar API: create/update events
6. Backend → Frontend: send sync status & event list
7. Frontend → Browser: render calendar results, allow export
c. Architectural Patterns / Principles:
• SPA + REST API separation
• Adapter pattern for external service integrations (helpers/)
• Router-based endpoint organization
• Stateless backend (no persistent DB shown)
d. Key Technologies:
• Frontend: React.js, Tailwind CSS, IndexedDB (for any client-side caching), Drive Picker components
• Backend: Python (FastAPI/Flask style), pip dependencies, JSON stub data
• External: OpenAI API, Google Calendar API (with OAuth2 flow)
• Blue for frontend components
• Green for backend components
• Orange for external services
• Rectangles for services/applications
• Clouds for external APIs
Final Advice
• Be exhaustive: include each module group (routers, helpers, components).
• Data flow: from file upload → AI parsing → calendar creation → UI feedback.