Getting Started for Developers¶
This guide will help you set up your development environment and get started building with Acumen ERP.
Prerequisites¶
Before you begin, ensure you have the following installed:
- Python 3.9+ - Backend runtime
- Node.js 16+ - Frontend build tools
- PostgreSQL 13+ - Production database (SQLite for dev)
- Git - Version control
- VS Code (recommended) - Code editor
Installation Steps¶
1. Clone the Repository¶
git clone https://github.com/DevBitserfGit/adaptive-alpha.git
cd adaptive-alpha
2. Set Up Python Virtual Environment¶
# Create virtual environment
python -m venv venv
# Activate it
source venv/bin/activate # Linux/Mac
# or
venv\Scripts\activate # Windows
3. Install Python Dependencies¶
# Install all backend dependencies
pip install -r requirements.txt
4. Set Up Database¶
PostgreSQL (Production)SQLite (Development)
# Create database
createdb acumen_db
# Run migrations
cd backend/django_app
python manage.py migrate
python manage.py createsuperuser
# Django will auto-create SQLite database
cd backend/django_app
python manage.py migrate
python manage.py createsuperuser
5. Install Frontend Dependencies¶
cd frontend
npm install
6. Configure Environment Variables¶
Create .env files:
# Copy example files
cp backend/django_app/env.example backend/django_app/.env
cp backend/.env.fastapi.example backend/.env.fastapi
Edit the files with your local configuration.
Running the Application¶
You need three terminal windows :
Terminal 1: FastAPI Backend¶
# From project root
source venv/bin/activate
python run.py
Runs on: http://localhost:8001
Terminal 2: Django Backend¶
# From project root
source venv/bin/activate
cd backend/django_app
python manage.py runserver
Runs on: http://localhost:8000
Terminal 3: React Frontend¶
cd frontend
npm start
Runs on: http://localhost:3000
Verify Installation¶
Once all three services are running:
- Open
http://localhost:3000in your browser - You should see the Acumen login page
- Log in with the superuser credentials you created
- Navigate to different modules to verify functionality
Development Tools¶
Recommended VS Code Extensions¶
{
"recommendations": [
"ms-python.python",
"ms-python.vscode-pylance",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"ms-vscode.vscode-typescript-next",
"bradlc.vscode-tailwindcss"
]
}
Code Formatting¶
# Python formatting
black .
isort .
# TypeScript/React formatting
cd frontend
npm run format
Running Tests¶
# Backend tests
pytest
# Frontend tests
cd frontend
npm test
Project Structure¶
acumen/
├── backend/
│ ├── api/ # FastAPI application
│ │ ├── main.py # Entry point
│ │ └── [domain]/ # Business domains
│ └── django_app/ # Django application
│ ├── apps/ # Django apps
│ └── config/ # Settings
├── frontend/
│ ├── public/ # Static assets
│ │ └── navigation/ # YAML configs
│ └── src/
│ ├── components/ # React components
│ └── utils/ # Utilities
└── docs/ # Documentation
Next Steps¶
Now that you have Acumen running locally:
- Understand the Architecture - Learn how it all fits together
- Explore the YAML-Driven UI - Master dynamic UI generation
- Add Your First Entity - Create a new business entity
- Read the API Docs - Learn the API endpoints
Troubleshooting¶
Port Already in Use¶
# Find process using port 3000
lsof -i :3000
# Kill the process
kill -9 <PID>
Database Connection Issues¶
Check your database configuration in .env files and ensure PostgreSQL is running:
# Check PostgreSQL status
sudo systemctl status postgresql
# Start PostgreSQL
sudo systemctl start postgresql
Module Not Found Errors¶
Ensure your virtual environment is activated:
which python # Should point to venv/bin/python
Getting Help¶
- Stuck? Check troubleshooting guide
- Found a bug? Open an issue
- Questions? Ask in GitHub Discussions