mirror of
https://github.com/apidoorman/doorman.git
synced 2026-02-08 18:18:46 -06:00
1d639b06ecdb37c3847edde877c97f5e27618c87
Doorman API Gateway
A lightweight, Python-based API gateway for managing REST, SOAP, GraphQL, gRPC, and AI APIs. No low-level language expertise required.
Key Features
- Multi-Protocol Support: REST, SOAP, GraphQL, gRPC, and AI APIs
- Security: User management, authentication, authorization, roles & groups
- Traffic Control: Rate limiting, throttling, dynamic routing, credits
- Caching & Storage: Redis caching, MongoDB integration, or in memory
- Validation: Request payload validation and logging
Quick Start
Prerequisites
- Docker installed
- Environment file (
.env) at repo root (use./backend-services/.env.exampleas template)
Run with Docker
# Build the image
docker build -t doorman:latest .
# Run the container
docker run --rm --name doorman \
-p 3001:3001 -p 3000:3000 \
--env-file .env \
doorman:latest
Access Points:
- Backend API: http://localhost:3001
- Web Client: http://localhost:3000
Run in Background
# Start detached
docker run -d --name doorman \
-p 3001:3001 -p 3000:3000 \
--env-file .env \
doorman:latest
# View logs
docker logs -f doorman
# Stop container
docker stop doorman
Configuration
Required Environment Variables
DOORMAN_ADMIN_EMAIL: Admin user emailDOORMAN_ADMIN_PASSWORD: Admin passwordJWT_SECRET_KEY: Secret key for JWT tokens
High Availability Setup
For production/HA environments:
- Set
MEM_OR_EXTERNAL=REDIS - Configure Redis connection details in
.env
Custom Ports
# Change web client port
docker run --rm --name doorman \
-p 3001:3001 -p 3002:3002 \
-e WEB_PORT=3002 \
--env-file .env \
doorman:latest
Alternative: Mount Environment Folder
# Create env folder with config files
mkdir -p env
# Run with mounted env folder
docker run --rm --name doorman \
-p 3001:3001 -p 3000:3000 \
-v "$(pwd)/env:/env:ro" \
doorman:latest
Testing
Testing Against Docker
When testing from your host machine against Doorman running in Docker:
# Verbose output
make live-docker
# Quiet output
make liveq-docker
# Manual environment variable
DOORMAN_IN_DOCKER=1 make live
This configures test servers to use host.docker.internal (Mac/Windows) or 172.17.0.1 (Linux).
Repository Structure
doorman/
├── backend-services/ # Python gateway core, routes, services, tests
├── web-client/ # Next.js frontend
├── docker/ # Container entrypoint and scripts
├── user-docs/ # Documentation and guides
├── scripts/ # Helper scripts (preflight, coverage, maintenance)
└── generated/ # Local development artifacts
Security Notes
- Frontend only exposes
NEXT_PUBLIC_*variables to the browser - Never pass secrets to frontend build args
- Backend loads environment at runtime from
--env-fileor/env/*.env - Platform/injected env variables take precedence over repo files
License
Copyright Doorman Dev, LLC
Licensed under the Apache License 2.0 - see LICENSE
Disclaimer
Use at your own risk. By using this software, you agree to the Apache 2.0 License and any annotations in the source code.
We welcome contributors and testers!
Description
Languages
Python
70.2%
TypeScript
24.3%
CSS
4%
Shell
0.6%
JavaScript
0.5%
Other
0.3%

