Skip to content

Repository files navigation

πŸ’° Gestor de Presupuesto

E2E Tests on Render E2E Tests on Vercel

A full-stack personal finance management application built to practice and demonstrate modern software engineering patterns, advanced backend techniques, and responsive frontend development.

Go Next.js PostgreSQL TypeScript Docker


🎯 Project Purpose

This project serves as a learning playground to practice and implement:

  • Clean Architecture principles in Go
  • Advanced backend patterns (rate limiting, caching, workers, SSE)
  • Modern React patterns with Next.js 14 App Router
  • Real-time notifications with Server-Sent Events
  • Responsive design and mobile-first development
  • Testing strategies (unit, integration, e2e)

✨ Key Features

πŸ“Š Financial Management

  • Transaction Tracking: Income and expense management with categories
  • Account Management: Multiple bank accounts with balance tracking
  • Budget Planning: Category-based budgets with progress tracking
  • Investment Portfolio: Track crypto and stock investments
  • Analytics Dashboard: Visual insights with charts and summaries

πŸ”” Real-Time Notifications

  • Server-Sent Events (SSE) for instant updates
  • Per-user notification streams
  • Notification history with read/unread status
  • Browser notification support

πŸ”„ Recurring Transactions

  • Automated transaction scheduling
  • Background worker for recurring payments
  • Support for daily, weekly, monthly frequencies

πŸ” Security & Data Integrity

  • Row-Level Security (RLS) β€” PostgreSQL enforces data isolation at the database level; application bugs cannot leak cross-user data
  • Financial Audit Trail β€” automatic before/after change tracking on all financial tables via PostgreSQL triggers
  • Refresh Token Rotation β€” dual-token authentication with theft detection; reusing a revoked refresh token revokes all user sessions

πŸ›‘οΈ Admin Backoffice

  • User management with editable table
  • Demo user cleanup automation
  • Batch user updates with confirmation modal

πŸ—οΈ Architecture Overview

Backend Architecture (Clean Architecture)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Frameworks & Drivers                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Gin   β”‚ β”‚PostgreSQLβ”‚ β”‚  Docker  β”‚ β”‚ Zerolog Logger  β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                   Interface Adapters                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚  Handlers   β”‚ β”‚Repositories β”‚ β”‚      Middleware         β”‚β”‚
β”‚  β”‚(Controllers)β”‚ β”‚ (Database)  β”‚ β”‚Auth, RLS, RateLimit,    β”‚β”‚
β”‚  β”‚             β”‚ β”‚             β”‚ β”‚CORS, ErrorHandler       β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                Application Business Rules                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚  Services   β”‚ β”‚   Workers   β”‚ β”‚   Notification SSE      β”‚β”‚
β”‚  β”‚(Use Cases)  β”‚ β”‚(Background) β”‚ β”‚   (Real-time Push)      β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚               Enterprise Business Rules                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚  Entities   β”‚ β”‚Value Objectsβ”‚ β”‚     Validation          β”‚β”‚
β”‚  β”‚User,Account β”‚ β”‚   Money     β”‚ β”‚      Rules              β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Frontend Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Next.js 14 App Router                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                         Pages (RSC)                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚Dashboard β”‚ β”‚Accounts β”‚ β”‚Budgets  β”‚ β”‚ Admin Backoffice β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    Client Components                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ shadcn/ui    β”‚ β”‚  Recharts  β”‚ β”‚  Animated Components  β”‚  β”‚
β”‚  β”‚  Components  β”‚ β”‚   Charts   β”‚ β”‚   (Framer Motion)     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                     State & Data                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚React Query  β”‚ β”‚  Zustand    β”‚ β”‚ SSE Notifications     β”‚  β”‚
β”‚  β”‚(Server Data)β”‚ β”‚(Client State)β”‚ β”‚(Real-time Updates)    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                   Internationalization                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚               next-intl (ES/EN)                         β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”§ Advanced Backend Features

1. Rate Limiting

Configurable rate limiting with multiple strategies:

// Features:
- IP-based rate limiting (default fallback)
- User-based rate limiting (authenticated users)
- Endpoint-specific configurations
- Burst traffic allowance
- IP whitelist support (CIDR notation)
- Automatic cleanup of old entries
- Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining)

2. Background Workers

Scheduled background tasks for maintenance and automation:

Worker Description Interval
Demo Cleanup Removes demo users after 24h Configurable
Transaction Scheduler Processes recurring transactions Hourly

3. In-Memory Cache

High-performance caching layer:

// Capabilities:
- TTL-based expiration
- Automatic cleanup intervals
- Prefix-based deletion
- Full cache flush
- Thread-safe operations

4. Server-Sent Events (SSE)

Real-time notification system:

// Implementation:
- Per-user notification streams
- Automatic stream creation
- Message history persistence
- Read/unread status tracking
- Bulk operations (mark all read, delete all)

5. Observability

Structured logging with Zerolog:

  • Request/response logging middleware
  • Error tracking with stack traces
  • Performance metrics
  • Configurable log levels

6. Row-Level Security (RLS)

PostgreSQL RLS is enforced on all 22 user-owned tables with FORCE ROW LEVEL SECURITY. Each policy checks a transaction-scoped app.current_user_id setting established by RLSMiddleware at the start of every authenticated request. This means even if application code has a bug that omits a WHERE user_id = ? clause, the database still returns only the current user's rows. Background workers use a dedicated database role with BYPASSRLS privilege to operate across all users.

7. Financial Audit Trail

A PostgreSQL trigger function (fn_financial_audit) is attached to eight core financial tables: transactions, account, budgets, investments, savings_goals, loans, certificates, and credit_cards. On every INSERT, UPDATE, or DELETE it captures a full to_jsonb() snapshot of the before and after state into the financial_audit_log table. This provides a tamper-evident record of all financial changes without requiring any application-level code changes.


🎨 Frontend Features

React Server Components (RSC)

Optimized data fetching with Next.js 14:

  • Server-side data loading
  • Streaming with Suspense
  • Minimal client-side JavaScript

Real-Time Updates

SSE integration for instant notifications:

// Using @microsoft/fetch-event-source
- Automatic reconnection
- Bearer token authentication
- Event parsing and state updates

Internationalization (i18n)

Full multi-language support:

  • Spanish (ES) and English (EN)
  • Server-side translations
  • URL-based locale detection

Responsive Design

Mobile-first responsive UI:

  • Collapsible sidebar navigation
  • Icon-only tabs on mobile
  • Fullscreen search modal for mobile
  • Horizontal scroll containment for tables

UI Components

Built with shadcn/ui and Radix:

  • Animated tabs with sliding indicators
  • Data tables with sorting and filtering
  • Toast notifications (Sonner)
  • Form validation (react-hook-form + Zod)

Charts & Visualizations

Multiple chart libraries:

  • Recharts: Line and bar charts
  • Nivo: Pie charts, heatmaps, radar charts
  • Animated counters: Smooth number transitions

πŸ› οΈ Tech Stack

Backend

Technology Purpose
Go 1.21+ Primary language
Gin HTTP framework
PostgreSQL Primary database
SQLite Testing database
JWT Authentication
r3labs/sse Server-Sent Events
go-cache In-memory caching
Zerolog Structured logging
golang-migrate Database migrations
testify Testing framework
go-sqlmock Middleware unit testing

Frontend

Technology Purpose
Next.js 14 React framework (App Router)
TypeScript Type safety
Tailwind CSS Styling
shadcn/ui UI component library
React Query Server state management
Zustand Client state management
next-intl Internationalization
NextAuth Authentication
Framer Motion Animations
Vitest Testing framework

DevOps

Technology Purpose
Docker Containerization
Docker Compose Local development
GitHub Actions CI/CD
Make Build automation

πŸ“ Project Structure

GestorDePresupuesto/
β”œβ”€β”€ BackEnd/                    # Go backend
β”‚   β”œβ”€β”€ cmd/                    # Application entrypoints
β”‚   β”‚   └── api/
β”‚   β”‚       └── bootstrap/      # Dependency injection
β”‚   β”œβ”€β”€ internal/
β”‚   β”‚   β”œβ”€β”€ config/             # Configuration
β”‚   β”‚   β”œβ”€β”€ domain/             # Entities (User, Account, etc.)
β”‚   β”‚   β”œβ”€β”€ services/           # Business logic
β”‚   β”‚   β”œβ”€β”€ platform/
β”‚   β”‚   β”‚   β”œβ”€β”€ cache/          # In-memory cache
β”‚   β”‚   β”‚   β”œβ”€β”€ dto/            # Data Transfer Objects
β”‚   β”‚   β”‚   β”œβ”€β”€ server/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ handler/    # HTTP handlers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ middleware/ # Auth, RateLimit, CORS
β”‚   β”‚   β”‚   β”‚   └── routes/     # Route definitions
β”‚   β”‚   β”‚   β”œβ”€β”€ storage/        # Repository implementations
β”‚   β”‚   β”‚   β”œβ”€β”€ worker/         # Background workers
β”‚   β”‚   β”‚   └── observability/  # Logging
β”‚   β”‚   └── e2e/                # E2E tests
β”‚   β”œβ”€β”€ docs/                   # Documentation
β”‚   └── docker-compose.yaml
β”‚
β”œβ”€β”€ FrontendNextjs/gestor/      # Next.js frontend
β”‚   β”œβ”€β”€ app/                    # App Router pages
β”‚   β”‚   β”œβ”€β”€ (auth)/             # Auth pages (login, register)
β”‚   β”‚   β”œβ”€β”€ admin/              # Admin backoffice
β”‚   β”‚   β”œβ”€β”€ app/                # Main application
β”‚   β”‚   β”‚   β”œβ”€β”€ accounts/
β”‚   β”‚   β”‚   β”œβ”€β”€ budget/
β”‚   β”‚   β”‚   β”œβ”€β”€ transactions/
β”‚   β”‚   β”‚   └── analysis/
β”‚   β”‚   └── api/                # API routes
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ common/             # Shared components
β”‚   β”‚   β”œβ”€β”€ ui/                 # shadcn/ui components
β”‚   β”‚   └── transactions/       # Feature components
β”‚   β”œβ”€β”€ contexts/               # React contexts
β”‚   β”œβ”€β”€ hooks/                  # Custom hooks
β”‚   β”‚   └── queries/            # React Query hooks
β”‚   β”œβ”€β”€ lib/                    # Utilities
β”‚   β”œβ”€β”€ messages/               # i18n translations
β”‚   β”œβ”€β”€ types/                  # TypeScript types
β”‚   └── tests/                  # Unit tests
β”‚
β”œβ”€β”€ e2e-test/                   # E2E test suite
β”œβ”€β”€ Makefile                    # Build commands
└── README.md

πŸš€ Quick Start

Prerequisites

  • Go 1.21+
  • Node.js 18+
  • PostgreSQL 16+ (or Docker)
  • Make

Backend

# Navigate to backend
cd BackEnd

# Start PostgreSQL with Docker
docker-compose up -d

# Run migrations
make migrate

# Start the server (with hot reload)
make dev

Frontend

# Navigate to frontend
cd FrontendNextjs/gestor

# Install dependencies
npm install

# Start development server
npm run dev

Using Makefile (from root)

# Run both backend and frontend checks
make backend-check
make frontend-check

# Run all tests
make test

πŸ“‹ Data Model

erDiagram
    USER ||--o{ ACCOUNT : owns
    USER ||--o{ CATEGORY : creates
    USER ||--o{ BUDGET : sets
    USER ||--o{ TRANSACTION : makes
    USER ||--o{ INVESTMENT : tracks
    USER ||--o{ NOTIFICATION : receives
    
    ACCOUNT ||--o{ TRANSACTION : contains
    CATEGORY ||--o{ TRANSACTION : categorizes
    CATEGORY ||--o{ BUDGET : limits
    
    USER {
        string id PK
        string name
        string last_name
        string email UK
        string password
        string role
        boolean confirmed
        boolean is_demo
        timestamp created_at
        timestamp deleted_at
    }

    ACCOUNT {
        string id PK
        string name
        string bank
        decimal initial_balance
        decimal current_balance
        string user_id FK
    }

    TRANSACTION {
        string id PK
        string name
        string description
        decimal amount
        enum type
        string account_id FK
        string category_id FK
        string user_id FK
    }

    CATEGORY {
        string id PK
        string name
        string icon
        string color
        string user_id FK
    }

    BUDGET {
        string id PK
        decimal amount
        decimal current_amount
        string category_id FK
        string user_id FK
    }
Loading

πŸ§ͺ Testing

Backend Tests

cd BackEnd

# Unit tests
make test

# E2E tests
make test-e2e

# Coverage report
make coverage

Frontend Tests

cd FrontendNextjs/gestor

# Run tests
npm run test

# Type checking
npm run type-check

# Full code quality check
npm run code-quality

πŸ“š Documentation

Detailed documentation available in:


πŸŽ“ Learning Highlights

This project demonstrates:

  1. Clean Architecture - Separation of concerns, dependency inversion
  2. SOLID Principles - Applied throughout the codebase
  3. Repository Pattern - Database abstraction for testability
  4. Middleware Pattern - Authentication, rate limiting, logging
  5. Worker Pattern - Background job processing
  6. SSE Pattern - Real-time event streaming
  7. React Query - Server state management
  8. React Server Components - Next.js 14 App Router patterns
  9. Form Validation - Zod schemas with react-hook-form
  10. Responsive Design - Mobile-first with Tailwind CSS

πŸ“„ License

This project is for learning and demonstration purposes.


Made with ❀️ for learning modern full-stack development

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages