A production-ready, full-stack file conversion system built with Next.js 14 (Frontend) and Django 4.x (Backend). Convert between 50+ file formats with enterprise-grade security, scalability, and performance.
- 50+ File Formats supported across multiple categories:
- Images: JPG, PNG, WebP, BMP, GIF, TIFF, SVG
- Documents: PDF, DOCX, TXT, HTML, Markdown, RTF
- Audio: MP3, WAV, FLAC, AAC, OGG, M4A
- Video: MP4, AVI, MOV, MKV, WebM, WMV
- Spreadsheets: XLSX, CSV, JSON, ODS
- Presentations: PPTX, PDF
- Smart Format Detection using file magic numbers
- Batch Processing capabilities
- Format-specific optimization (image compression, audio bitrate selection)
- Microservices Architecture with clear separation of concerns
- Asynchronous Processing using Celery workers
- Real-time Updates via WebSocket/SSE
- Scalable Storage with S3 compatibility
- Redis Caching for improved performance
- PostgreSQL for reliable data persistence
- JWT Authentication with refresh tokens
- File Sanitization and malware scanning
- Rate Limiting per user/IP
- SSL/TLS Encryption end-to-end
- GDPR-ready data retention policies
- Audit Logging for all operations
- Drag & Drop Interface with preview
- Real-time Progress tracking
- Download History with search/filter
- Bulk Operations support
- Responsive Design (mobile, tablet, desktop)
- Dark/Light Mode toggle
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Next.js 14 β β Nginx Proxy β β Load Balancer β
β Frontend βββββΊβ (SSL/TLS) βββββΊβ (Optional) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
ββββββββββββββΌβββββββββββββ
β Django REST API β
β (Backend) β
ββββββββββββββ¬βββββββββββββ
βββββββββββββΌββββββββββββ
βββββββββββΌβββββ ββββββΌβββββββββ ββΌββββββββββββββ
β PostgreSQL β β Redis β β Celery β
β Database β β Cache/Queueβ β Workers β
ββββββββββββββββ βββββββββββββββ ββββββββββββββββ
β β β
βββββββββββΌββββββββββββββββΌββββββββββββββββΌββββββββββ
β Storage Backends β
β βββββββββββ βββββββββββ βββββββββββββββββββ β
β β S3 β β GCS β β Local Storage β β
β βββββββββββ βββββββββββ βββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Docker & Docker Compose (for production deployment)
- Python 3.11+ (for local development)
- Node.js 18+ (for frontend development)
- PostgreSQL 15 (or Docker)
- Redis 7 (or Docker)
- LibreOffice (for document conversions)
- FFmpeg (for audio/video conversions)
- 4GB RAM minimum, 8GB recommended
- Git for version control
- VS Code or any modern IDE
- Postman or Insomnia for API testing
- pgAdmin or DBeaver for database management
# Clone the repository
git clone https://github.com/Solomonkass/file-converter-pro.git
cd file-converter-pro
# Copy environment variables
cp .env.example .env
# Edit .env with your configuration
# Start all services
docker-compose up --build -d
# Run initial setup
docker-compose exec backend python manage.py migrate
docker-compose exec backend python manage.py createsuperuser
docker-compose exec backend python manage.py collectstatic
# Access the application
# Frontend: http://localhost:3000
# Backend API: http://localhost:8000/api
# Django Admin: http://localhost:8000/admincd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install system dependencies (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install -y \
libpq-dev \
ffmpeg \
libreoffice \
poppler-utils \
ghostscript \
imagemagick
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Database setup
python manage.py migrate
python manage.py createsuperuser
python manage.py collectstatic
# Start Redis and Celery (in separate terminals)
redis-server
celery -A config.celery worker --loglevel=info
celery -A config.celery beat --loglevel=info
# Run Django server
python manage.py runservercd frontend
# Install dependencies
npm install
# Configure environment
cp .env.example .env.local
# Edit .env.local with your API URL
# Run development server
npm run dev# Django Settings
SECRET_KEY=your-very-secret-key-change-in-production
DEBUG=False
ALLOWED_HOSTS=localhost,127.0.0.1,yourdomain.com
CORS_ALLOWED_ORIGINS=https://yourdomain.com,http://localhost:3000
# Database
DB_ENGINE=django.db.backends.postgresql
DB_NAME=fileconverter
DB_USER=postgres
DB_PASSWORD=secure_password
DB_HOST=postgres
DB_PORT=5432
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
# File Storage (AWS S3 Example)
USE_S3=True
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_STORAGE_BUCKET_NAME=your-bucket-name
AWS_S3_REGION_NAME=us-east-1
# Email (for notifications)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
# Security
SESSION_COOKIE_AGE=1209600 # 2 weeks
FILE_UPLOAD_MAX_SIZE=524288000 # 500MB
CONVERSION_TIMEOUT=300 # 5 minutesNEXT_PUBLIC_API_URL=https://yourdomain.com/api
NEXT_PUBLIC_WS_URL=wss://yourdomain.com/ws
NEXT_PUBLIC_MAX_FILE_SIZE=524288000
NEXT_PUBLIC_SUPPORTED_FORMATS=jpg,png,pdf,mp3,mp4,docx,xlsxFor production, use the provided nginx.conf with SSL:
# Generate SSL certificates
sudo certbot --nginx -d yourdomain.com
# Test configuration
sudo nginx -t
# Reload Nginx
sudo systemctl reload nginxfile-converter-pro/
βββ frontend/ # Next.js 14 Frontend
β βββ app/ # App Router
β β βββ (auth)/ # Authentication pages
β β βββ (dashboard)/ # Dashboard pages
β β βββ api/ # Frontend API routes
β β βββ layout.tsx # Root layout
β βββ components/ # Reusable components
β β βββ ui/ # UI components
β β βββ forms/ # Form components
β β βββ conversions/ # Conversion components
β βββ lib/ # Utility functions
β β βββ api.ts # API client
β β βββ auth.ts # Authentication
β β βββ converters/ # Frontend converters
β βββ hooks/ # Custom React hooks
β βββ types/ # TypeScript definitions
β βββ public/ # Static assets
β
βββ backend/ # Django Backend
β βββ config/ # Project settings
β β βββ settings/ # Split settings
β β βββ urls.py # URL routing
β β βββ wsgi.py # WSGI config
β βββ apps/ # Django apps
β β βββ users/ # User management
β β βββ conversions/ # File conversions
β β βββ files/ # File management
β β βββ payments/ # Subscription handling
β βββ core/ # Core functionality
β β βββ converters/ # Conversion engines
β β βββ validators/ # File validators
β β βββ utils/ # Utilities
β βββ media/ # Uploaded files
β
βββ docker/ # Docker configurations
β βββ nginx/ # Nginx configs
β βββ postgres/ # Database init scripts
β βββ redis/ # Redis config
β
βββ scripts/ # Deployment scripts
β βββ deploy.sh # Production deployment
β βββ backup.sh # Database backup
β βββ migrate.sh # Migration helpers
β
βββ tests/ # Test suites
β βββ frontend/ # Frontend tests
β βββ backend/ # Backend tests
β βββ e2e/ # End-to-end tests
β
βββ docs/ # Documentation
βββ docker-compose.yml # Multi-container setup
βββ README.md # This file
# Backend tests
cd backend
pytest --cov=. --cov-report=html
# Frontend tests
cd frontend
npm test
npm run test:e2e
# All tests with Docker
docker-compose exec backend pytest- Unit Tests: 90%+ coverage
- Integration Tests: API endpoints
- E2E Tests: Critical user flows
- Performance Tests: Load testing with Locust
# View logs
docker-compose logs -f
# Monitor performance
docker stats
# Check health endpoints
curl http://localhost:8000/health/
curl http://localhost:3000/api/health
# Monitor Celery
celery -A config.celery inspect active- Structured JSON logging for production
- Log rotation with size limits
- Centralized logging with ELK stack support
- Error tracking with Sentry integration
-
Infrastructure Setup:
# Provision servers/VMs # Configure firewall rules # Set up DNS records
-
Deployment Process:
# Pull latest code git pull origin main # Build and deploy ./scripts/deploy.sh # Run migrations docker-compose exec backend python manage.py migrate # Restart services docker-compose restart
-
Post-Deployment:
# Verify deployment ./scripts/health-check.sh # Monitor logs tail -f logs/production.log # Run smoke tests ./scripts/smoke-tests.sh
# See .github/workflows/deploy.yml
name: Deploy to Production
on:
push:
branches: [main]
jobs:
test:
# Run tests
build:
# Build Docker images
deploy:
# Deploy to production# Redis caching configuration
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'redis://redis:6379/1',
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
'COMPRESSOR': 'django_redis.compressors.zlib.ZlibCompressor',
}
}
}-- Indexes for performance
CREATE INDEX idx_conversions_user_status ON conversions(user_id, status);
CREATE INDEX idx_files_created_at ON files(created_at DESC);
CREATE INDEX idx_users_email ON users(email);# CloudFront/S3 CDN for static files
location /static/ {
proxy_pass https://your-cdn-url/;
expires 1y;
add_header Cache-Control "public, immutable";
}Add custom conversion logic in backend/core/converters/:
# backend/core/converters/custom.py
class CustomConverter(BaseConverter):
def convert(self, input_path, output_format):
# Your custom conversion logic
pass# Register new converters dynamically
from django.conf import settings
for converter in settings.CUSTOM_CONVERTERS:
register_converter(converter)Configure webhooks for external integrations:
# backend/apps/conversions/webhooks.py
def send_conversion_webhook(conversion):
# Send to Zapier, Make, or custom endpoints
passWe welcome contributions! Please see our Contributing Guide.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Backend: Follow PEP 8, use Black for formatting
- Frontend: ESLint with Airbnb config, Prettier
- Commits: Conventional commits format
- Documentation: Keep docstrings and comments updated
This project is licensed under the MIT License - see the LICENSE file for details.
For commercial use or enterprise features, contact us at licensing@yourcompany.com.
- Discord: Join our community
- GitHub Issues: Report bugs
- Stack Overflow: Tag with
[file-converter-pro]
- Email: support@yourcompany.com
- SLAs: Available for enterprise customers
- Consulting: Custom deployment and integration services
- AI-powered conversion (smart format detection)
- Batch processing with ZIP archives
- API rate limiting tiers
- Webhook integrations
- Mobile app (React Native)
- Team collaboration features
- Advanced analytics dashboard
- Plugin marketplace for converters
Stable Release - Production ready with all core features.
Project Maintainer: Solomon Kassa
Email: maintainer@jedantechnology.com
Twitter: @fileconverterpro
Website: https://fileconverter.pro
- FFmpeg for audio/video processing
- LibreOffice for document conversions
- ImageMagick for image processing
- Django and Next.js communities
- All our amazing contributors and users!
Built with β€οΈ by Solomon Kassa