{"id":21590964,"url":"https://github.com/spaceteam/space-trace","last_synced_at":"2025-04-10T22:22:42.914Z","repository":{"id":44159483,"uuid":"424244057","full_name":"SpaceTeam/space-trace","owner":"SpaceTeam","description":"Covid tracing service for the Space Team and Racing Team.","archived":false,"fork":false,"pushed_at":"2022-03-20T22:37:56.000Z","size":1604,"stargazers_count":3,"open_issues_count":4,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-24T19:21:44.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpaceTeam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-03T13:54:30.000Z","updated_at":"2023-02-01T10:48:56.000Z","dependencies_parsed_at":"2022-09-04T00:02:06.196Z","dependency_job_id":null,"html_url":"https://github.com/SpaceTeam/space-trace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceTeam%2Fspace-trace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceTeam%2Fspace-trace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceTeam%2Fspace-trace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpaceTeam%2Fspace-trace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpaceTeam","download_url":"https://codeload.github.com/SpaceTeam/space-trace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248306867,"owners_count":21081747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T16:21:20.092Z","updated_at":"2025-04-10T22:22:42.857Z","avatar_url":"https://github.com/SpaceTeam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# space-trace\n\nTracing service for the [TU Wien Space Team](https://spaceteam.at/?lang=en) and [TU Wien Racing Team](https://en.tuwienracing.at/).\n![Screenshot](https://user-images.githubusercontent.com/21206831/144690589-8ba45b74-cd64-4dd8-8796-748f5ea0fa78.png)\n\n## Features\n\n- Login with Space / Racing Team Google account (SAML).\n- Decode and verify [EU Digital COVID Certificates](https://en.wikipedia.org/wiki/EU_Digital_COVID_Certificate)\n- Upload certificates as PDF or Image.\n- Export contacts in day range\n- Smart Export by defining time range and person.\n\n## Getting started\n\nYou can either set up the environment yourself or use the VSCode Docker environment. Some dependencies, such as `zbar`, are platform-specific and therefore cause potential installation issues (e.g. on Windows and Mac M1 Apple Silicon). With the Docker VSCode setup, you should not encounter such issues.\n\n### Without Docker\n\n1. Install Python3.8 (or higher), `zbar`, `popper`, `libxml2`\n2. Install all dependencies with:\n\n   ```bash\n   python3 -m venv venv\n   source venv/bin/activate\n   pip install -r requirements.txt\n   ```\n\n3. Setup the config by copying `instance/config_example.toml` to\n   `instance/config.toml` and editing the new config\n   (the comments in the file will guide you).\n4. Start the server with:\n   ```\n   export FLASK_APP=space_trace FLASK_ENV=development\n   flask run\n   ```\n\nThis launces a simple webserver which can only be accessed from the localhost.\n\n**Note:** Don't use this server in production, it is insecure and low performance.\n\n### With Docker and VSCode\n\nThe project has a VSCode remote container development environment, so you don't have to deal with platform-specific program installations.\n\n1. Open this project in VSCode\n2. Install the [Remote-Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension\n3. Press `CMD + SHIFT + P` (macOS) or `CTRL + SHIFT + P` (Linux \u0026 Windows)\n4. Run `Remote-Containers: Rebuild and Reopen in Container`\n5. Setup the config by copying `instance/config_example.toml` to\n   `instance/config.toml` and editing the new config\n   (the comments in the file will guide you).\n6. Run `flask run` in container\n\n### Notes on the development environment\n\nThe login does not work in the development environment as SAML would redirect\nto the production service. To work around this limitation you can can visit\n`/login-debug` which will log you in as the user defined by the `DEBUG_EMAIL`\nkey in the `config.toml`. However this, only works when `FLASK_ENV=development`.\n\nBe sure to also add that email to the `ADMINS` list if you want to test the admin\ninterface, and if you want to test certificate upload the email must be in the\nformat: `\u003cfirstname\u003e.\u003clastname\u003e@\u003canydomain\u003e` because the service will verify\nwith the email that the certificate belongs to the user that uploaded it.\n\nIn the development environment the templates are hot reloadable, as is the\npython backend, however editing `config.toml` requires a restart.\n\n## Development\n\n- Use [`black`](https://github.com/psf/black) to format code\n- Try to follow the python style guide [PEP 8](https://www.python.org/dev/peps/pep-0008/)\n- Run all tests before committing with: `python3 -m pytest`\n\n## Deployment\n\nHow we deploy this app on Ubuntu.\n\nInstall the requirements with:\n\n```bash\nsudo apt -y install python3-venv python3-pip libzbar0 libxml2-dev libxmlsec1-dev libxmlsec1-openssl poppler-utils\n```\n\nCreate a virtual env with:\n\n```bash\npython3 -m venv venv\n```\n\nCopy `instance/config_example.toml` to `instance/config.toml` and edit all\nthe fields in it.\n\nClone `instance/saml_example` into `instance/saml_st` and `instance/saml_rt`\nand fill out your SAML configuration. For saml we use the python library\n[python3-saml](https://github.com/onelogin/python3-saml) and documentation to\nsetup SAML can be found [here](https://github.com/onelogin/python3-saml#how-it-works).\n\nOpen `space-trace.service` and edit the username and all paths to the working\ndirectory.\n\nStart the systemd service with:\n\n```bash\nsudo cp space-trace.service /etc/systemd/system\nsudo systemctl daemon-reload\nsudo systemctl enable space-trace.service\nsudo systemctl start space-trace.service\n```\n\nThe service should now be up and running 🎉\n\nTo stop the service run:\n\n```bash\nsudo systemctl stop space-trace.service\n```\n\nTo update the service to a new version (commit) run:\n\n```bash\ngit pull\nsudo systemctl restart space-trace.service\n```\n\n## Resources\n\nSome links I found helpful in dealing with the certificate:\n\n- [What's Inside the EU Green Pass QR Code?](https://gir.st/blog/greenpass.html)\n- [Decoding the EU Digital Covid Certificate QR code](https://www.bartwolff.com/Blog/2021/08/08/decoding-the-eu-digital-covid-certificate-qr-code)\n- [DSC TrustList Update API](https://github.com/Digitaler-Impfnachweis/certification-apis/blob/master/dsc-update/README.md)\n- [Austrian implementation of the EU Digital COVID Certificates](https://github.com/Federal-Ministry-of-Health-AT/green-pass-overview#details-on-trust-listsbusiness-rulesvalue-sets)\n- [inofficial hcert-trustlist-mirror dcc (covid trustlist)](https://github.com/section42/hcert-trustlist-mirror)\n- [lazka / pygraz-covid-cert](https://github.com/lazka/pygraz-covid-cert)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspaceteam%2Fspace-trace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspaceteam%2Fspace-trace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspaceteam%2Fspace-trace/lists"}