"WalletWatch" is an expense tracker web-application built with Next.js and Express. The data is persisted by connecting to a MongoDB database. Material-UI was used to create the user interface, with Redux Toolkit employed to manage state.
Live link here: https://expenseonrails.herokuapp.com/
"@material-ui/core": "^4.11.3",
"@material-ui/icons": "^4.11.2",
"@reduxjs/toolkit": "^1.5.0",
"chart.js": "^2.9.4",
"fontsource-roboto": "^4.0.0",
"next": "10.0.6",
"react": "17.0.1",
"react-chartjs-2": "^2.11.1",
"react-dom": "17.0.1",
"react-redux": "^7.2.2",
"redux-undo": "^1.0.1"
{
email: { type: String, required: true, unique: true },
password: { type: String, required: true },
account: { type: Schema.Types.ObjectId, ref: 'Account', required: true },
firstName: { type: String },
lastName: { type: String },
}
{
categories: { type: [String], required: true, default: defaultCategories },
balance: { type: Number, required: true, default: 0 },
budget: { type: Number, required: true, default: 0 },
expenses: { type: Number, required: true, default: 0 },
transactions: [
{ type: Schema.Types.ObjectId, ref: 'Transaction', required: true },
],
user: { type: Schema.Types.ObjectId, ref: 'User', required: true },
}
{
account: { type: Schema.Types.ObjectId, ref: 'Account', required: true },
amount: { type: Number, required: true },
category: { type: String, required: true },
date: { type: Date, required: true },
description: { type: String },
title: { type: String, required: true },
type: { type: String, required: true, enum: ['expense', 'revenue'] },
}
GET /users/
— returns a user based on Bearer token in HeaderGET /users/:id
— returns a user based on idPUT /users/:id
— updates a user in the database
GET /accounts/:id
— returns account info based on idPUT /accounts/:id
— updates account info in the database
GET /transactions/
— returns all transaction info for given user from Bearer token in HeaderPOST /transactions/
— create a new transaction for the the current user in the databaseGET /transactions/:id
— returns single transaction info from idPUT /transactions/:id
— updates account info in the databaseDELETE /transactions/:id
— deletes transaction from the database
POST /register
— registers a new user and account in the databasePOST /login
— authenticate user and return a JWTDELETE /delete
— delete a user and their account from the database/ping
— ANY HTTP method/verb; used to test whether JWT token is valid and user is logged in
"bcryptjs": "^2.4.3",
"compression": "^1.7.4",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"debug": "~2.6.9",
"dotenv": "^8.2.0",
"express": "~4.16.1",
"express-validator": "^6.9.2",
"helmet": "^4.4.1",
"http-errors": "^1.6.3",
"jsonwebtoken": "^8.5.1",
"mongoose": "^5.11.15",
"morgan": "~1.9.1",
"passport": "^0.4.1",
"passport-jwt": "^4.0.0",
"passport-local": "^1.0.0"
Currently, the application is not deployed or hosted on the web. To use it, you must install it locally. Firstly, ensure you have Node and npm installed on your system. Then, follow the following steps:
- Download / clone the repository.
- cd to frontend and backend directories and run
npm install
to install the respective dependencies. - Create a MongoDB database and set up a .env file in the backend directory with the following values:
PORT=8000
NODE_ENV=development
MONGO_DB=<YOUR_MONGODB_DATABASE_URI>
MONGO_USER=<YOUR_MONGODB_DATABASE_ADMIN_USERNAME>
MONGO_PASSWORD=<YOUR_MONGODB_DATABASE_ADMIN_PASSWORD>
MONGO_DBNAME=<YOUR_MONGODB_DATABASE_NAME>
JWT_SECRET=<YOUR_JWT_SECRET>
- To run the application in development, cd back to the root directory and run the command
npm run dev
to run the app in development mode. - To run the application in production, cd back to the root directory and run
npm run build
to compile the applications, and then runnpm start
. - The frontend should now be running on http://localhost:3000/ and the API on http://localhost:8000/!
- Implement undo / redo for redux state
- Make more graphs in dashboard for separate expense / revenue transactions
- Implement account balance value and create a graph for it
- Add snackbars and loading circles for account page