Skip to content

EERP Developer Documentation

EERP is an open-source, modular ERP framework built around three principles: type safety without runtime cost, modular extensibility via WebAssembly, and ERP-domain defaults baked into every layer.

This documentation is written for developers joining the project. It explains not just what the code does, but why it was built this way.


What EERP is

EERP is a framework, not an application. Its job is to provide a runtime and a set of contracts against which independent ERP modules (inventory, CRM, accounting, HR, etc.) are developed and loaded. The core never changes when you add a business feature; you ship a new WASM module.

graph TD
    subgraph Core Runtime
        DB[(PostgreSQL)]
        ORM[ORM Layer]
        ML[Module Loader]
        HTTP[HTTP Server]
        CONFIG[Configuration]
    end

    subgraph WASM Modules
        CRM[CRM Module]
        INV[Inventory Module]
        ACC[Accounting Module]
    end

    subgraph Frontend
        FE[SvelteKit SPA]
    end

    FE -->|REST / JSON| HTTP
    HTTP --> ORM
    ORM --> DB
    ML -->|instantiates| CRM
    ML -->|instantiates| INV
    ML -->|instantiates| ACC
    CRM -->|migration protocol| DB
    INV -->|migration protocol| DB

Stack at a Glance

Layer Technology Why
Backend Go 1.26 Static binaries, excellent concurrency, strong type system
ORM Custom (pgx v5) Zero reflection at query time, ERP-specific features
Modules Rust → WASM Language-agnostic, sandboxed, independent deployability
Database PostgreSQL 18 Mature, feature-rich, excellent Go driver ecosystem
Frontend SvelteKit 5 + TypeScript Minimal runtime, component-level reactivity, CSR-only

Documentation Map

If you want to… Start here
Run the project for the first time Getting Started
Understand how all the pieces fit Architecture Overview
Work with the database ORM · Database Layer
Build a new business module Creating a Module
Add a new data entity Creating an Entity
Write tests Testing
Understand a design decision ADRs

Repository Layout

eerp/
├── core/                    # Go backend
│   ├── cmd/app/main.go      # Entry point
│   ├── orm/                 # Custom ORM (public API)
│   ├── internal/
│   │   ├── module/          # WASM module loader
│   │   ├── types/           # Shared types (Config, Module, Migration)
│   │   └── common/          # Logger, file utilities, dependency resolver
│   └── modules/
│       └── crm/             # Reference module implementation (Rust)
├── core-front/              # SvelteKit frontend
│   └── src/routes/          # Page routes
├── compose.yml              # PostgreSQL dev environment
├── eerp-config.json         # Runtime configuration
└── Makefile                 # Developer commands