1e0af277fe1b00657178cf1f426a03d23cab3292
🔧 (apps.py): Import signals in ready method to ensure signals are loaded when the app starts 🔧 (pyproject.toml): Add PGH004 to lint ignore list to avoid linting errors related to PostgreSQL-specific code
🔧 (on_release.yml): Remove unnecessary echo statements from deployment script for cleaner logs and better security
🐛 (settings.py): Remove conditional check for DEBUG to always allow CORS from all origins for better cross-origin resource sharing
Minesweeper Backend
Stack used:
- Python 3.8
- Django 3.1.3
- Django Rest Framework
- MySQL 8
- Black and Flake8 for codestyling
- APICURIO, for API documentation
- Docker
- Sentry for error tracking
OpenAPI 3 documentation: https://apidoc.mines.makecodes.dev/ Game frontend: https://mines.makecodes.dev/ Frontend github repo: https://github.com/imakecodes/minesweeper-frontend
Production environment
Was used Digital Ocean to host the applications using a little droplet with 1GB/25GB with Ubuntu 20.04 LTS at New York with Docker and Nginx(for reverse proxy).
Also was used Github Actions to create docker images for backend and frontend
Next desired steps
- Change the primary key of the game from Integer to UUID to avoid cheating from the players
- User authentication to store the match history
- Create a global and by user scoreboard
- Create unit tests
Running locally
Assuming you have docker-compose and docker installed on your computer:
Clone the repository
git clone git@github.com:imakecodes/minesweeper-backend.git
cd minesweeper-backend
Run the application
docker-compose up -d
Run the migrations
docker-compose run app python manage.py migrate
The application will be available at http://localhost:8000
Description
Releases
14
v0.3.250210224620
Latest
Languages
Python
83.9%
Shell
8.3%
Makefile
4.4%
Dockerfile
3.4%