How montmor/letmeask works
Overall Project Type and Purpose
• This is a full-stack (client-side heavy) application built in ReactJS with TypeScript. It enables users to create “rooms”, ask questions in live sessions, upvote (or “like”) questions, and view prioritized questions. It also has an administrative area for handling room management and moderating questions.
• Firebase plays a major role in backend services including authentication, database (Realtime Database or Firestore as inferred from the rules and firebase.json), and hosting.
File Structure
• Top-level folders include:
• /public: Contains static assets such as HTML, manifest, and robots.txt. This is the public entry point for the app.
• /src: Contains all the React application source code. Inside /src, dedicated subdirectories include:
▸ /components: For reusable UI elements (e.g., Button, Question, RoomCode).
▸ /pages: For application views (AdminRoom, Home, NewRoom, Room) aligning with routing.
▸ /contexts: To setup React Contexts (AuthContext) for state management – likely used for user authentication.
▸ /hooks: Custom hooks (useAuth, useRoom) managing specialized logic.
▸ /services/firebase: Wraps Firebase logic/initialization, likely handling communication with Firebase’s APIs.
▸ /styles and other configuration files (e.g., tsconfig.json) along with testing files.
• There are also CI/CD and hosting setups provided in:
• .github/workflows: For GitHub actions that deploy to Firebase hosting.
• Firebase configuration files (.firebaserc, firebase.json, database.rules.json), pointing to a backend based on Firebase.
Important Architectural Components
a. Frontend Application:
• The React UI with TypeScript, split into Views (pages) and Reusable Components.
• The use of contexts (AuthContext) and hooks (useAuth, useRoom) to manage application state, authentication, and live room data.
b. Firebase Backend:
• Firebase is used for authentication, real-time database operations, and hosting.
• Security rules in database.rules.json and configuration in firebase.json indicate that database security and hosting settings are managed on Firebase.
c. CI/CD Pipeline:
• GitHub workflows are set up to automate deployment to Firebase.
d. Static Assets:
• The public folder provides the entry HTML and manifests, supporting progressive web app features.