Beat Me is challenges platform for music producers.
- Authentication - Facebook, Google, Spotify, VK
- Challenges
- Playlists
- Import playlists from spotify
- Tracks
- Participants
- Submissions
- Voting
- Populate recommended playlists
- Challenge statistics/scoreboard
- Search track on youtube
Use the package manager poetry to prepare backend running.
- Install poetry:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
. - Install dependencies:
poetry install
.
- Copy
.env.example
to.env
and fill your data. - Check
postgres
andredis
are working. - Run server:
uvicorn app:application --host 0.0.0.0 --port 8000
.
- Copy
.env.docker.example
to.env.docker
and fill your data. - Run
docker-compose up -d
to start services.
Application will be available on http://127.0.0.1:8000.
Tests are work by pytest
and use sqlite
(TORTOISE_TEST_DB
in settings/base.py) instead of postgres.
- To run tests exec
pytest
in project directory. - To calculate coverage
pytest --cov=app --cov=tests --cov-report=term-missing
.
/swagger/
- automatic interactive API documentation./redoc/
- alternative automatic documentation.
To run manage command: python manage/main.py {command}
populate_texts
- populate texts for frontend loader fromtexts.json
populate_playlists
- populate spotify playlists fromplaylists.json
Don't forget to set PYTHONPATH to the project
app - app root directory
├── main.py - contains application factory
├── models - application models
│ ├── api - pydantic models
│ └── db - tortoise orm models
│ └── __init__.py - contains __models__ for tortoise orm models exploring
├── routes - api endpoints
├── services - services with application logic
│ └── auth - authentication services
│ └── providers - external OAuth providers
├── settings - applicaitons settings
└── utils - other stuff
tests - tests root directory
manage - application management
└── fixtures - json fixtures storage