Das ist ein Projekt der Pfarrjugend Mariahilf. In diesem Projekt soll ein Aktiensystem für die Jährliche Mini Au Erarbeitet werden
Ein webbasiertes Aktiensystem für die Veranstaltung „Mini Au“. Dieses Projekt simuliert einen kleinen Aktienmarkt für Teilnehmer (z. B. Schüler, Gruppen oder fiktive Firmen).
- Spielerisches Verständnis von Wirtschaft & Börse
- Interaktive Verwaltung von Unternehmen, Aktien, Kursen
- Transparente Benutzerverwaltung mit Depotübersicht
- 👤 Normale Benutzer (sehen ihr Depot, können kaufen/verkaufen)
- 🛠️ Admins (erstellen Unternehmen, setzen Kurse)
- 📋 Registrierung/Anmeldung
- 🏢 Firmen anlegen & verwalten
- 📈 Aktienkurse einsehen
- 💰 Aktien kaufen & verkaufen
- 🗃️ Depotübersicht + Transaktionshistorie
- 🔧 Admin-Panel für Kursanpassung
- 📊 Live-Kursverlauf (optional dynamisch oder manuell gesetzt)
- PHP 8.x
- MySQL
- HTML/CSS (Bootstrap für UI)
- Composer (Paketverwaltung)
- ggf. JavaScript (nur wo nötig)
public/: öffentliche Einstiegspunktesrc/: Business-Logik (MVC)data/: Konfiguration und DB-Zugangvendor/: externe Pakete (per Composer)
Python:
Python dependencies can be installed from the requirements.txt file. We recommend using a venv for installation:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
The top level requirements are:
-
Quart, a reimplementation of the popular Flask web framework for python with ASGI and asyncio support. The webserver is fully sideward-compatible with Flask and the code reads the same (safe for the change in names and additional features).
-
MariaDB Connector/Python (may require MariaDB Connector/C, check the MariaDB Connector FAQ for more information)
MariaDB / MySQL:
-
Install MariaDB (e.g. using
apt-get install mariadb-server mariadb-client). -
Setup database, user (and role) for DAU-JONES1:
-
Connect to your MariaDB server as a user with necessary privileges to complete the next steps. On a regular debian install of MariaDB this can be done by running the following (as root):
shell# mariadb -
Create the required MariaDB structure using the provided script. You may also edit the script or create the database and a user manually to suit your needs. In such cases, take care to also update the appropriate config fields. Remember to set the timezone for the database to UTC!
mariadb> source /path/to/dau-jones/create_db.sql; -
Assign a secure password to the
dau_jonesuser in MariaDB:mariadb> ALTER USER 'dau_jones' IDENTIFIED BY 'YOUR SECURE PASSWORD HERE';Make sure to pay attention to MariaDB quoting behavior.
-
Set the
MARIADB_CONNECTION.passwordfield in theconfig.pyfile accordingly. While not required, we recommend using raw strings in the python file for passwords with special characters. If you chose to use a user or database name other than the default in step 2.2, remember to change the corresponding field of theMARIADB_CONNECTIONdict!
Note that no convenience function is provided as a shorthand for these steps as they should only be run very rarely and generally do not require reset. In most cases, it should suffice to (re-)initialize the database as described in the next step to fix any misconfiguration or reset the internal state. Use the
--overwriteflag for theinit-dbcommand to drop and rebuild the tables used by DAU-JONES. -
-
Initialize the tables in the newly created database (if applicable, remember to run this in your venv!):
shell(venv)$ python3 -m quart init-db -
DB setup complete!
Javascript:
For stock chart rendering, DAU-JONES uses a patched version of ApexCharts which allows access to the easing configuration for the underlying SVG.js library.
-
To setup ApexCharts, download the library file (patch file was generated for version 4.7.0) to
static/js/apexcharts.js. This can be done by executing the following in the project root directory:shell$ wget --directory-prefix=static/js/ 'https://cdn.jsdelivr.net/npm/apexcharts@4.7.0/dist/apexcharts.js' -
Apply the patch file to enable animation easing config option:
shell$ patch -p0 < apexcharts-easing.patch
Footnotes
-
You may change the user, role and database name to whatever you like if you prefer other naming conventions or need to resolve naming conflicts. You can do this either by manually executing the required SQL or by editing the
create_schema.sqlscript accordingly. Make sure to also update these values in the config.py file! ↩