How sophiaullrich/futureforgeproject works
Project type and purpose
• This is a full-stack, web-based collaboration platform (“Go Bear Career Task Teams”) built on React (frontend) and Node.js/Express (backend), with Firebase (Auth, Firestore/Realtime DB, Cloud Messaging) as the data and identity layer. It’s hosted on Vercel. Its primary goal is to let users form teams, assign tasks, track progress, and earn gamified rewards.
File structure
• Top-level directories:
• frontend – React app, user interface, client-side routing, Firebase JS SDK.
• backend – Express server, REST endpoints for chat, dashboard, profile, tasks, notifications, rewards; uses Firebase Admin SDK.
• Config files: .env (secrets), vercel.json (deployment), package.json (dependencies), .gitignore
• Patterns: clear separation of concerns (API controllers, routes, services), chat uses a dedicated server module (chatServer.js), notifications routed through notification.service.js.
README
• Confirms React + Node.js/Express + Firebase stack.
• Mentions system architecture: “Frontend (Client), Backend (Server), Database.”
a. Main components
• User Devices (Web browsers on desktop/mobile)
• Vercel CDN & Edge Network (serves the React SPA)
• Frontend Application (React)
• Backend API Server (Node.js/Express + WebSocket)
• Firebase Services:
– Firebase Authentication
– Firestore & Realtime Database
– Firebase Cloud Messaging (FCM)
• External Dependencies (optional monitoring/logging)
b. Relationships & interactions
1. User → Vercel CDN (HTTPS GET) → React SPA
2. React SPA → Firebase Auth (JS SDK over TLS) for sign-in, token issuance
3. React SPA → Firestore/Realtime DB (JS SDK over TLS) for real-time data reads/writes (tasks, teams, rewards)
4. React SPA → Backend REST endpoints (HTTPS) for operations requiring server logic (profile, dashboard, notifications, rewards)
5. React SPA → WebSocket to Backend ChatServer for real-time team chat
6. Backend Server → Firebase Admin SDK → Firestore/Realtime DB (secure internal traffic)
7. Backend Server → Firebase Cloud Messaging API (to push notifications to clients)
c. Architectural patterns & principles
• Separation of concerns:
• UI & client logic (React) vs. server logic (Express controllers/services)
• Real-time communication (WebSocket) isolated from RESTful endpoints
• Firebase SDK on client, Admin SDK on server (principle of least privilege)
• Scalability via Vercel’s serverless functions / Edge network
• Security: HTTPS everywhere, JWT tokens from Firebase Auth, middleware authentication in Express
d. Key technologies & frameworks
• React, React Router, React Context (AuthContext)
• Express.js, socket.io (assumed)
• Firebase: Authentication, Firestore, Realtime DB, Cloud Messaging
• Hosting: Vercel (frontend & backend)