- Overview
- Features
- Technology Stack
- Prerequisites
- Installation
- Configuration
- Usage
- API Documentation
- Development
- Deployment
- Contributing
- License
- Support
CodeMarket is a comprehensive Django-based web application that serves as a marketplace for developers to buy and sell code projects. The platform provides a secure, user-friendly environment for code transactions with features like user authentication, project management, and payment processing.
- User Authentication: Secure login with email/password and OAuth (Google, GitHub)
- Project Management: Create, edit, and manage code projects
- Marketplace: Browse and purchase code projects
- Payment System: Integrated payment processing
- Admin Panel: Comprehensive admin interface with Jazzmin theme
- API: RESTful API for mobile and third-party integrations
- Multi-language Support: English, Uzbek, and Russian languages
- โ User registration and authentication
- โ OAuth integration (Google, GitHub)
- โ Project creation and management
- โ Project marketplace
- โ Payment processing
- โ User profiles and settings
- โ Admin dashboard
- โ REST API endpoints
- โ Email notifications
- โ Multi-language support
- โ Django 5.x with modern practices
- โ PostgreSQL database
- โ Redis for caching
- โ JWT authentication
- โ Swagger API documentation
- โ Tailwind CSS for styling
- โ Responsive design
- โ Security best practices
- Framework: Django 5.x
- Database: PostgreSQL
- Cache: Redis
- Authentication: JWT, OAuth2 (Google, GitHub)
- API: Django REST Framework
- Documentation: Swagger/OpenAPI (drf-yasg)
- Admin: Jazzmin
- CSS Framework: Tailwind CSS
- JavaScript: Vanilla JS
- Templates: Django Templates
- Admin Theme: Jazzmin
- Rich Text Editor: CKEditor 5
- Package Manager: pip
- Environment: environs
- Code Quality: Black, autopep8
- Version Control: Git
Before you begin, ensure you have the following installed:
- Python 3.8+ - Download Python
- PostgreSQL 12+ - Download PostgreSQL
- Redis - Download Redis
- Git - Download Git
git clone https://github.com/Matnazar-Matnazarov/codemarket.git
cd codemarket# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root:
cp .env.example .envEdit the .env file with your configuration:
# Database Configuration
DATABASE_URL=postgresql://username:password@localhost:5432/codemarket
# Django Configuration
DEBUG=True
SECRET_KEY=your-secret-key-here
ALLOWED_HOSTS=localhost,127.0.0.1,*
# Email Configuration
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
# OAuth Configuration
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
# Redis Configuration
REDIS_URL=redis://localhost:6379/0# Create PostgreSQL database
createdb codemarket
# Run migrations
python manage.py migrate
# Create superuser
python manage.py createsuperuser# Collect static files
python manage.py collectstatic --noinput
# Create media directory (if not exists)
mkdir -p mediaThe project uses PostgreSQL by default. Update your database settings in config/settings.py or use the DATABASE_URL environment variable.
Configure your email settings in the .env file:
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URIs:
http://localhost:8000/accounts/google/login/callback/
- Go to GitHub Developer Settings
- Create a new OAuth App
- Set callback URL:
http://localhost:8000/accounts/github/login/callback/
# Start the development server
python manage.py runserver
# Access the application
# Open http://127.0.0.1:8000/ in your browserAccess the admin panel at http://127.0.0.1:8000/admin/ and log in with your superuser credentials.
The project includes a comprehensive REST API. Access the API documentation at:
- Swagger UI:
http://127.0.0.1:8000/api/swagger/
