The Personal Finance Tracker is an open-source app
designed to help users manage their budgets, incomes, expenses, debts, and savings goals. It provides visual representations, such as pie charts for budget categories and bar charts for comparing budgets versus spending over the last six months. Users can easily search and filter data by month, while the dashboard offers an overview of total budgets, incomes, expenses, and more.
See the video below for a demo of the app:
screen-recording.mp4
Technology | Description |
---|---|
Charts | Chart.js - A simple yet flexible JavaScript charting library for designers and developers. |
Framework | Next.js - A React framework for building server-side rendered and static web applications. |
Backend | Node.js - A JavaScript runtime built on Chrome's V8 JavaScript engine, used for building scalable network applications. |
ORM | Prisma - An open-source ORM for Node.js and TypeScript that helps manage and interact with your database. |
Database | PostgreSQL - A powerful, open-source object-relational database system with a strong reputation for reliability and performance. |
Authentication | Auth.js v5 - A library for handling authentication in JavaScript applications, providing secure and easy-to-use authentication methods. |
Containerization | Docker - A platform for developing, shipping, and running applications in containers, enabling consistent environments across development and production. |
To run this project, you will need to add the following environment variables to your .env
file:
Environment Variable | Description |
---|---|
AUTH_SECRET |
A secret key for authentication. You can generate a secret key by running the command openssl rand -base64 32 in your terminal. Ensure OpenSSL is installed: - macOS/Linux: OpenSSL is usually pre-installed. Verify by running openssl version . - Windows: Install OpenSSL from the OpenSSL website or using Chocolatey with the command choco install openssl . |
AUTH_TRUST_HOST |
Set to true or false to indicate whether to trust the host for authentication. |
POSTGRES_USER |
The PostgreSQL database username. |
POSTGRES_PASSWORD |
The PostgreSQL database password. |
POSTGRES_HOST |
The PostgreSQL database host. Use localhost for local development or the Docker Compose service name postgres . |
POSTGRES_DB |
The PostgreSQL database name. |
POSTGRES_PORT |
The PostgreSQL database port. |
POSTGRES_URL |
The PostgreSQL connection URL, which is constructed using the above variables. |
Caution
Authentication: This is a basic authentication password for testing purposes. For a production-grade application, you should use an authentication provider such as GitHub or any of these providers. The providers should be configured in the auth.config.ts
file.
To test the dashboard, use the following credentials:
- Username:
example@example.com
- Password: AhRX8LioQKpMTg7
To run the app in a Docker container, follow these steps:
- Clone the repository
git clone https://github.com/albdangarcia/personal-finance-tracker.git
- Navigate to the project directory
cd personal-finance-tracker
- Copy the
.env.example
file to.env
and update the environment variables:cp .env.example .env
- Build the Docker image:
docker compose build
- Run the Docker container:
docker compose up
- Open your browser and navigate to
http://localhost:3000
To run the app locally, follow these steps:
- Clone the repository
git clone https://github.com/albdangarcia/personal-finance-tracker.git
- Navigate to the project directory
cd personal-finance-tracker
- Copy the
.env.example
file to.env
and update the environment variables:cp .env.example .env
- Download the official PostgreSQL image from Docker Hub:
docker pull postgres
- Start the PostgreSQL container (This step starts a new PostgreSQL container with the specified password and user):
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
- Install the dependencies:
npm install
- Push the Prisma schema to the database:
npx prisma db push
- Push the Prisma schema to the database:
npx prisma generate
- Seed the database:
npx prisma db seed
- Run the app:
npm run dev
- Import OAuth providers to the login page.
- Show a text message when there is no data to display for the charts.
- Add a settings page to manage user preferences.
- Add more visualizations to the dashboard.
- Implement unit tests with Jest/React Testing Library.
Please follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
Licensed under the MIT license.