How jago0710/savings-manager-deploy works
Project type and purpose
• This is a single‐page web application (SPA) built with React (via Vite) that helps users manage personal and shared savings, view metrics (income, withdrawals, loans), and collaborate in real time.
• There is no custom backend server—authentication and data persistence are handled via Firebase (Auth + Realtime Database/Firestore). The app is statically hosted (e.g., Vercel).
File structure
• src/
• App.jsx, main.jsx, index.css – SPA entry point and styling
• components/ – UI building blocks (cards, forms, charts)
• pages/ – routed views (Home, Dashboard, Accounts, Loans, Savings, Settings, plus auth pages)
• routes/RoutesOfNavigation.jsx – React Router setup
• context/ & hook/ – global state via Context API and custom hooks (LoginContext, useUser)
• firebase/ – Firebase client wrappers for auth and database
• database/data.js – any local seed data or mock data
• public/ – static assets (images for accounts, loans, dashboard) and landing page
• config: vite.config.js, vercel.json – build and deployment settings
• package.json – dependencies (React, Recharts, Firebase, etc.)
Key insights from README
• Core features: personal & shared savings, real‐time updates among multiple users, loan tracking, metrics/dashboard
• Uses Firebase—requires environment variables for credentials
• Deployed as a static site; runs locally with npm run dev
Main components
a. User’s Web Browser (Client Device)
b. Static Hosting Platform (e.g., Vercel / Netlify) serving:
• index.html + bundled JS/CSS (Vite build output)
• public/assets (images, landing page)
c. React SPA internals:
• React Router (pages & navigation)
• UI Components (cards, tables, forms)
• State Management (Context API, custom hooks)
• Data Visualization (Recharts)
d. Firebase Services (third‐party BaaS):
• Firebase Authentication
• Firebase Database (Firestore or Realtime DB)
e. Developer’s Environment (env vars for Firebase credentials)
Relationships & data flows
• On page load: Browser → Static Hosting → bundles → Boot React SPA
• SPA → Firebase Auth (sign-in/register)
• SPA → Firebase DB for reads/writes (accounts, transactions, loans)
• Real-time listeners push updates back to SPA → UI
• SPA internal: React Router drives which page component renders; Context provides auth/user state to all components; hooks encapsulate data access logic.
Architectural patterns/design principles
• Component-based UI (React)
• SPA with client-side routing (React Router)
• Global state via Context API + custom hooks for separation of concerns
• BaaS (Firebase) to offload auth & data persistence
• Static hosting + CI/CD (via vercel.json) for zero-server deployment
Essential elements to capture
• Client device loading static assets
• React SPA structure (Router, Context, Components)
• Firebase Auth & Database interactions (real-time)
• Deployment environment (static hosting)
• Environment variables injecting Firebase config