The Open Source Classifieds Web and Mobile Application Backend is a comprehensive backend solution built using Python, Django, Django Rest Framework (DRF), Poetry, Docker, Redis, and Celery. This project aims to provide a robust and scalable backend infrastructure for open-source classifieds web and mobile applications, enabling users to create, manage, and browse classified listings seamlessly.
- User Management: Secure user authentication and registration system.
- Listing Management: Create, edit, and delete classified listings with various attributes.
- Search and Filtering: Efficient search functionality with filters and sorting options.
- Image Handling: Upload, store, and manage images associated with listings.
- Messaging: Enable communication between users interested in listings.
- Notifications: Real-time notifications for actions related to listings.
- Backend Scalability: Utilize Redis and Celery for handling background tasks and improving performance.
- API Documentation: Well-documented API endpoints for seamless integration with web and mobile frontends.
- Dockerization: Easy deployment and scalability using Docker containers.
- Version Management: Dependency management and version specification using Poetry.
- Python
- Django
- Django Rest Framework (DRF)
- Poetry (Dependency Management)
- Docker (Containerization)
- Redis (Caching and Background Tasks)
- Celery (Asynchronous Task Queue)
-
Clone the Repository:
git clone https://github.com/murtazox04/kelishamiz-backend.git cd kelishamiz-backend
-
Set Up Virtual Environment (Recommended):
python3 -m venv venv source venv/bin/activate
-
Install Dependencies:
pip install poetry poetry install
-
Environment Variables:
DEBUG=True SECRET_KEY=your_secret_key DATABASE_URL=your_database_url REDIS_URL=redis://localhost:6379/0
-
Run Migrations:
python manage.py migrate
-
Start Celery Worker (in a separate terminal):
celery -A your_project_name worker -l info
-
Run the Development Server:
python manage.py runserver
-
Access API Documentation:
Visit http://127.0.0.1:8000/docs/ for the interactive API documentation provided by DRF.
If you prefer to use Docker for running the project, follow these steps:
-
Build Docker Image:
docker build -t kelishamiz-backend .
-
Run Docker Container:
docker run -p 8000:8000 --env-file .env kelishamiz-backend
-
Install Certbot on your server. The easiest way is to run:
docker run -it --rm -p 443:443 -p 80:80 --name certbot -v "/etc/letsencrypt:/etc/letsencrypt" -v "/var/lib/letsencrypt:/var/lib/letsencrypt" certbot/certbot certonly
-
Rebuild and restart your stack:
docker-compose down docker-compose build docker-compose up -d
We welcome contributions to enhance the functionality and features of the backend. Please refer to the CONTRIBUTING.md file for guidelines.
This project is licensed under the MIT License.
For detailed design architecture, please refer to the Figma Design.
For any questions or support, please contact us at [email protected]. We appreciate your interest in the project and look forward to your contributions!