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:
- Architecture Overview - Understand the system design
- Development Setup - Set up your local environment
- Development Workflow - Learn our development process
- 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
- Django Endpoints
Authentication and permission APIs
- Authentication
JWT tokens and permission system
- :material-websocket:{ .lg .middle } WebSockets
Real-time communication endpoints
Architecture¶
Understanding the Acumen architecture:
- System Overview - High-level architecture
- Frontend Architecture - React + TypeScript + YAML
- Backend Architecture - FastAPI + Django dual system
- Database Design - PostgreSQL schema
- YAML-Driven UI - Dynamic component generation
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?¶
- Questions : GitHub Discussions
- Bugs : GitHub Issues
- Documentation : This site!
AI-Assisted Development¶
AI Documentation
Acumen uses AI-assisted documentation. When you make code changes:
- Git hooks detect changes
- Claude API analyzes the diff
- Draft documentation is generated
- Human review and approval
- Auto-deployment to this site