RateMySetup is a containerized Django web application that allows developers to publish, share, and review development setups. This project has been modernized to include a fully functional REST API, Docker orchestration, and a CI/CD pipeline.
- User Authentication: Custom user model with secure email-based login and JWT-ready structure.
- Setup Sharing: Users can publish their setups with detailed descriptions and image uploads.
- Review System: Community-driven rating system (1-5 stars) with comments.
- REST API: Fully browseable API built with Django Rest Framework (DRF).
- Admin Panel: Manage users, setups, and reviews via the Django Admin interface.
- CI/CD Pipeline: Automated testing and build verification via GitHub Actions.
- Containerized: "Infrastructure as Code" using Docker and Docker Compose with PostgreSQL.
- Backend: Python 3.11, Django 4.2, Django Rest Framework
- Database: PostgreSQL 15 (Dockerized)
- Containerization: Docker, Docker Compose
- Testing: Pytest, Pytest-Django
- Deployment: Gunicorn (WSGI)
RateMySetup/
├── .github/workflows/ # CI/CD Pipeline (GitHub Actions)
├── RateMySetup/ # Project settings and configuration
├── myapp/ # Main application (Models, Views, Serializers)
│ ├── migrations/ # Database schema versions
│ ├── tests.py # Automated tests
│ └── ...
├── setups/ # Directory for user-uploaded images
├── Dockerfile # Docker image definition
├── docker-compose.yml # Container orchestration (Web + DB)
├── manage.py # Django management script
├── pytest.ini # Test configuration
├── requirements.txt # Project dependencies
└── README.md # Project documentation
You can run this project locally using Docker (Recommended) or standard Python virtual environments.
- Docker Desktop (Installed and running)
- Git
-
Clone the repository:
git clone [https://github.com/Kenanhi/RateMySetup.git](https://github.com/Kenanhi/RateMySetup.git) cd RateMySetup -
Build and Start the Stack: This command builds the container and starts both the Web Server and PostgreSQL Database.
docker compose up -d --build --wait
-
Apply Database Migrations: Initialize the PostgreSQL database schema.
docker compose exec web python manage.py migrate -
Create an Admin User: Create a superuser to access the admin panel.
docker compose exec web python manage.py createsuperuser -
Access the Application:
- API Root: http://localhost:8000/api/
- Admin Panel: http://localhost:8000/admin/
This project uses pytest for unit and integration testing. The tests cover user registration, setup creation, and API endpoint validity.
To run tests locally:
docker compose exec web pytest -vTo view tests in CI/CD: Navigate to the Actions tab in this GitHub repository to see the automated test results for every commit.
The API allows full CRUD operations. You can interact with it via the Browsable API interface at /api/.
| Endpoint | Method | Description |
|---|---|---|
/api/users/ |
POST |
Register a new user (Open registration) |
/api/users/ |
GET |
List users (Admin/Authenticated) |
/api/setups/ |
GET |
View all shared setups |
/api/setups/ |
POST |
Create a new setup (Requires Login) |
/api/reviews/ |
POST |
Rate a setup (Requires Login) |