- PostHog: User analytics
- Sentry: Error tracking and performance monitoring
- Hetzner Object Storage: S3-compatible block storage for media files
- Redis and Celery: Background task processing and scheduling
APECS is a Django-based web application with modern frontend tooling, asynchronous task processing, and cloud integrations. It requires multiple background services to run, e.g. PostgreSQL and Redis.
Before you begin, ensure you have the following installed on your system:
- Python 3.13
- Poetry for Python environment management
- Node.js 16+ and npm for JavaScript dependencies
- Docker to run background services, e.g. PostgreSQL and Redis
git clone <repository-url> cd apecs
Install Poetry if not already available:
pip install poetry
Install Python dependencies:
poetry install
Install JavaScript dependencies:
npm install
Run database migrations:
poetry run dotenv run python manage.py migrate
Create a superuser:
poetry run dotenv run python manage.py createsuperuser
Load fixtures (if available):
poetry run dotenv run python manage.py loaddata fixture.json
You need to run multiple processes concurrently. It's recommended to use separate terminal windows/tabs for each:
poetry run dotenv run python manage.py runserver
The application will be available at: http://localhost:8000
Use npm run watch:css
to make tailwindcss watch for changes:
npx tailwindcss -i ./apecs/static/src/style.css -o ./apecs/static/dist/style.css --minify --watch
With npm run dev
you can serve frontend assets with webpack:
npx webpack serve --mode development
Start services for Redis, Celery and PostgreSQL in the background:
docker-compose up -d
#Create new migrations
poetry run dotenv run python manage.py makemigrations
#Apply migrations
poetry run dotenv run python manage.py migrate
#Create superuser
poetry run dotenv run python manage.py createsuperuser
#Django shell
poetry run dotenv run python manage.py shell
#Run tests
poetry run dotenv run python manage.py test
#Create a new Django app
poetry run dotenv run python manage.py startapp app_name
#Purge all tasks
celery -A apecs purge
#Inspect active tasks
celery -A apecs inspect active
#Monitor tasks in real-time
celery -A apecs events
Build Docker image:
docker build . -t apecs --no-cache
Run production container:
docker run -p 8000:8000 --env-file .env apecs
See LICENSE.md file for details.