Self-Hosted API Builder & Management Platform
APIForge is a Django-based platform where developers can easily create, manage, secure, and monitor APIs from a dashboard.
| Home | Login | Sign Up |
|---|---|---|
![]() |
![]() |
![]() |
| Dashboard | Projects | Create Project |
|---|---|---|
![]() |
![]() |
![]() |
- Authentication System: User signup, login, logout, password reset, and email verification using django-allauth
- Dashboard: Overview of all APIs, requests, API keys, and recent activity
- API Project Management: Create and organize API projects with multiple endpoints
- API Endpoint Builder: Visual endpoint creation with method, path, parameters, and documentation
- API Key System: Generate, revoke, and manage API keys with usage tracking
- Rate Limiting: Configurable rate limits per API key (requests per day)
- Analytics Dashboard: Real-time usage analytics with charts showing requests, response times, and error rates
- Automatic API Documentation: Auto-generated Swagger-like documentation for each project
- Request Logging: Detailed logs of all API requests with filtering and search
- Admin Panel: Full admin interface for managing users, projects, API keys, and usage
- Python 3.12
- Django 5
- Django REST Framework
- PostgreSQL
- Redis
- Celery
- Django Templates
- TailwindCSS
- Alpine.js
- Chart.js
- Docker & Docker Compose
- Black & Ruff (code formatting)
- pytest (testing)
-
Clone the repository
git clone <repository-url> cd apiforge
-
Copy environment file
cp .env.example .env
-
Start the services
docker-compose up -d
-
Run migrations
docker-compose exec django python manage.py migrate -
Create a superuser
docker-compose exec django python manage.py createsuperuser -
Access the application
- Web App: http://localhost:8000
- Admin Panel: http://localhost:8000/admin
- API Docs: http://localhost:8000/api/docs/
-
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements/development.txt
-
Install Node.js dependencies for TailwindCSS
npm install npm run build:css
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Set up PostgreSQL and Redis
- Create a PostgreSQL database
- Start Redis server
-
Run migrations
python manage.py migrate
-
Create a superuser
python manage.py createsuperuser
-
Start the development server
python manage.py runserver
-
Start Celery (in a separate terminal)
celery -A config worker -l INFO
| Variable | Description | Default |
|---|---|---|
SECRET_KEY |
Django secret key | Required |
DEBUG |
Debug mode | False |
ALLOWED_HOSTS |
Allowed hostnames | localhost,127.0.0.1 |
DATABASE_URL |
PostgreSQL connection URL | Required |
REDIS_URL |
Redis connection URL | redis://localhost:6379/0 |
CELERY_BROKER_URL |
Celery broker URL | redis://localhost:6379/1 |
EMAIL_BACKEND |
Email backend | Console backend |
apiforge/
├── manage.py
├── config/
│ ├── settings/
│ │ ├── base.py # Base settings
│ │ ├── development.py # Development settings
│ │ └── production.py # Production settings
│ ├── urls.py
│ ├── wsgi.py
│ ├── asgi.py
│ └── celery.py
├── apps/
│ ├── accounts/ # User authentication
│ ├── dashboard/ # Main dashboard
│ ├── projects/ # API projects
│ ├── apis/ # API endpoints & keys
│ └── analytics/ # Usage analytics & logs
├── templates/
│ ├── base.html
│ ├── base_dashboard.html
│ ├── components/
│ ├── account/
│ ├── dashboard/
│ ├── projects/
│ ├── apis/
│ └── analytics/
├── static/
│ └── css/
├── requirements/
├── docker-compose.yml
├── Dockerfile
└── README.md
All API requests require authentication via API key:
curl -X GET "http://localhost:8000/api/v1/products" \
-H "Authorization: Bearer af_your_api_key_here"API keys have configurable rate limits. Rate limit information is included in response headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: midnight UTC
-
Log in to the dashboard
-
Create a new project
-
Add endpoints with:
- Name: Get All Products
- Method: GET
- Path: /products
- Parameters and example responses
-
Generate an API key
-
Use the key in your applications
black .
ruff check --fix .pytestnpm run watch:css # Development
npm run build:css # Productiondocker-compose -f docker-compose.prod.yml up -d- Set
DEBUG=Falsein environment - Configure proper
SECRET_KEY - Set up PostgreSQL and Redis
- Run with Gunicorn behind Nginx
- Configure SSL/TLS certificates
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License
For issues and questions, please open a GitHub issue.





