Skip to content

tanmayythakare/dailySpend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ธ DailySpend โ€” Personal Finance Tracker

A full-stack web application to track your daily expenses, income, and money lent/borrowed โ€” built with Spring Boot and Angular.


๐Ÿ“– Description

DailySpend is a personal finance tracking app designed to help you take control of your money. Whether you're recording a grocery bill, tracking money you lent to a friend, or monitoring your monthly income, DailySpend keeps it all organized in one place.

The app is built for everyday use โ€” it's simple enough for beginners yet powerful enough to give you real financial insights through charts and reports.

Why does it exist? Most people struggle to keep track of where their money goes. DailySpend solves this by giving you a clean dashboard, smart categorization, and a people ledger so you always know who owes you (and who you owe).


โœจ Features

  • ๐Ÿ” User Authentication โ€” Secure registration and login with JWT tokens
  • ๐Ÿฆ Account Management โ€” Create and manage multiple accounts (Cash, Bank, Credit)
  • ๐Ÿ’ณ Transaction Tracking โ€” Record three types of transactions:
    • Expense โ€” Money you spent
    • Money Given โ€” Money you lent to someone
    • Money Taken โ€” Money you received from someone
  • ๐Ÿ‘ฅ People Ledger โ€” Track balances with individual people (who owes whom)
  • ๐Ÿ—‚๏ธ Categories โ€” Organize expenses with built-in and custom categories
  • ๐Ÿ“Š Reports & Charts โ€” Visual spending trends and category breakdowns
  • ๐Ÿ” Filter & Search โ€” Filter transactions by type, account, and date range
  • ๐Ÿ“ฅ Export to CSV โ€” Download your transaction history
  • ๐Ÿ“ฑ Responsive Design โ€” Works on desktop and mobile

๐Ÿ› ๏ธ Tech Stack

Backend

Technology Purpose
Java 17 Programming language
Spring Boot 3.x Backend framework
Spring Security Authentication & authorization
Spring Data JPA Database access layer
PostgreSQL Primary database
Flyway Database migrations (version control for DB)
JWT (jjwt) Secure token-based authentication
Maven Build tool

Frontend

Technology Purpose
Angular 17 Frontend framework
TypeScript Programming language
Angular Material UI component library
ApexCharts Interactive charts
SCSS Styling

๐Ÿ“‹ Prerequisites

Before you begin, make sure you have the following installed on your computer:

  • Java 17+ โ€” Download and install JDK 17 or higher
  • Node.js 18+ โ€” Includes npm (needed for Angular)
  • PostgreSQL 14+ โ€” The database
  • Git โ€” To clone the project
  • A code editor like VS Code (recommended)

๐Ÿš€ Installation & Setup

Step 1 โ€” Clone the Repository

git clone https://github.com/your-username/dailyspend.git
cd dailyspend

Step 2 โ€” Set Up the Database

  1. Open your PostgreSQL client (e.g., pgAdmin or the terminal).
  2. Create a new database:
CREATE DATABASE dailyspend;

Flyway will automatically create all tables when the backend starts โ€” you don't need to create them manually!


Step 3 โ€” Configure the Backend

  1. Navigate to the backend folder:
cd dailyspend-backend
  1. Create a local configuration file to store your secrets. Create the file:
src/main/resources/application-local.yml
  1. Paste the following content and update the values:
spring:
  datasource:
    url: jdbc:postgresql://localhost:5432/dailyspend
    username: your_postgres_username      # e.g., postgres
    password: your_postgres_password      # e.g., postgres

jwt:
  secret: your_super_secret_key_at_least_32_characters_long
  expiration: 864000000   # 10 days in milliseconds

โš ๏ธ Never commit this file to Git! It's already listed in .gitignore.


Step 4 โ€” Run the Backend

From inside the dailyspend-backend folder, run:

# On Mac/Linux
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

# On Windows
mvnw.cmd spring-boot:run -Dspring-boot.run.profiles=local

You should see the server start on http://localhost:8080

The first run will take a few minutes as Maven downloads all dependencies.


Step 5 โ€” Run the Frontend

Open a new terminal and navigate to the frontend folder:

cd dailyspend-frontend

Install dependencies (first time only):

npm install

Start the development server:

npm start

The app will open at http://localhost:4200 ๐ŸŽ‰


๐Ÿ–ฅ๏ธ Usage

  1. Register โ€” Go to http://localhost:4200/register and create an account.

  2. Login โ€” Sign in with your username and password.

  3. Create an Account โ€” On the Dashboard, add your first financial account (e.g., "My Wallet" โ†’ CASH, "SBI Savings" โ†’ BANK).

  4. Add Transactions โ€” Go to Transactions โ†’ Add Transaction:

    • Choose Expense to record spending
    • Choose Money Given to record money you lent someone
    • Choose Money Taken to record money you received
  5. Manage People โ€” Go to the People section to see balances with each person you've transacted with.

  6. View Reports โ€” Go to Reports to see charts showing your spending trends and category breakdowns.


๐Ÿ“ Folder Structure

dailyspend/
โ”‚
โ”œโ”€โ”€ dailyspend-backend/          # Spring Boot backend
โ”‚   โ”œโ”€โ”€ src/main/java/com/example/dailyspend/
โ”‚   โ”‚   โ”œโ”€โ”€ controller/          # REST API endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ service/             # Business logic
โ”‚   โ”‚   โ”œโ”€โ”€ repository/          # Database queries
โ”‚   โ”‚   โ”œโ”€โ”€ entity/              # Database table models
โ”‚   โ”‚   โ”œโ”€โ”€ dto/                 # Data transfer objects
โ”‚   โ”‚   โ”œโ”€โ”€ config/              # Security & app configuration
โ”‚   โ”‚   โ”œโ”€โ”€ exception/           # Error handling
โ”‚   โ”‚   โ””โ”€โ”€ util/                # Helper utilities
โ”‚   โ”œโ”€โ”€ src/main/resources/
โ”‚   โ”‚   โ”œโ”€โ”€ application.yaml     # Main configuration
โ”‚   โ”‚   โ””โ”€โ”€ db/migration/        # Flyway SQL migration files
โ”‚   โ””โ”€โ”€ pom.xml                  # Maven dependencies
โ”‚
โ”œโ”€โ”€ dailyspend-frontend/         # Angular frontend
โ”‚   โ”œโ”€โ”€ src/app/
โ”‚   โ”‚   โ”œโ”€โ”€ core/                # Services, interceptors, guards
โ”‚   โ”‚   โ”œโ”€โ”€ features/            # Pages (dashboard, transactions, people, reports)
โ”‚   โ”‚   โ”œโ”€โ”€ layout/              # App shell / sidebar
โ”‚   โ”‚   โ”œโ”€โ”€ models/              # TypeScript interfaces
โ”‚   โ”‚   โ””โ”€โ”€ shared/              # Reusable imports
โ”‚   โ”œโ”€โ”€ src/environments/        # Environment configuration
โ”‚   โ””โ”€โ”€ package.json             # Node dependencies
โ”‚
โ””โ”€โ”€ docs/                        # Architecture and rules documentation

๐Ÿ“ธ Screenshots

Screenshots coming soon!

Page Preview
Dashboard Dashboard
Transactions Transactions
People Ledger People
Reports Reports

๐Ÿ”Œ API Overview

The backend exposes a REST API. Here are the main endpoints:

Method Endpoint Description
POST /api/auth/register Register a new user
POST /api/auth/login Login and receive a JWT token
GET /api/v1/accounts List all accounts
POST /api/v1/accounts Create a new account
POST /api/v1/transactions/expense Record an expense
POST /api/v1/transactions/money-given Record money given
POST /api/v1/transactions/money-taken Record money taken
GET /api/v1/transactions/filter Filter transactions with pagination
GET /api/v1/people/with-balances List people with balances
GET /api/v1/reports/monthly Monthly financial summary

All endpoints (except auth) require a Bearer <token> header.


๐Ÿ”ฎ Future Improvements

Here are some features planned for future versions:

  • ๐Ÿ“ง Email notifications for large transactions
  • ๐ŸŒ™ Dark mode support
  • ๐Ÿ“ฑ Mobile app (React Native or Flutter)
  • ๐Ÿ” Recurring transaction support (e.g., monthly rent)
  • ๐Ÿ’ฑ Multi-currency support
  • ๐Ÿ”” Budget alerts when spending exceeds a limit
  • ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Shared accounts for families

๐Ÿค Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository on GitHub
  2. Clone your fork locally:
    git clone https://github.com/your-username/dailyspend.git
  3. Create a new branch for your feature:
    git checkout -b feature/your-feature-name
  4. Make your changes and commit them:
    git commit -m "Add: description of your change"
  5. Push to your fork:
    git push origin feature/your-feature-name
  6. Open a Pull Request on GitHub

Guidelines

  • Follow the existing code style
  • Write clear commit messages
  • Test your changes before submitting
  • For database changes, always add a new Flyway migration file โ€” never edit existing ones
  • Keep pull requests focused on one feature or fix

๐Ÿ› Known Issues / Troubleshooting

"Cannot connect to server" on login โ†’ Make sure the backend is running on port 8080 and PostgreSQL is running.

"Access Denied" errors โ†’ Your JWT token may have expired. Log out and log back in.

Build fails with Java version error โ†’ Make sure you have Java 17 or higher installed. Run java -version to check.

npm install fails โ†’ Try deleting the node_modules folder and running npm install again.


๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.

You are free to use, modify, and distribute this project for personal or commercial use.


๐Ÿ‘ค Author

Tanmay Thakare


Made with โค๏ธ and โ˜• | If you find this project useful, please โญ star the repository!

About

A full-stack personal finance tracker built with Spring Boot, Angular, and PostgreSQL. Track expenses, income, and money lent/borrowed with JWT auth, dynamic reports, and CSV export.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors