Skip to content

Repository files navigation

Chiro - Personal Finance Manager (Backend)

Chiro is a robust API built with Spring Boot for personal finance management, allowing users to track their income, expenses, and categorize transactions efficiently.


Leer en Español 🇪🇸

🛠 Technologies Used

Java
Spring Boot
Spring Security
JWT
PostgreSQL
Hibernate
Lombok


🚀 API Endpoints & Postman Testing

The base URL for all endpoints is: http://localhost:8080/api/v1


🔐 Authentication (/auth)

Method Endpoint Description Request Body (JSON)
POST /auth/register Register a new user { "username": "user", "password": "123", "confirmPassword": "123" }
POST /auth/login User login { "username": "user", "password": "123" }
POST /auth/refresh-token Refresh access token Sends refreshToken cookie automatically.
POST /auth/logout User logout Clears browser cookies.
GET /auth/me Get current user info Requires authentication (accessToken cookie).

📂 Categories (/category)

Method Endpoint Description Request Body (JSON)
GET /category List user categories N/A
POST /category Create a new category { "name": "Food", "type": "EXPENSE" }

💸 Transactions (/transaction)

Method Endpoint Description Request Body / Params
GET /transaction/all List all transactions N/A
GET /transaction/filter Filter by type (INCOME or EXPENSE) ?type=INCOME
POST /transaction Create a transaction { "categoryId": 1, "amount": 50.0, "description": "Lunch", "transactionDate": "2023-10-27" }

📝 How to Test in Postman

  1. The application uses HttpOnly Cookies for authentication (accessToken and refreshToken).
  2. Send a POST request to /auth/register or /auth/login.
  3. Check Postman cookies tab to confirm tokens are stored.
  4. Use protected endpoints normally; cookies are sent automatically.

📋 Pending Tasks

Functionality / Pending Task Responsible Status
Implementation of controllers for the Dashboard module Code-D-Garcia 🚧 In progress
Endpoint GET /category/{id} en CategoryController Code-D-Garcia ✅ Check
Endpoint PUT /category/{id} en CategoryController Code-D-Garcia ✅ Check
Endpoint DELETE /category/{id} en CategoryController Code-D-Garcia ✅ Check
GET /transaction/{id} endpoint in TransactionController InPopularDev ✅ Check
PUT /transaction/{id} endpoint in TransactionController InPopularDev ✅ Check
DELETE /transaction/{id} endpoint in TransactionController InPopularDev ✅ Check
Refactoring CategoryController to use CategoryService instead of direct implementation [ ] ⏳ Pending
Global error handling (orElseThrow customization) [ ] ⏳ Pending

🔮 Future Improvements

  • Dynamic Dashboard module with analytics and charts
  • Recurring transactions automation
  • Export data to PDF/CSV
  • Budget system per category with alerts
  • Email notifications for financial insights

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages