Skip to content

sysadev/fees-api

Repository files navigation

Fees & Receipts API

Live Application: Swagger UI
Project Presentation: Download PDF Presentation
Built With: Java 21, Spring Boot 3.2.5, PostgreSQL, Docker


Project Overview

The Fees & Receipts API is a robust financial backend designed for educational institutions. It automates the student invoicing lifecycle, tracks payments with high integrity, and generates legal PDF receipts. The system is built to handle the complexities of bursary management while preventing common data issues like duplicate payments or orphaned invoices.

Database Architecture (ERD)

The system follows a relational schema designed for financial consistency and auditability.

erDiagram
    STUDENTS ||--o{ INVOICES : "has"
    STUDENTS ||--o{ PAYMENTS : "makes"
    INVOICES ||--o{ PAYMENTS : "settled_by"
    STUDENTS ||--o{ ANOMALIES : "reported_on"
    
    STUDENTS {
        string id PK
        string student_number UK
        string name
        string email
        string program
    }
    INVOICES {
        string id PK
        string invoice_number UK
        numeric total_amount
        numeric paid_amount
        string status
        date due_date
    }
    PAYMENTS {
        string id PK
        string reference UK
        string idempotency_key UK
        string method
        numeric amount
        string checksum
    }
    ANOMALIES {
        string id PK
        string type
        string description
        string explanation
    }
Loading

Entity Relationships & Logic

  • Financial Integrity: Invoices are strictly tied to Students. Payments cannot exist without being linked to a valid Invoice and Student.
  • Idempotency: The system utilizes idempotency_key and checksum fields in the Payments table to ensure that network retries or duplicate clicks do not result in double-charging a student.
  • Audit Layer: The Anomalies entity acts as an automated observer, flagging any records that deviate from expected financial logic (e.g., overpayments or unlinked records) for administrative review.

Technology Stack

  • Backend: Java 21 / Spring Boot 3 (Web, JPA, Validation)
  • Database: PostgreSQL (Managed)
  • Migrations: Flyway (Version-controlled schema evolution)
  • Documentation: SpringDoc OpenAPI 2.5 (Swagger UI)
  • Document Engine: Thymeleaf & OpenHTMLtoPDF
  • Infrastructure: Docker & Render CI/CD

Screenshots

Detailed visual evidence of the system in a live state can be found in the /screenshots folder, including:

  • API Responses: Validated JSON payloads from REST endpoints.
  • Database UI: Schema visualization and successful migrations.
  • Live Dashboard: Production status on the Render platform.
  • Sample Receipt: A high-fidelity PDF generated by the system.

Getting Started

  1. Clone the repository.
  2. Configure Environment Variables: Ensure DATABASE_URL is set to your PostgreSQL instance.
  3. Build & Run:
    mvn clean package
    java -jar target/fees-api.jar
  4. Access API Docs: Navigate to /api/swagger-ui.html to interact with the endpoints.

Developed as part of the Fees & Receipts API Project.

About

High performance REST API for Student Finance Management. Built with Java 21 & Spring Boot 3. Features idempotent payment processing, Flyway migrations, and automated PDF receipt generation.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors