Budget Tracker is a web application that helps users track their income, expenses, and savings. It features real-time data visualization, authentication via Firebase, and a backend powered by Node.js, GraphQL, MongoDB, and Redis for optimal performance.
- User Authentication (Google Sign-In, Email/Password via Firebase)
- Transaction Management (Income, Expenses, Savings)
- GraphQL API for fetching and modifying data
- Redux for Global State Management
- Redis Caching for Improved Performance
- Real-Time Updates with Apollo Client
- Responsive UI using TailwindCSS
- React + Vite
- Apollo Client (GraphQL)
- Firebase Authentication
- Redux Toolkit
- Tailwind CSS
- Node.js + Express.js
- GraphQL (Apollo Server)
- MongoDB + Mongoose
- Redis (Caching Layer)
- Firebase Admin SDK (Authentication)
budget-tracker/
├── backend/ # Backend API (Node.js + GraphQL + MongoDB)
│ ├── config/ # Configuration files (MongoDB, Firebase, Redis)
│ ├── graphql/ # GraphQL schema and resolvers
│ ├── models/ # Mongoose Models
│ ├── routes/ # API routes (if using REST alongside GraphQL)
│ ├── middlewares/ # Middleware (Auth, Logging, etc.)
│ ├── server.ts # Main server entry point
│ ├── package.json # Backend dependencies
│ └── .env # Backend environment variables (ignored in Git)
│
├── frontend/ # React Frontend (Vite + Apollo Client)
│ ├── public/ # Static assets
│ ├── src/ # Source code
│ │ ├── assets/ # Images, icons, etc.
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components (Dashboard, Login, etc.)
│ │ ├── graphql/ # Apollo Client GraphQL Queries & Mutations
│ │ ├── store/ # Redux store (State Management)
│ │ ├── firebase-config.ts # Firebase configuration
│ │ ├── main.tsx # React app entry point
│ ├── config/ # Config files (Tailwind, Vite, etc.)
│ ├── package.json # Frontend dependencies
│ └── .env # Frontend environment variables (ignored in Git)
│
├── README.md # Documentation
└── .gitignore # Ignore unnecessary files
git clone https://github.com/bigyaa/Budget-Tracker.git
cd Budget-Tracker
npm run dev # Runs both frontend and backendIf you want to run them separately, follow the steps below.
cd backend
npm install
cp .env.example .env # Add MongoDB & Firebase credentials
redis-server # Start Redis server to cache data
npm run build # Build the backend
npm run dev # Start the backend servercd frontend
npm install
cp .env.example .env # Add Firebase credentials
npm run dev # Start the frontend- Backend runs on
http://localhost:5000 - Frontend runs on
http://localhost:5173 - Open
http://localhost:5173in your browser to start using the app.
Create a .env file in both frontend and backend, and configure:
PORT=5000
MONGO_URI=mongodb+srv://your-username:your-password@cluster.mongodb.net/budget_tracker
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
FIREBASE_CREDENTIALS=./config/firebaseServiceAccountKey.json
VITE_FIREBASE_API_KEY=your-firebase-api-key
VITE_FIREBASE_AUTH_DOMAIN=your-firebase-auth-domain
VITE_FIREBASE_PROJECT_ID=your-firebase-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-firebase-storage-bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your-firebase-messaging-sender-id
VITE_FIREBASE_APP_ID=your-firebase-app-id
VITE_FIREBASE_MEASUREMENT_ID=your-firebase-measurement-id
query {
getTransactions(userId: "firebase-user-id") {
id
type
description
amount
date
}
}mutation {
addTransaction(userId: "firebase-user-id", type: "income", description: "Salary", amount: 5000) {
id
type
description
amount
}
}- 📊 More Financial Reports & Charts
- 🔔 Push Notifications for Expenses
- 🌎 Multi-Currency Support
- Fork the repository
- Create a new branch (
git checkout -b feature-name) - Commit changes (
git commit -m 'Add feature') - Push to the branch (
git push origin feature-name) - Open a Pull Request
This project is MIT Licensed and open-source. Feel free to make changes and contribute!
Built with 💗 by Bigya