Skip to content

Developer Documentation

Welcome to the Acumen ERP developer documentation. This section contains everything you need to understand, build, and extend the Acumen ERP system.

Getting Started

New to Acumen development? Start here:

  1. Architecture Overview - Understand the system design
  2. Development Setup - Set up your local environment
  3. Development Workflow - Learn our development process
  4. YAML-Driven UI - Master the dynamic UI system

Quick Reference

Running the Application

# Terminal 1: FastAPI Backend (from project root)
python run.py  # Runs on http://localhost:8001

# Terminal 2: Django Backend (from backend/django_app)
python manage.py runserver  # Runs on http://localhost:8000

# Terminal 3: React Frontend (from frontend)
npm start  # Runs on http://localhost:3000

Common Development Commands

# Backend formatting and linting
black .           # Format code
isort .           # Sort imports
flake8 .          # Lint code

# Testing
pytest            # Run all tests
pytest -v         # Verbose output

# Django database migrations
cd backend/django_app
python manage.py makemigrations
python manage.py migrate

API Documentation

  • FastAPI Endpoints

Business logic APIs for ERP operations

FastAPI API

  • Django Endpoints

Authentication and permission APIs

Django API

  • Authentication

JWT tokens and permission system

Auth Guide

  • :material-websocket:{ .lg .middle } WebSockets

Real-time communication endpoints

WebSocket API

Architecture

Understanding the Acumen architecture:

Development Guides

Step-by-step guides for common development tasks:

Guide Description
Adding New Entities Create new business entities
YAML Configuration Configure the UI declaratively
Testing Guide Write and run tests
Deployment Guide Deploy to production

Code Standards

Coding Standards

  • Follow PEP 8 for Python code
  • Use ESLint + Prettier for TypeScript/React
  • Write docstrings for all public functions
  • Include type hints in Python
  • Test coverage should be >80%

Key Technologies

Frontend StackBackend Stack - FastAPIBackend Stack - Django

Framework: React 18
Language: TypeScript
UI Library: Material-UI (MUI)
Forms: React Hook Form
State: React Context + Hooks
Router: React Router v6
Build: Webpack/Vite



Framework: FastAPI
ORM: SQLAlchemy
Validation: Pydantic
Database: PostgreSQL
Async: asyncio + uvicorn
Testing: pytest



Framework: Django 5.2+
ORM: Django ORM
REST: Django REST Framework
Auth: JWT tokens
Admin: Django Admin

Development Environment

Prerequisites

  • Python 3.9+
  • Node.js 16+
  • PostgreSQL 13+ (or SQLite for development)
  • Git

Environment Variables

See backend/django_app/env.example for required environment variables:

# Database
DB_ENGINE=django.db.backends.postgresql
DB_NAME=acumen_db
DB_USER=acumen_user
DB_PASSWORD=your_password
DB_HOST=localhost
DB_PORT=5432

# Django
DJANGO_SECRET_KEY=your-secret-key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1

Need Help?

AI-Assisted Development

AI Documentation

Acumen uses AI-assisted documentation. When you make code changes:

  1. Git hooks detect changes
  2. Claude API analyzes the diff
  3. Draft documentation is generated
  4. Human review and approval
  5. Auto-deployment to this site

Learn more about AI integration →