moolah

package module
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 0 Imported by: 0

README ΒΆ

Moolah β€” Household Finance & Investment SaaS

Go Version Build Status codecov Go Report Card

Moolah is a multi-tenant personal finance application built with Go, focusing on simplicity, scalability, and financial integrity. It helps households manage their accounts payable, cash flow, credit card installments, and investment portfolios.

πŸš€ Technical Stack

  • Backend: Go 1.26.1 (Standard library net/http for routing).
  • Database: PostgreSQL (Querying via sqlc).
  • Identity: ULID for all primary keys.
  • Security: PASETO v4 tokens and OTP-only authentication.
  • Infrastructure: Docker & Docker Compose.
  • Linter: golangci-lint.

πŸ—οΈ Project Structure

Following a Pragmatic DDD approach:

  • cmd/api/: Application entry point and DI.
  • internal/domain/: Business logic, entities, and repository interfaces.
  • internal/platform/: Infrastructure implementations (DB, Mailer, Middleware).
  • internal/service/: Domain orchestration and business rules.
  • pkg/: Generic utilities.
  • docs/: Architecture Decision Records (ADRs) and Roadmap.

πŸ› οΈ Development

Prerequisites
  • Go 1.26.1+
  • Docker & Docker Compose
  • golangci-lint
  • sqlc
Getting Started
  1. Clone the repository:

    git clone https://github.com/garnizeh/moolah.git
    cd moolah
    
  2. Configure environment variables:

    Copy the sample environment file and set the required variables:

    cp .env.example .env
    

    Required variables for first-run bootstrap:

    • SYSADMIN_EMAIL: The email address of the first system administrator. This is required to break the OTP bootstrap cycle.
  3. Spin up infrastructure:

    docker-compose up -d
    
  4. Run the application:

    make run
    
Makefile Commands
  • make build: Build the API binary.
  • make test: Run unit tests.
  • make lint: Run the linter.
  • make generate: Generate code from SQL queries using sqlc.
  • make swagger: Generate Swagger documentation.

πŸ§ͺ Testing & API Exploration

Bruno Collection

We use Bruno for API exploration and manual testing. The collection is located in docs/bruno/.

To use the collection:

  1. Install Bruno.
  2. Open Bruno and select "Open Collection".
  3. Navigate to docs/bruno/ and open the folder.
  4. Select the moolah environment (usually local).
  5. Start with the Auth > Request OTP request.
Playbook

See the full API playbook with usage scenarios and ready-to-run curl examples in docs/PLAYBOOK.md.

Swagger UI

API documentation is also available via Swagger UI when the server is running:

πŸ“ˆ Roadmap

See docs/ROADMAP.md for the detailed project roadmap and current status.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
Package api Code generated by swaggo/swag.
Package api Code generated by swaggo/swag.
cmd
api command
internal
config
Package config provides functionality to load and manage application configuration from environment variables.
Package config provides functionality to load and manage application configuration from environment variables.
handler
Package handler provides HTTP handlers for the application.
Package handler provides HTTP handlers for the application.
platform/repository
Package repository provides implementations of repositories for the domain layer.
Package repository provides implementations of repositories for the domain layer.
server
Package server implements the HTTP server for the Moolah API.
Package server implements the HTTP server for the Moolah API.
pkg
logger
Package logger provides a thin wrapper around log/slog for structured logging.
Package logger provides a thin wrapper around log/slog for structured logging.
otp
ulid
Package ulid provides a thread-safe monotonic ULID generator.
Package ulid provides a thread-safe monotonic ULID generator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL