How sinha-19/smart-expense-tracker works
Project type and purpose
• This is a full-stack Single Page Application (SPA) for personal finance management (“Smart Expense Tracker”) built with React + TypeScript on the frontend and Firebase (Auth + Firestore) as a Backend-as-a-Service (BaaS).
• Purpose: Allow users to securely sign up, log in, add/edit/delete transactions, view analytics (charts), and export data, all in real time.
File structure
• src/
• components/ – UI building blocks (auth forms, dashboard cards & charts, transaction form/list, layout, reusable UI bits)
• pages/ – Route targets: DashboardPage, LoginPage, RegisterPage, ProfilePage, TransactionsPage
• contexts/ – React Contexts for Auth, Theme, Transaction state management
• firebase/ – Firebase initialization (Auth & Firestore)
• utils/ & types/ – Formatters, helpers, TypeScript interfaces
• App.tsx & main.tsx – Application entry, global providers, routing (React Router)
• build/, public/, index.html, vite.config.ts – Vite build output and configuration
• firebase.json, .firebaserc, GitHub Actions workflows – Deployment to Firebase Hosting via CI/CD
README for additional insights
• Architecture: Component-driven, Context-based state sharing, real-time CRUD with Firestore, mobile-first & dark mode
• Data model: Firestore “users” collection → per-user “transactions” subcollection
• Tech stack: React, TypeScript, Tailwind CSS, Recharts, React Router, Firebase Auth & Firestore
Detail
• Firestore data model: users → transactions subcollection.
• Authentication flow separately: Sign-in vs. Sign-up → token → app state.
• Deployment artifacts: index.html & build folder served by Firebase Hosting.