Expense Tracker is a full-stack application that allows users to track their expenses effortlessly. The backend is built with Node.js, Express, MongoDB, and GraphQL, while the frontend is built with React and Tailwind CSS.
- User authentication with Passport.js
- CRUD operations for transactions
- Categorized expense tracking
- Visual representation of expenses using charts
- Responsive design
📂 Project Root
├── 📄 .env
├── 📄 .gitignore
├── 📂 backend
│ ├── 📄 corn.js
│ ├── 📂 db
│ │ └── 📄 dbConnection.js
│ ├── 📄 index.js
│ ├── 📂 models
│ │ ├── 📄 transaction.model.js
│ │ └── 📄 user.model.js
│ ├── 📂 passport
│ │ └── 📄 passport.config.js
│ ├── 📂 resolvers
│ │ ├── 📄 index.js
│ │ ├── 📄 transaction.resolvers.js
│ │ └── 📄 user.resolvers.js
│ └── 📂 typeDefs
│ ├── 📄 index.js
│ ├── 📄 transaction.typeDef.js
│ └── 📄 user.typeDef.js
├── 📂 frontend
│ ├── 📄 .env
│ ├── 📄 .gitignore
│ ├── 📄 eslint.config.js
│ ├── 📄 index.html
│ ├── 📄 package.json
│ ├── 📄 postcss.config.js
│ ├── 📂 public
│ ├── 📄 README.md
│ ├── 📂 src
│ │ ├── 📄 App.css
│ │ ├── 📄 App.jsx
│ │ ├── 📂 assets
│ │ ├── 📂 components
│ │ └── ...
│ ├── 📄 tailwind.config.js
│ └── 📄 vite.config.js
├── 📄 package.json
- Node.js
- MongoDB
-
Clone the repository:
git clone https://github.com/your-username/expense-tracker.git cd expense-tracker -
Install backend dependencies:
npm install
-
Install frontend dependencies:
npm install --prefix frontend
-
Create a .env file in the root directory and add the following environment variables:
MONGO_URI=your_mongodb_uri SESSION_SECRET=your_session_secret BOY_PIC=your_boy_profile_picture_url GIRL_PIC=your_girl_profile_picture_url
-
Create a .env file in the frontend directory and add the following environment variables:
VITE_GRAPHQL_SERVER_URI=http://localhost:4000/graphql VITE_NODE_ENV=development
-
Start the backend server:
npm run dev
-
Start the frontend development server:
npm run dev --prefix frontend
-
Open your browser and navigate to
http://localhost:3000.
- Sign up or log in to your account.
- Add, update, or delete transactions.
- View categorized expense statistics.
Contributions are welcome! Please open an issue or submit a pull request.