Skip to content

AlberteMB/EqualPay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💸 EqualPay

EqualPay is a collaborative expense-sharing web application inspired by Splitwise.
It allows users to create groups, log shared expenses, and track individual balances in a transparent and intuitive way.


🧠 Project Vision

The goal of EqualPay is to provide a simple yet extensible foundation for managing shared expenses between friends, roommates, or colleagues.
The app is built following clean architecture principles, using Spring Boot, Thymeleaf, and PostgreSQL — while exploring a modern AI-assisted development workflow.


🧩 Tech Stack

Layer Technology
Backend Java 21, Spring Boot 3
Frontend (views) Thymeleaf, HTML5, CSS3
Database PostgreSQL (Docker Compose)
ORM Spring Data JPA
Migrations Flyway (pinned: 11.14.0)
Build Tool Maven
Testing JUnit 5, Mockito, H2 (tests)
IDE Cursor (AI-powered code editor)

🤖 AI-Assisted Development Workflow

EqualPay was developed using an AI-driven workflow that combines:

  • ChatGPT (GPT-5): conceptual design, UML modeling, and architecture decisions.
  • Cursor IDE Agent: code generation, refactoring, and tests inside the project.
  • Vibe Coding principles: deep collaboration between developer and AI to accelerate clean, maintainable code.

🧩 Process Overview

  1. Ideation and UML Design

    • High-level entity and relationship modeling discussed and refined.
    • Mermaid-based UML to visualize system structure and iterate on the domain model.
  2. Project Setup

    • Spring Boot base with structured packages:
      com.amb.EqualPay
        ├── model        # JPA entities
        ├── repository   # Spring Data JPA interfaces
        ├── service      # Business logic (@Transactional)
        ├── controller   # REST endpoints (if needed)
        ├── web          # MVC controllers returning Thymeleaf views
        ├── dto          # Data Transfer Objects
        ├── exception    # Custom exceptions and global handler
        └── config       # Configuration classes
      
  3. Code Generation with Cursor

    • Entities, repositories, services, and initial tests authored with AI assistance.
    • Each class includes short explanatory comments for clarity.
    • Thymeleaf templates added for a minimal but functional UI.
  4. Manual Refinement

    • Consistent naming, validation annotations, and constructor injection.
    • Flyway migrations curated and versioned.

🗄️ Database & Migrations

  • Local DB via Docker Compose (compose.yaml → PostgreSQL service).
  • Flyway migrations:
    • V1__init.sql (baseline schema)
    • V2__model_alignment.sql (aligns schema with evolved domain model)
  • H2 is used for test slices to keep tests fast and isolated.

🚦 Getting Started

Prerequisites: Docker, Java 21, Maven.

# 1) Start PostgreSQL locally
docker compose up -d postgres

# 2) Run the app
./mvnw spring-boot:run

# (optional) Run tests
./mvnw test

App runs on http://localhost:8080/.


🔐 Security (future milestone)

Upcoming after MVP:

  • Spring Security with BCrypt password hashing.
  • Role-based access control.
  • Potential OAuth2 / external IdP integration.

🧪 Testing Strategy

  • Unit tests for repositories and services (Mockito for service logic).
  • Flyway-backed schema for realistic persistence behavior; H2 used for test profile.
  • Integration tests (planned) to exercise REST/MVC endpoints and database with the application context.

📚 Learning Focus

Part of a Vibe Coding learning journey — exploring how human–AI collaboration enhances backend development.
The focus is on:

  • Designing structured prompts for AI code generation.
  • Supervising, validating, and refining AI-written code.
  • Balancing productivity with clean architecture and testing.

🚀 Roadmap

  • Define domain model and UML diagram
  • Generate entities, repositories, and services
  • Integrate Thymeleaf for UI
  • Align schema via Flyway V1/V2 migrations
  • Add security with Spring Security
  • Implement group balance calculations
  • Deploy MVP online (Render / Railway)

🧾 License

Intended license: MIT License. A LICENSE file can be added to formalize it.


Developer: AlberteMB
Project: EqualPay
Approach: Vibe Coding + AI-Assisted Development 🧠⚙️

About

Web app to share and split payments

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published