Zap-Task is a full-featured REST API that simulates a freelance marketplace. It allows users to post tasks they need help with, and for other users (freelancers) to submit proposals to complete those tasks. This project is designed to showcase a robust backend implementation using modern Python and Django practices.
- User Authentication: Secure user registration and login system using JWT.
- Task Management: Clients can create, update, and manage tasks.
- Proposal System: Freelancers can browse tasks and submit proposals.
- Review and Rating System: Users can rate and review each other after a task is completed.
- Payments: Simulated payment processing for tasks.
- Asynchronous Task Handling: Background tasks for notifications and other operations.
- Backend: Python3.13, Django5+, Django REST Framework
- Database: PostgreSQL
- Asynchronous Tasks: Celery, Redis
- Containerization: Docker, Docker Compose
- Web Server: Nginx
- Testing: Pytest
- Dependency Management: Poetry
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/github-main-user/zap-task.git cd zap-task -
Set up environment variables: Copy the example environment file and update it with your configuration.
cp .env.example .env
You will need to fill in the required variables in the
.envfile. -
Build and run the application using Docker Compose:
docker compose up --build -d
-
(Optional) Create a superuser:
docker compose exec web python manage.py createsuperuser
The application should now be running at http://localhost:80/.
To stop started containers use docker compose down, add -v to clean up all volumes.
Auto-generated Swagger/Redoc API documentation will be available at:
http://localhost/api/v1/docs/
http://localhost/api/v1/redoc/
To run the test suite, use the following command:
docker compose -f compose.test.yml --env-file=.env.test upThis project uses GitHub Actions for continuous integration and continuous deployment. The pipeline is defined in .github/workflows/main.yml and consists of three main jobs:
- Linting: Checks the code for style and formatting issues using
flake8,black, andisort. - Testing: Runs the test suite using
pytestin a Docker container. - Deployment: Automatically deploys the application to a server when changes are pushed to the
mainbranch.
This pipeline ensures that all code is tested and linted before being deployed, which helps to maintain code quality and prevent bugs.