Welcome to the backend of the Expense Tracker Full-Stack Project! This robust RESTful API is built with Spring Boot and PostgreSQL, designed meticulously for tracking expenses, scanning receipts, and managing financial records. 💸
This backend handles all the heavy lifting for the Expense Tracker. It's built to endure the demands of precise bookkeepers and budget-savvy users alike.
- Java 17: Modern Java, because we're fancy like that.
- Spring Boot 3: For robust back-end services.
- Spring Data JPA & Spring Validation: Because data matters and so does its integrity.
- H2 Database: For testing without tears.
- PostgreSQL: For production because we're serious about data.
- Swagger UI: For easy testing and beautiful documentation.
- JUnit 5 & Mockito: For making sure everything actually works.
- Full CRUD Operations: Create, Read, Update, Delete — all your expenses are under your control.
- Database Persistence: From H2 in dev to PostgreSQL in production.
- Swagger UI: Auto-generated docs that make testing a breeze.
- Exception Handling: We handle errors gracefully, keeping the backend stable.
- GET /api/expenses: Fetch all the money you've ever spent.
- GET /api/expenses/{id}: Get an expense by ID.
- POST /api/expenses: Confess a new expense.
- PUT /api/expenses/{id}: Update the details of an existing expense.
- DELETE /api/expenses/{id}: Forget an expense ever happened.
- Service Layer Testing: We mock the repositories to test service logic.
- Controller Testing: We use MockMVC to ensure our endpoints are top-notch.
- Integration Testing: Full API behavior validation — nothing gets past us.
- Default: H2
- For Production: Switch to PostgreSQL.
- This project is open-source. Contributions are not just welcome, they're celebrated! 🎉
Support the project by starring this repo!