Skip to content

yuan6636/expense-tracker

Repository files navigation

Expense Tracker

This project is designed for recording personal expenses. Users can search, add, edit, and delete expenses, categorize expenses, and check the total expenses.

Features

  1. Users can register an account
    (1). After registration, users can log in/out
    (2). Only logged-in users can use the project services.

  2. Log in with a Google account, and upon successful verification, users are directed to their personal expense list page.

  3. View the list of expenses created by the user and the total amount.

  4. Able to categorize expenses by year, month, and category , and display the total expense amount.

  5. Able to view a pie chart showing the proportion of each category in the total expenses.

  6. Add, Edit, and Delete an expense.

System Architecture

System Architecture

Development Environment

Prerequisites

Start the Project Locally

  1. Open a terminal and run git clone to download the project to your computer
$ git clone https://github.com/yuan6636/expense-tracker.git
  1. Navigate to the expense-tracker folder
$ cd expense-tracker
  1. Install packages with npm
$ npm install
  1. Ensure config.js has the correct password and database settings
"development": {
    "username": "root",
    "password": "password",
    "database": "record",
    "host": "127.0.0.1",
    "dialect": "mysql"
  }
  1. Set up the database
$ npm run dbsetup
$ npm run seed
  1. Obtain GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET from the Google API Console

  2. Create a .env file, and populate it with tne contents from .env.example. Set SESSION_SECRET to a value of your choice, and MYSQL_ROOT_PASSWORD to the password you set for MySQL.

SESSION_SECRET= <Your session secret>
GOOGLE_CLIENT_ID= <Your google client ID> 
GOOGLE_CLIENT_SECRET= <Your google client secret>
MYSQL_ROOT_PASSWORD= <Your mysql server password>
  1. Run app.js
$ npm run dev
  1. If the terminal displays the following message, it means server has started successfully
App is running on localhost:3000
  1. Open your browser and go to http://localhost:3000 to use the project

  2. To stop the server, press ctrl + C in the terminal

Testing

  • Run the following command to perform tests
npm run test

Demo

expense-tracker.mp4

Screenshots

Login Register Expense List Add Expense

Contributors

Developer: yuan6636

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors