The coding challenge for the senior backend engineer role by Tiko.
- Introduction
- Features
- Requirements
- Installation
- Usage
- Testing
- Code coverage
- Linting
- API Documentation
This is an Event manager app which allow organisers to create and manage events and allow users to attend the events.
- Users can register an account using Email and password.
- Users can log in to get access token and refresh token.
- Access token with lifetime of 1 hour.
- Refresh token with lifetime of 1 day.
- Users can Create event after login.
- Users can Update only events they have created.
- Users can list all events.
- Users can filter events by owner and other fields.
- Users can cancel only events they have created.
- Users can subscribe or unsubscribe to events
- Events have validation
- Users can not subscribe to event if max limit reach
- New line
Requirements can be found in the requirements.txt file
-
Create venv and Clone the repository:
mkdir project cd project python3.11 -m venv venv source venv/bin/activate git clone https://github.com/hashaaamm/tiko_energy.git cd tiko_energy
-
Install dependencies:
pip3 install -r requirements.txt
-
Run migrations:
python manage.py makemigrations python manage.py migrate
-
Create superuser:
python manage.py createsuperuser
-
Start the server:
python manage.py runserver
-
Access admin at http://127.0.0.1:8000/admin/
- Run Test:
pytest
- To check coverage:
pytest -p no:warnings --cov=.
- To check coverage:
flake8 . black . isort .
- Access API docs at http://127.0.0.1:8000/api/swagger-docs/