Steuerlotse
General Information / Generelle Informationen
Things that work
- 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.
Things that do not work
- 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 Developers 💻
Build and run 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 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
.
🏗️
Website components overview 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
📃
Testing 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.