How lambdaiith/dashboard works
Project Purpose & Type
• The IITH Dashboard is an open-source campus management platform. It provides multiple services including cab sharing, mess menu, bus schedules, lost and found, timetable management, and more.
• The README and file tree indicate that it’s a full-stack application with a multi-component backend rather than a single monolithic backend. There are distinct implementations in Go (“backend-go”) and Python FastAPI (“backend/backend”), in addition to a Flutter-based frontend supporting Android, iOS, web, and desktop.
File Structure & Architectural Style
• Frontend: The “frontend” directory shows a well-structured Flutter project with platform-specific folders (android, ios, web, windows, macos, linux). It includes dart files (screens, models, widgets, services) suggesting an MVVM or MVC-inspired organization.
• Backend:
• The “backend-go” directory implements a Go-based API with components like controllers, routers, middleware, DB interactions, helpers, and email templates. This indicates an MVC-like pattern.
• The “backend/backend” directory seems to implement a Python FastAPI server with routes, controllers, models, queries, and utility scripts. This backend is explicitly mentioned in the README installation section.
• Additional Documentation: Backend-docs provides API usage details for features like Cabshare and Lost and Found.
• There are SQL initialization scripts and job scripts (clear_lost_found_data, menu_scraper, etc.) that hint at scheduled tasks and supporting DB operations.
• Configuration files, deployment scripts (.github workflows, etc.), and environment files indicate clear separation of concerns in development, testing, and deployment.
Main Components
A. Frontend:
• Flutter app which is cross-platform (Android, iOS, Web, Desktop).
• UI components (screens, widgets) that interface with backend APIs.
• Service layers for analytics, API communications, notifications, etc.
B. Backend Services:
• Python FastAPI Server:
• Routes handling incoming REST API requests (authentication, cab sharing, lost and found, mess menus, etc.).
• Controllers and business logic for user management and campus features.
• External service integration endpoints (notifications, external data scraping, possibly Firebase as indicated in configuration).
• Go-based API Service:
• Controllers, routers, and database helpers for similar functionalities.
• Middleware (authentication protection) and templating features for notification emails.
C. Database & Persistence:
• SQL database (not explicitly named but referenced by SQL init scripts and DB helper files).
• Possibly cloud storage (AWS S3 is indicated via S3 helper in Go).
D. External Services & Utilities:
• External authentication (token management, cookie handling).
• Notification services (FCM and email templates).
• Scheduled job scripts (scraping, clear-lost_found data).
• Other integrations like Firebase (based on frontend Firebase config).
Relationships and Interactions
• The Flutter frontend communicates with backend API endpoints (over HTTP/REST).
• Both backend implementations expose endpoints that the client apps call.
• The backend services interact with the database for persistence.
• Utility modules in the backend interact with external services (email systems, AWS S3, Firebase notifications, etc.).
• Scheduled job scripts and external services periodically interact with the database and backend services to keep data updated.
• Client requests flow from frontend to backend.
• Backend-to-database interactions.
• Backend-to-external services integrations.
Architectural Patterns / Design Principles
• Separation of Concerns: Clearly separated layers for UI (frontend), API (backend with controllers/routes), and data persistence (database).
• Use of MVC-like patterns in both Go and Python backends.
• Microservice-like segmentation if both backend implementations provide similar but independent functionality.
• Clear middleware for security (authentication, cookies, JWT) and helpers for code reuse.
Technology Stack to Highlight
• Flutter (for cross-platform mobile/web/desktop development).
• Python (FastAPI) and Go (with an MVC-like organization) for backend services.
• SQL Database for persistence.
• External services: AWS S3 (for storage), Firebase (for notifications), and FCM.
• DevOps: GitHub workflows for CI/CD, configuration management.