Building a Full-Stack Bookkeeping Ledger Using Antigravity

Published: (February 23, 2026 at 08:29 AM EST)
3 min read
Source: Dev.to

Source: Dev.to

Cover image for Building a Full-Stack Bookkeeping Ledger Using Antigravity

I recently built a full‑stack bookkeeping application to help track borrowed money and loan repayments. The goal was to create a secure, practical tool from scratch while gaining hands‑on experience with a modern, decoupled architecture.

The project was developed using Google Antigravity IDE, where I supplied the requirements, reviewed the AI‑generated plan and code, and added suggestions.

The Tech Stack

  • Backend: Java, Spring Boot 3, Spring Data JPA
  • Database: PostgreSQL (hosted on Neon.tech)
  • Frontend: Vanilla JavaScript, HTML, CSS
  • Security: Spring Security 6 with stateless JWTs
  • Deployment: Render (backend) & GitHub Pages (frontend) with GitHub Actions for CI/CD
  • IDE: Google Antigravity

Core Features

1. Partial Repayment Logic

An endpoint allows partial repayments. When a repayment amount is submitted, the backend updates the loan balance. If the balance reaches zero or below, the loan record is automatically deleted; otherwise, the active record is securely updated.

2. Stateless Security and JWTs

Authentication is handled with JSON Web Tokens. Tokens are sent to the client in an HttpOnly cookie, avoiding exposure to XSS attacks.

3. Handling Cross‑Origin Requests

Because the frontend (GitHub Pages) and backend (Render) are on different domains, CORS is configured to accept only JSON payloads and explicitly whitelist the GitHub Pages domain. This allows the browser’s preflight OPTIONS request to neutralize CSRF threats without third‑party cookies.

4. Brute‑Force Protection

Bucket4j is integrated into the authentication flow as an API rate limiter, restricting login attempts to 5 per minute per IP address.

Repository and Deployment

A GitHub Actions pipeline runs JUnit and Mockito integration tests on every push, ensuring stability.

Note: The app may feel slow due to the limited resources of free‑tier deployments.

What Was Implemented

Spring Boot App

A robust REST API built with Java 21 and Gradle.

Database Models

// Borrower
// Fields: name, email, phone

// Loan
// Fields: amount, dateLent, dueDate (exactly 1 month later), status (ACTIVE | REPAID)

Core API Endpoints

  • POST /api/borrowers – create a borrower
  • GET /api/borrowers – list borrowers
  • POST /api/loans – create a loan
  • GET /api/loans – list loans
  • PUT /api/loans/{id}/repay – submit a repayment (partial or full)

Notification Job

A scheduled NotificationService runs daily at 08:00 AM, queries for active loans whose due date is today or earlier, and sends an email notification to a personal Gmail account.

System Architecture Upgrades

  • Interface‑Driven Design: Service layer uses interfaces (BorrowerService, LoanService) for loose coupling.
  • Data Transfer Objects (DTOs): API payloads are represented by BorrowerDto and LoanDto to decouple persistence models from external contracts.

0 views
Back to Blog

Related posts

Read more »

My Developer Portfolio — Umer Azmi

Hi, I'm Umer Azmi, a Frontend Developer and Python Developer from Mumbai, India. Projects and Contributions 👉 https://github.com/UmerAzmihttps://github.com/Ume...