This repository has been archived on 2026-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
RepApp/docs/dev/index.md

47 lines
1.4 KiB
Markdown
Raw Normal View History

2023-08-15 16:01:59 +00:00
# Repapp - developer documentation
2023-08-15 20:31:04 +00:00
The Repapp is a repair assignment booking and management tool.
It tries to support all common workflows happening while organizing a repair café event.
It's build using the Django web framework.
2023-08-15 20:50:33 +00:00
The code of the Repapp is hosted on Github: https://github.com/makes-hacks-hip/RepApp
2023-08-15 20:31:04 +00:00
2023-08-15 20:50:33 +00:00
## Local development setup
- Clone the Github repository
- Create a Python environment: `python -m venv venv`
- Activate the Python environment: `source venv/bin/activate`
2023-08-29 11:08:35 +00:00
- Install the dependencies: `pip install -r requirements_prod.txt` and `pip install -r requirements_dev.txt`
- Change to the Django project folder: `cd repapp`
2023-08-15 20:50:33 +00:00
- Setup the database:
- `python manage.py makemigrations`
- `python manage.py migrate`
- Setup an admin user: `python manage.py createsuperuser`
- Run the local test server: `python manage.py runserver`
## Docker image
- Build the image: `docker build -t repapp .`
- Run the image:
```bash
docker run --rm -d \
-p 127.0.0.1:8020:8020 \
--name repapp \
--env DJANGO_SUPERUSER_USERNAME=suba \
--env DJANGO_SUPERUSER_PASSWORD=ThePassword \
--env DJANGO_SUPERUSER_EMAIL=noreply@example.com \
repapp`
```
- Open http://127.0.0.1:8020/ in your browser
## Tests
- Unit tests: `python manage.py test`
2023-08-29 11:08:35 +00:00
- LiveServer tests: `python manage.py test repapp.live_tests`
2023-08-30 19:47:34 +00:00
### Coverage
- `coverage run --source='.' manage.py test`
- `coverage report` or `coverage html`