How vishalv971/switch-it-up works
Main Components
• Frontend UI: Represented by the Next.js “app” folder which includes routing (pages within [[...index]]), components (React components such as CallLogButton, GoogleCalendarIntegration, and NotionIntegration), and standard layout files.
• Backend API Server: Housed within the “api” directory which includes the entry point (index.py) and source code modules such as configuration, database (Supabase integration), routes (e.g., calendar_routes.py), and services (e.g., gcal_service.py, gemini_service.py).
• Database: Supabase is used for data storage.
• External Integrations: APIs and services such as Notion API, Google Calendar API, ElevenLabs for Voice AI, and Clerk for authentication.
Relationships and Interactions
• Within the backend layer, distinct modules (config, db, routes, services) show how data flows from the API entry point to various services and ultimately to the database (Supabase) or external APIs.
Important Architectural Patterns and Design Principles
• Clear Separation of Concerns: Frontend UI is decoupled from backend logic.
• Modular Design: The FastAPI backend is organized into modules (configuration, routes, services, db, integrations) which promotes maintainability.
• Microservices-like Interaction within the monorepo: Although housed together, the API layer is clearly segmented from the UI components.
• External API Integration Points: The system uses well-defined external endpoints for voice AI, calendar management, and task/note management.
Relevant Technologies and Frameworks
• Frontend: Next.js 14, React, TailwindCSS
• Backend: FastAPI (Python-based)
• Database: Supabase
• Authentication: Clerk
• External APIs: ElevenLabs Voice AI, Notion API, Google Calendar API
Essential Architectural Elements
• Detail as many architectural components as possible:
• The Next.js “app” folder separated into pages, API routes (if any specific ones exist), and shared components.
• The FastAPI “api” folder with its modules: configuration (calendar_config), database access (supabase), integrations (Notion and Google Calendar), and service layers.
• Be detailed in capturing interactions between modules to show how requests flow through routes, through service layers, and eventually to the database or external APIs.