A comprehensive Django-based application for managing GitHub repositories, users, and automating GitHub-related tasks. This project provides a robust backend with GraphQL API, task scheduling with Celery, and secure deployment configurations.
-
GitHub Integration: Interact with GitHub's API to manage repositories and user data
-
Task Automation: Schedule and manage background tasks with Celery
-
GraphQL API: Flexible and efficient data querying with Graphene-Django
-
User Authentication: Secure authentication system with JWT support
-
Background Processing: Asynchronous task processing with Redis and Celery
-
REST API: Traditional REST endpoints for compatibility
-
Deployment Ready: Includes deployment scripts for production environments
- Backend: Django 5.1.6
- Database: PostgreSQL
- Task Queue: Celery with Redis as broker
- Authentication: JWT (JSON Web Tokens)
- API: GraphQL (Graphene-Django) & REST
- Frontend: (To be implemented or specify if exists)
- Deployment: Gunicorn, Nginx, Let's Encrypt
- Python 3.8+
- PostgreSQL
- Redis
- GitHub OAuth App credentials
- Virtual environment (recommended)
-
Clone the repository:
git clone <repository-url> cd RB
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the project root with the following variables:DEBUG=True SECRET_KEY=your-secret-key-here DATABASE_URL=postgres://user:password@localhost:5432/dbname REDIS_URL=redis://localhost:6379/0 GITHUB_ACCESS_TOKEN=your-github-token
- Create a PostgreSQL database
- Run migrations:
python manage.py migrate
-
Start the development server:
python manage.py runserver
-
Start Celery worker (in a new terminal):
celery -A github_management_project worker -l info
-
Start Celery beat for scheduled tasks (in another terminal):
celery -A github_management_project beat -l info
| Variable | Description | Required |
|---|---|---|
DEBUG |
Enable debug mode | Yes |
SECRET_KEY |
Django secret key | Yes |
DATABASE_URL |
Database connection URL | Yes |
REDIS_URL |
Redis connection URL | Yes |
GITHUB_ACCESS_TOKEN |
GitHub personal access token | Yes |
ALLOWED_HOSTS |
Comma-separated list of allowed hosts | Yes |
CORS_ALLOWED_ORIGINS |
Comma-separated list of allowed origins | No |
python manage.py test- Set up a production-ready web server (Nginx recommended)
- Configure Gunicorn as the application server
- Set up SSL certificates (Let's Encrypt recommended)
- Use the deployment script:
sudo ./deploy_django.sh
For production, ensure these settings are properly configured:
DEBUG=False- Proper
ALLOWED_HOSTS - Secure
SECRET_KEY - Production database settings
- Proper CORS configuration
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details
- Django and the Django community
- Celery for task queue management
- All open-source libraries used in this project
Project Link: https://github.tarxemo.com