Welcome to djangoFlex, a comprehensive Django framework template designed for flexibility and scalability. Whether you're building a simple web app or a complex microservices architecture with video processing and AI capabilities, djangoFlex has got you covered.
djangoFlex comes pre-loaded with a smorgasbord of goodies:
- 🐰 RabbitMQ: Message queuing for distributed task management.
- 📹 SRS (Simple RTMP Server): For video streaming needs.
- 🐘 PostgreSQL: Robust relational database for data persistence.
- 🔄 Redis: In-memory data structure store for caching and real-time operations.
- 📊 MLflow: For machine learning model management and tracking.
- 🎥 Video Capture Server: For multi-camera video capture and processing.
- 🧠 Vision AI Server: For object detection and scene analysis.
- 🍃 Celery: Distributed task queue for background processing.
-
Clone this repository:
git clone -b <branch name> https://github.com/yourusername/djangoFlex.git cd djangoFlex
-
Create a new Conda environment with Python 3.12:
conda create --name djangoFlex python=3.12 conda activate djangoFlex
-
Install the dependencies:
pip install -r requirements.txt
-
Set up your environment variables:
cp .env.example .env
Edit
.env
to configure your settings. -
Start the Docker containers:
sudo docker-compose -f docker-compose.yml up -d
-
Apply database migrations:
sudo docker-compose exec django bash cd djangoFlex python manage.py makemigrations python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the Django development server:
python manage.py runserver
-
Visit
http://127.0.0.1:8000/admin
to see your djangoFlex project in action! -
Run SRS Client
cd test
python srs_client.py
- Visit
http://127.0.0.1:8080
to see your stream.
- Management UI:
http://localhost:15676
(default credentials: guest/guest) - AMQP port: 5675
- RTMP port: 1935
- RTMP port: 1985
- HTTP port: 8080
- Port: 5435
- Default database: your_postgres_database
- Default user: postgres
- Port: 6399
- UI:
http://localhost:5000
You can customize the services by editing the docker-compose.yml
file and the corresponding environment variables in your .env
file.
- 🏗 Pre-configured Django project structure with modular app design
- 🔐 Environment-based settings for easy configuration management
- 🐳 Docker integration for seamless service management
- 📚 Swagger API documentation (available at
/swagger/
) - 🔗 RESTful API endpoints for all services
- 📹 Multi-camera video capture and processing capabilities
- 🧠 AI-powered object detection and scene analysis
- 📊 MLflow integration for machine learning model tracking and management
- 🐰 RabbitMQ client for distributed messaging
- 🍃 Celery integration for background task processing
-
Create a new Django app in the
djangoFlex_servers
directory:python manage.py startapp myawesome_app djangoFlex_servers/myawesome_app
-
Add your new app to
INSTALLED_APPS
indjangoFlex/settings.py
. -
Develop your views, models, and URLs.
-
Include your app's URLs in
djangoFlex_servers/urls.py
. -
Apply migrations if you've added models:
python manage.py makemigrations myawesome_app python manage.py migrate
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Happy coding with djangoFlex! 🚀✨