A comprehensive tour management system built with Django, featuring a public website, custom admin dashboard, REST API, and AI-powered assistance for tour planning and management.
- Browse tour packages and destinations
- View accommodations and activities
- Read customer reviews
- Dynamic content management (banners, featured packages)
- Responsive design using modern HTML templates
- Manage destinations with coordinates
- Add/edit accommodations (manual or AI-assisted PDF parsing)
- Create and manage tour packages
- Handle activities and moderate reviews
- AI assistant for:
- Drafting safari itineraries
- Parsing accommodation PDFs
- Optimizing routes based on coordinates
- Future: Customer inquiry management
- Full REST API endpoints for Flutter mobile app
- Token-based authentication
- Paginated responses
- Rate limiting and throttling
- Backend: Django 5.2.8
- Database: PostgreSQL 16
- Caching: Redis 7
- Task Queue: Celery
- Web Server: Gunicorn + Nginx
- API: Django REST Framework
- AI Integration: OpenAI API
- Containerization: Docker & Docker Compose
- Docker & Docker Compose
- Git
git clone <repository-url>
cd tour_systemCopy the example environment file and update with your credentials:
cp .env.example .envEdit .env and update the following:
SECRET_KEY- Generate a new Django secret keyDB_PASSWORD- Set a secure database passwordOPENAI_API_KEY- Add your OpenAI API key- Other configuration as needed
# Build and start all services
docker-compose up -d --build
# View logs
docker-compose logs -f
# Check service status
docker-compose ps- Public Website: http://localhost
- Admin Dashboard: http://localhost/admin
- API: http://localhost/api
- Django Admin: http://localhost/admin (default Django admin)
docker-compose exec django python manage.py createsuperuserThe application runs with the following services:
- postgres: PostgreSQL database
- redis: Redis for caching and Celery broker
- django: Main Django application (Gunicorn)
- celery: Celery worker for background tasks
- celery-beat: Celery beat for scheduled tasks
- nginx: Reverse proxy and static file serving
tour_system/
├── accommodations/ # Accommodation management app
├── activities/ # Activities management app
├── ai_assistant/ # AI-powered features
├── api/ # REST API endpoints
├── config/ # Django settings and configuration
├── core/ # Core/CMS functionality
├── destinations/ # Destination management app
├── docker/ # Docker configuration files
│ ├── entrypoint.sh
│ └── nginx.conf
├── packages/ # Tour package management app
├── reviews/ # Review management app
├── static/ # Static files (CSS, JS, images)
│ ├── frontend/ # Public website assets
│ └── backend/ # Admin dashboard assets
├── templates/ # HTML templates
│ ├── frontend/ # Public website templates
│ └── backend/ # Admin dashboard templates
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
└── .env.example
main- Production-ready codeimpl-destinations- Destination implementationimpl-accommodations- Accommodation implementationimpl-packages- Tour packages implementationimpl-activities- Activities implementationimpl-reviews- Reviews implementationimpl-ai-assistant- AI assistant implementationimpl-api- REST API implementationimpl-core-cms- CMS functionality
- Create/checkout feature branch
- Make your changes
- Test locally with Docker
- Commit with clear messages
- Push to GitHub
- Create Pull Request to main
# Start services
docker-compose up -d
# Stop services
docker-compose down
# Restart a service
docker-compose restart django
# View logs
docker-compose logs -f [service_name]
# Execute command in container
docker-compose exec django python manage.py [command]
# Rebuild services
docker-compose up -d --build# Run migrations
docker-compose exec django python manage.py migrate
# Create migrations
docker-compose exec django python manage.py makemigrations
# Collect static files
docker-compose exec django python manage.py collectstatic
# Create superuser
docker-compose exec django python manage.py createsuperuser
# Django shell
docker-compose exec django python manage.py shell# Access PostgreSQL
docker-compose exec postgres psql -U tour_admin -d tour_system_db
# Backup database
docker-compose exec postgres pg_dump -U tour_admin tour_system_db > backup.sql
# Restore database
docker-compose exec -T postgres psql -U tour_admin tour_system_db < backup.sql- Database Connection Pooling: Persistent connections for better performance
- Redis Caching: Caches frequently accessed data
- Celery Background Tasks: Async processing for AI and heavy operations
- Nginx Static Files: Efficient static file serving with caching
- Gunicorn Workers: Multiple workers for concurrent request handling
- API Pagination: Paginated responses for large datasets
- Rate Limiting: API throttling to prevent abuse
- Environment variables for sensitive data
- HTTPS enforcement in production
- CSRF protection
- Secure session cookies
- XSS protection headers
- Database connection encryption
- Rate limiting on API endpoints
Proprietary - All rights reserved
- Tour System Development Team
For support and questions, please contact the development team.