🇬🇧 This is the code repository of the Steuerlotse project by Tech4Germany. You can use this code under the terms of the provided license. A live demo is available at: https://steuerlotse.tech4germany.org
🇩🇪 Die ist das Quellcodearchiv des Steuerlotsenprojekts von Tech4Germany. Sie können den Code unter den Bedingungen der angegeben Lizenz nutzen. Ein Onlineprotyp ist verfügbar unter: https://steuerlotse.tech4germany.org
🇬🇧 This is only a prototype and it cannot be used for any real tax purposes. Its goal is to illustrate how a solution can look like. As a result many parts of the tool are simulated and mocked. However, key technical challenges such as the transmission of test data to ELSTER do work.
🇩🇪 Dies ist nur ein Prototyp, der nicht für echte Steuererklärungen genutzt werden kann. Das Ziel ist zu illustrieren, wie eine Lösung aussehen kann. Dementsprechend sind viele Funktionalität lediglich simuliert. Einige technische Herausforderungen, wie die Übertragung von Testdaten an ELSTER, funktionieren beispielhaft.
- Authenticated test data delivery to ELSTER
- Wrapper named
PyEric
for thelibericapi.so
usingctypes
- Uses a local test certificate (not included in the repo, but in the live demo)
- Generates a confirmation as PDF
- Displays server response and transfer ticket
- Wrapper named
- Landing page and information pages match latest design iteration
- Multi step flow that maintains its state even on force-refresh and browser history navigation
- Expiry and deletion of test entries after 10 minutes
- Unittests
The prototype flow is initialised with test data when opened the first time.
- Not all fields are mapped to ELSTER identifiers (i.e. they will not appear in the confirmation PDF)
- Everything related to login and registration is simulated to allow easy testing
- Not all fields are validated
- Not all pages match the latest design iteration.
For developing I suggest running the Flask app locally. Assuming that you are on a UNIX-like OS, the following commands should get you up and running:
# Only first-time setup
git clone git@github.com:tech4germany/steuerlotse.git;
cd steuerlotse;
python3 -m venv venv;
source venv/bin/activate;
pip3 install -r requirements.txt;
# At the beginning of every development session
export FLASK_APP=app;
export FLASK_ENV=debug;
# After every translation change (new strings, updated .po file)
# and also during first-time setup
./scripts/babel_run.sh;
# After major code changes (rest should re-load automatically)
flask run;
Then the website is up and running on http://127.0.0.1:5000.
The docker-compose
currently only works for the production deployment.
However, there is also a docker-compose-dev.yml
for spinning up a local MongoDB is you need to test it.
PyEric
is our wrapper around the ELSTER Rich Client ERiC
.
Unfortunately, we cannot include the ERiC
library in this repository.
If you are interested in testing the integration locally, the ERiC
library that is available for registered developers on the ELSTER dev portal.
You will also need to request test certificates in oder to send authenticated data to the ELSTER services.
The required setup is described in pyeric/README.md
.
The app is built using the Flask framework for Python. It is a light-weight of assembly of other web development tools. In particular we use the following external modules and integrations:
- wtforms for form declaration, parsing, and validation
- jinja2 for template rendering
- babel for translations (string externalization) and locale-aware number parsing
- schwifty for IBAN validation
On the front-end we use the following:
- bootstrap as the default CSS library
- autonumeric.js for number parsing
- and jQuery of course
The project comes with a handful unittests. You can run them as follows:
$ source venv/bin/activate;
$ python3 -m unittest tests;
....................
----------------------------------------------------------------------
Ran 20 tests in 7.230s
OK
If you are missing the ERiC library or a suitable certificate (see above and pyeric/README.md
) then the respective tests will be skipped.