How sriya-singh/fixmycity works
Main Components
• Frontend:
• Built with React and Material-UI, organized into UserPages and AuthorityPages.
• Handles functionalities such as location-based reporting (with Google Maps/Places APIs), authentication (using Firebase), and UI for reporting and dashboards.
• Backend API / Web Server:
• Contains services built in Python (Flask, FastAPI) which serve as the main API endpoints.
• Likely acting as an API gateway to route various requests from the frontend.
• AI/ML Microservices:
• Comment Summarization Service (located in the "comment_summary" folder), which uses Flask.
• Sentiment Analysis Service (in the "sentiment_analysis" folder), which incorporates Botpress elements and deep learning components.
• Similarity Model Service (in the "similarity_model" folder), which uses SentenceTransformers and related NLP libraries to avoid duplicate reports.
• Gemini Chatbot Service (in the "gemini_chatbot" folder) for conversational AI, using Gradio for interactivity.
• Data Storage & External Services:
• Firebase Firestore stores issues, user details, and other data.
• Firebase Storage is used for media file uploads.
• Firebase Authentication manages user sessions and security.
• External APIs like Google Maps, Geocoding, and SuperBase for additional functionalities.
• Deployment and containerization (Docker, Render, etc.) are also part of the ecosystem.
Relationships and Interactions
• The Frontend interacts via HTTP requests (using Axios/Fetch) with the Backend API.
• The API backend then routes requests to the various microservices (comment summarization, sentiment analysis, similarity checks, chatbot responses) depending on the request type.
• Data flows from the frontend to authentication servers (Firebase Auth) ensuring secure access.
• Media uploads and other files are sent to Firebase Storage.
• AI/ML services may exchange data (for instance, sentiment analysis results or similarity score outputs) with the backend or directly signal the frontend’s dashboard.
Architectural Patterns and Design Principles
• Modular Microservices: Each AI/ML component is implemented in its own directory with a self-contained setup, making it easier to scale or update independently.
• API Gateway Pattern: Although multiple backend services exist, they likely integrate under a combined API layer for the frontend.
• Distributed Architecture: Given the use of separate deployments (e.g., Render, Docker), illustrate boundaries between deployment containers and external service integrations.
Incorporate Relevant Technologies
• Frontend: React.js, Material-UI, Firebase Authentication, Google Maps/Places/Geocoding APIs.
• Backend: Flask, FastAPI, Gunicorn, Uvicorn, flask-cors.
• AI/ML: SentenceTransformers, Transformers, PyTorch, Botpress, Gradio, TextBlob, Gemini API.
• Data & Deployment: Firebase Firestore, Firebase Storage, Docker, Render, .env configuration for secrets.
• Lay out the system on a high-level canvas:
• Various microservices and backend subcomponents around the central API.
• On the right or at the bottom, include data storage, authentication, and external services.
• Keep the design flexible enough that as the project evolves (with more microservices or technology updates), additional services can be easily added.