Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedevc/hackthemidlandsbadges22
:name_badge: Interactive badges from HackTheMidlands 7.0
https://github.com/jedevc/hackthemidlandsbadges22
Last synced: about 1 month ago
JSON representation
:name_badge: Interactive badges from HackTheMidlands 7.0
- Host: GitHub
- URL: https://github.com/jedevc/hackthemidlandsbadges22
- Owner: jedevc
- License: mit
- Created: 2022-06-16T07:46:03.000Z (over 2 years ago)
- Default Branch: trunk
- Last Pushed: 2023-01-22T16:12:06.000Z (almost 2 years ago)
- Last Synced: 2023-03-01T22:31:32.401Z (over 1 year ago)
- Language: Python
- Homepage: https://badges.hackthemidlands.com/
- Size: 711 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# HTM interactive badges
![](./htm-logo.png)
This is the source code for the interactive badges at HackTheMidlands 7.0
:tada:Feel free to contribute, or to fork it and make your own for your own event!
## Development
First, make sure that Docker is installed.
Next, clone the repository:
git clone https://github.com:jedevc/badge-view.git --recursive
Then, create a `.env` file configured to your preferences. For example:
cp .env.example .env
Start the development server:
docker compose --profile=dev up --build
The frontend should be visible at , while the
backend should be visible at .### Linting
To run auto-formatting:
make fmt
And to run type-checking using mypy:
make mypy
## Production
Follow the same steps to setup a development environment, then build the
backend server:docker compose --profile=prod build prod-backend
Bring up the backend:
docker compose --profile=prod up -d prod-reverse-proxy prod-backend db
Create a token using the `/docs` backend UI and your pre-made master token. It
should have the following permissions:```json
{
"badges": {
"read": ["*"],
"write": [],
"create": false,
"enumerate": false
},
"users": {
"read": [],
"write": [],
"create": false,
"enumerate": false
},
"tokens": {
"read": [],
"write": [],
"create": false,
"enumerate": false
},
"store": {
"badges": {
"read": ["*"],
"write": [],
"create": false,
"enumerate": false
},
"keys": {
"read": ["code"],
"write": [],
"create": false,
"enumerate": false
}
}
}
```Use the provided token to populate `FRONTEND_DEFAULT_TOKEN` in your `.env`.
Finally, build and bringup up the rest of the servers:
docker compose --profile=prod up --build -d