{"id":26214783,"url":"https://github.com/webkom/kvittering","last_synced_at":"2025-04-15T18:42:00.296Z","repository":{"id":37611885,"uuid":"148941833","full_name":"webkom/kvittering","owner":"webkom","description":"🧾 Receipt creator (kvitteringsskildrer)","archived":false,"fork":false,"pushed_at":"2024-04-12T12:13:03.000Z","size":5059,"stargazers_count":8,"open_issues_count":6,"forks_count":2,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-04-13T04:44:28.724Z","etag":null,"topics":["hacktoberfest","nextjs","nextui","poetry"],"latest_commit_sha":null,"homepage":"https://kvittering.abakus.no","language":"TypeScript","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/webkom.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-09-15T21:36:03.000Z","updated_at":"2024-04-15T13:58:07.500Z","dependencies_parsed_at":"2024-04-15T13:57:46.256Z","dependency_job_id":null,"html_url":"https://github.com/webkom/kvittering","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/webkom%2Fkvittering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webkom%2Fkvittering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webkom%2Fkvittering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webkom%2Fkvittering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webkom","download_url":"https://codeload.github.com/webkom/kvittering/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249130998,"owners_count":21217654,"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":["hacktoberfest","nextjs","nextui","poetry"],"created_at":"2025-03-12T10:18:27.015Z","updated_at":"2025-04-15T18:42:00.275Z","avatar_url":"https://github.com/webkom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kvittering\n\n[![Build Status](https://ci.webkom.dev/api/badges/webkom/kvittering/status.svg?ref=refs/heads/master)](https://ci.webkom.dev/webkom/kvittering)\n[![kvittering](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/jitps9/master\u0026style=flat\u0026logo=cypress)](https://dashboard.cypress.io/projects/jitps9/runs)\n\nThis docker image runs as a normal docker container, but can also run as a function in [OpenFaaS](https://www.openfaas.com/). This is not recommended at this time, as the PDF creation can take to long, and it might time-out.\n\nRunning on https://kvittering.abakus.no\n\n### Getting started\n\nThis is one docker image that serves both the python api, and the next/react frontend, this is done by building the webapp as a static site, and serving it as static files through flask.\n\n#### Option 1) Run just the frontend:\n\n```sh\n# Install all packages\n$ yarn\n\n# Start server\n$ yarn dev\n```\n\n#### Option 2) Run the backend (with built frontend):\n\nRequires [Poetry](https://python-poetry.org/docs/#installation)\n\n```sh\n\n# Make a virtual environment\n$ python -m venv venv\n$ source venv/bin/activate\n\n# Install packages\n$ poetry install\n\n# Export the frontend\n$ yarn build\n\n# Start the server\n$ python server/server.py\n\n```\n\n\u003e The webapp will be available on `localhost:5000`\n\n#### OBS: Poppler\n\n\u003e One of the packages (`pdf2image`) will require `poppler` to work correctly with tmp files. Most linux distros come with this. For MacOS `brew install poppler`\n\n### Environment variables\n\n| Variable              | Function                                                                            |\n| --------------------- | ----------------------------------------------------------------------------------- |\n| `MAIL_ADDRESS`        | Set the mail address for generated receipts                                         |\n| `SERVICE_ACCOUNT_STR` | Base64 encoded service account. This means the whole `.json` downloaded from google |\n| `ENVIRONMENT`         | Set to \"production\" for sentry errors                                               |\n| `SENTRY_DSN`          | Ingest errors to sentry                                                             |\n\n\u003e To create a `Base64Encoded` str use `cat \u003cyourfile\u003e.json | base64`\n\n### Generating PDFs\n\nIt's nice to quickly generate `PDFs` when developing, without having to start up everything. To do this you can run:\n\n```sh\n$ python server/generate-example.py signature.png output.pdf image0.png image1.png ...\n\n```\n\nWhere `signature.png` and `imageN.png` are paths to image files (the latter images are optional)\n\n### Testing\n\nRun cypress tests\n\n```sh\n# In one shell\n$ yarn dev\n\n# In another shell\n$ yarn cypress\n```\n\n### Deployment\n\nNew versions are automatically built and deployed when pushing to the `master` branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebkom%2Fkvittering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebkom%2Fkvittering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebkom%2Fkvittering/lists"}