An open API service indexing awesome lists of open source software.

https://github.com/emveskioja/expense-tracker-backend

Expense tracker with a receipt scanner and a pie chart
https://github.com/emveskioja/expense-tracker-backend

backend-api contributions-welcome crud-operation expense-tracker fullstack h2-database java junit5 mockito open-source pie-chart postgresql react receipt-scanner rest-api restful-api spring-boot spring-boot-test testing unittesting

Last synced: about 2 months ago
JSON representation

Expense tracker with a receipt scanner and a pie chart

Awesome Lists containing this project

README

          

![Java](https://img.shields.io/badge/java-17-red.svg)
![Spring Boot](https://img.shields.io/badge/Spring_Boot-3.0-brightgreen.svg)
![H2 Database](https://img.shields.io/badge/H2-Testing-blue.svg)
![PostgreSQL](https://img.shields.io/badge/PostgreSQL-Production-blue.svg)
![Swagger UI](https://img.shields.io/badge/Swagger_UI-for_API_docs_and_testing-green.svg)
![JUnit](https://img.shields.io/badge/JUnit-5-orange.svg)
![Mockito](https://img.shields.io/badge/Mockito-Testing-yellowgreen.svg)
![Build](https://img.shields.io/badge/build-passing-brightgreen.svg)
![License](https://img.shields.io/badge/license-MIT-blue.svg)
![Stars](https://img.shields.io/github/stars/EMVeskioja/Expense-tracker-backend?style=social)
![Forks](https://img.shields.io/github/forks/EMVeskioja/Expense-tracker-backend?style=social)

# Expense Tracker Backend

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. 💸

## What is This?
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.

### Tech Stack:
- **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.

### Features:
- **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.

### Api Endpoints:
- 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.

### Testing Coverage:
- 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.

### Setup Database:
- Default: H2
- For Production: Switch to PostgreSQL.

### Contribute:
- This project is open-source. Contributions are not just welcome, they're celebrated! 🎉

### Star This Repo
Support the project by starring this repo!

## Contact & Feedback:

[Connect with me on LinkedIn](https://www.linkedin.com/in/elise-marie-veskioja-9b2769312/)