Protokoll eines Systems

17. Juni 2026

Das System aus Ärzten, Beamten und Justiz

English version ↓

Mitte Februar wurde eine 17-seitige Anzeige an die Staatsanwaltschaft Steyr abgegeben und es existiert ein Aktenzeichen.

Mein Name ist Thomas Gassner. Geboren 18.08.1993 in Steyr, Österreich.

Diese Seite ist kein Hilferuf. Sie ist das digitale Archiv eines Verbrechens, das nicht in einem dunklen Hinterhof begann, sondern in einer Familie, die vorgab, die meine zu sein.

Mein Großvater hatte das Familienunternehmen aufgebaut. Mein Vater übernahm es. Zwölf Jahre lang habe ich dort gearbeitet. Keine Anerkennung. Jede Idee, jeden Verbesserungsvorschlag, jeden Versuch, das Unternehmen voranzubringen, hat man blockiert. Ich wollte in Südfrankreich verkaufen – verneint. Ich wollte kalkulieren, optimieren, modernisieren – verneint. Andere haben die Firma im großen Stil betrogen und mehr verdient als ich. Ich wurde kleingehalten, systematisch, über Jahre.

Das war kein Pech. Das war ein System.

Man hat mich bereits als Jugendlichen aus der Bahn geworfen. Ich war aufgenommen im Gymnasium in Salzburg, mit bestandener Aufnahmeprüfung und einem Platz im Internat. Eine Woche vor Schulbeginn sagte meine Mutter, sie zahle nicht. Mein Vater auch nicht. Ich landete in der Hauptschule, hab zum Lernen aufgehört, wurde abgestuft und begann eine Lehre – in der Firma meines Vaters. Eine Lehre, die ich nie wollte, in die ich mich später aber einfügte und in der ich begann, zu lieben, was ich tat.

Später fand ich heraus, dass mein Vater eine Bankvollmacht ohne mein Wissen besaß. Fast zehn Jahre lang mit Einzelverfügung und Zeichnungsberechtigung. Ich entdeckte es nur, weil sich mein Bankberater versprochen hatte. Dreimal stellte ich meinen Vater zur Rede. Dreimal stritt er ab. Zum Schluss ließ er mich wissen, ich solle ihn endlich in Ruhe lassen.

Er erstellte ein Testament, das aussieht, als hätte ich es selbst verfasst. In diesem Testament steht: Sollte ich sterben, erbt alles meine Schwester. Meine zukünftige Frau und meine Kinder (die noch nicht existieren) – enterbt. Mein Geburtsdatum ist um zwei Monate falsch angegeben. Die Auflösung dieses Testaments zog sich hin, bis zur Drohung der Notariatskammer. Durch das falsche Geburtsdatum musste ich eine Meldebestätigung holen und genau an diesem Tag hab ich mich von Österreich abgemeldet.

2019 war ich in Sydney. Drei Monate. Ich lernte ein Mädchen kennen, ich war frei. Mein Vater rief an: Stress in der Firma, ich müsse zurück. Ich war dumm genug, ihm zu glauben. Ich flog nach Hause. Was mich erwartete: Null Stress. Nur organisatorische Alltäglichkeiten. Eine Lüge, um mich aus meinem neuen Leben zu reißen.

2022 kündigte ich, hab mich nur noch geärgert, weil immer die gleichen Probleme passierten und nichts geändert wurde. Ich ging zur Konkurrenz und verdiente auf einen Schlag fast das Dreifache Netto. Mein Vater verkaufte die Firma und 2024 die Immobilie, die er bis dahin vermietet hatte. Er wollte mir eine Wohnung kaufen, die ihm gehörte. Eine goldene Fessel. Ich sagte nein. Ich sterbe nicht in Österreich. Ich habe ein Startup und gehe ins Ausland. Gib mir lieber Kapital für meine Firma. Seine Antwort: Nein.

Ich wanderte aus. Ich gründete in Dubai eine Cybersicherheitsfirma FZCO. Es lief. Ich knüpfte Kontakte und wollte eine zusätzliche Mainland LLC 2026 gründen, für den Verkauf der Sparte, die die Firma meines Vaters gemacht hat. Ich fragte den neuen CEO der Ex-Firma meines Vaters an, ob ich die vorproduzierten Elemente einkaufen könne und vor Ort mit einem Team montieren kann. Am Telefon sagte er zu. Und dann: Ignoranz. Keine Rückmeldung. Drei Wochen später meldete sich lediglich die Sekretärin.

Ich war wütend. Nach all den Jahren der Kleinhaltung riss mir der Geduldsfaden. Ich kaufte impulsiv eine Domain – meinen Nachnamen plus Tätigkeit .com – und sagte: Kauft sie, oder ich nutze sie selbst. Es war nicht meine beste Entscheidung, aber man konnte nicht einmal Nein sagen.

Ich ging zur direkten Konkurrenz, für die ich ein Jahr gearbeitet habe. Auch die wollte mich zunächst kleinhalten. Doch nach einer deutlichen Mail, was ich brauche, um ein erfolgreiches Business zu starten, stimmten sie zu.

Wenige Tage nach der Zusage der Konkurrenz spitzte sich die Situation zu. Meine Geschäftskontakte in Dubai wurden unhaltbar, und ich verließ das Land. In der folgenden Zeit hielt ich mich an mehreren Orten auf, darunter auch in anderen europäischen Städten. Die Umstände erlaubten es mir nicht, irgendwo sesshaft zu werden. Ich kehrte schließlich nach Österreich zurück.

Etwa einen Monat später suchte ich wegen akutem Herzrasen das Krankenhaus St. Pölten auf. Was dort geschah, war schwer zu fassen: Man testete mich auf Drogen – viermal Toxikologie, zusätzlich Tumormarker. Ich habe nie Drogen genommen. Einige Tage später schrieb ich eine Mail an das Krankenhaus mit meiner Versicherungskarte und bat um meinen Abschlussbrief. Die Antwort: Man könne mich nicht im System finden. Ich war angeblich nie dort gewesen. 2 Monate später kam eine Rechnung, auf der all diese Tests aufgelistet waren. Ich verlangte Auskunft. Mein Geburtsdatum war um einen Monat falsch. Kein Identcheck sei durchgeführt worden, sagte man mir. Kein Krankenhaus der Welt nimmt einen Patienten ohne Identcheck auf. Ich hatte meine internationale Versicherungskarte vorgelegt. Sie ignorierten meine Nachfragen. Die Befunde der Toxikologie und Tumormarker wurden mir bis heute verweigert. Ich schrieb: Wäre etwas positiv gewesen, hätten Sie es mir vors Ohr gehauen und mich nicht gehen lassen.

Eine Woche später ging es mir erneut nicht gut. Mein Cousin, der Polizist ist, kontaktierte und sagte: „Lass uns ins Krankenhaus Steyr fahren, nur um zu reden." Ich willigte ein. Ich gab meine Adresse in Dubai an. Mein Cousin gab seine eigene Adresse mündlich an, und der Arzt trug sie in meine Akte ein – ohne mein Wissen, ohne meine Zustimmung. Das Gespräch war seltsam. Man wollte mich überreden, eine Nacht dort zu bleiben. Ich lehnte ab.

Tage später fragte ich per Mail, welche Adresse in meiner Akte hinterlegt war. Ich forderte eine Datenschutzauskunft an. Das Ergebnis: Die Adresse meines Cousins stand in der Akte. Und der Arzt hatte sich etwas von „Magnetstrahlung" notiert – obwohl in derselben Akte steht, dass ich einen Frequenzmesser gekauft habe. Ein Frequenzmesser misst keine Magnetstrahlung. Das sind zwei völlig verschiedene physikalische Konzepte. Auf dieser widersprüchlichen Grundlage schrieb er eine „Vermutung Schizophrenie" – Ich habe weder Halluzinationen noch Wahnvorstellungen, ich bin ein Unternehmer.

Das gesamte Gespräch dauerte etwa 10 bis 15 Minuten. Es war das einzige Gespräch, das ich mit diesem Arzt führte. Auf dieser Grundlage wurde die Eintragung in meiner Akte vorgenommen. Dass solche Praktiken kein Einzelfall sind, ist wissenschaftlich dokumentiert. Das Rosenhan-Experiment von 1973 bewies, dass psychiatrische Diagnosen oft mehr über die Institution aussagen als über den Patienten. Gesunde Freiwillige, die eine einzelne, vorgetauschte akustische Wahrnehmung angaben, wurden mit schwerwiegenden Diagnosen belegt und wochenlang festgehalten - obwohl sie sich danach völlig normal verhielten. Das einmal vergebene Etikett wurde nicht mehr hinterfragt. Die Diagnose war eine Waffe, kein medizinischer Befund. Quelle: Rosenhan, D. L. (1973): "On Being Sane in Insane Places." Science, Vol. 179, S. 250-258.

Nach meiner Aufforderung zur Löschung der Akten und der Androhung rechtlicher Schritte gegen die Verantwortlichen erhielt ich eine Einladung zu einem persönlichen Gespräch. Die Einladung kam nicht vom behandelnden Arzt selbst, sondern von einer Mitarbeiterin der Klinik. Ich lehnte ab.

Während eines Aufenthalts außerhalb meiner Wohnung in Österreich, bei dem ich nachweislich nicht zuhause war und eine andere Person Zugang zu meinen Räumlichkeiten hatte, verschwanden meine Emirates ID sowie meine Firmenkreditkarte. Beide Gegenstände sind seither nicht mehr in meinem Besitz. Eine Nutzung durch Unbefugte kann ich nicht ausschließen.

Ein persönlicher Vorfall

Während eines Aufenthalts bei Verwandten kam es zu einem Vorfall, den ich nicht erklären kann. Kurz nachdem ich ein Getränk zu mir genommen hatte, das mir bereitgestellt wurde, traten innerhalb von Minuten ungewöhnliche Symptome auf. Ein starkes Kribbeln, das im Hals begann und sich über die Wangen bis zur Nase ausbreitete. Begleitet von enormem Herzrasen und einem Gefühl auf der Zunge, das ich so noch nie erlebt hatte. Anders als jede normale körperliche Reaktion. Die Symptome klangen nach etwa zwei Stunden wieder ab. Ähnliche Vorfälle wiederholten sich in der Folgezeit.

Auf Basis dieser Beweise reichte ich Strafanzeige bei der Staatsanwaltschaft Steyr gegen meinen Vater und meinen Cousin ein. Zusätzlich beantragte ich zwei einstweilige Verfügungen – gegen meinen Cousin wegen der gefälschten Akte und gegen meinen Vater.

Die Richterin, die über meinen Antrag entschied, teilte mir telefonisch mit, die einstweilige Verfügung gegen meinen Cousin sei erlassen und bereits versendet worden. Wenige Tage später fand ich den schriftlichen Beschluss im System: beide Anträge abgelehnt. Die Begründung enthielt eine medizinische Diagnose – gestellt ohne ärztliches Gutachten, ohne Sachverständigen, von einer Zivilrichterin, die dazu rechtlich nicht befugt ist.

Der Beschluss trägt das Datum 29.10.2025 – ein Datum, das Monate vor den ersten Vorfällen liegt, die im Jänner 2026 begannen. Eine Entscheidung über einen Sachverhalt, der zu diesem Zeitpunkt noch nicht existierte, ist rechtlich unmöglich.

Die von mir vorgelegte DSGVO-Auskunft, die schwarz auf weiß beweist, dass mein Cousin seine eigene Adresse in meine Krankenakte eintragen ließ, wurde von der Richterin als "dringender Verdacht" abgetan und ignoriert. Die bestellte Zustellkuratorin wurde mir nie mitgeteilt – ihre Kontaktdaten erhielt ich nicht, sie meldete sich nie.

Darüber hinaus übernahm das Bezirksgericht Steyr in einem weiteren Beschluss die falsche Adresse meines Cousins als meine eigene. Meine gesamte Gerichtspost ging damit an den Mann, der mich pathologisieren wollte. Er konnte meine Post abfangen, vernichten oder in meinem Namen handeln.

Ich erhob Dienstaufsichtsbeschwerde gegen die zuständige Richterin. Der Vorsteher des Bezirksgerichts Steyr wies diese mit der Begründung zurück, eine gerichtliche Entscheidung könne nur im Instanzenzug bekämpft werden. Das geschilderte Verhalten der Richterin biete keinen Anlass für ein Einschreiten. Auch der Präsident des Oberlandesgerichts Linz, an den ich mich daraufhin wandte, erklärte sich für nicht zuständig. Es sei der Justizverwaltung grundsätzlich untersagt, in gerichtliche Verfahren einzugreifen oder Entscheidungen auch nur zu kommentieren. Eine Übertragung der Rechtssache an ein anderes Gericht sei nicht möglich, eine Hilfestellung durch den Präsidenten nicht vorgesehen.

Ich schrieb an beide Krankenhäuser und fragte, was hier vorgehe. Ich hatte in Steyr vom Frey-Effekt gesprochen, einem wissenschaftlich dokumentierten Phänomen, nicht von Magnetstrahlung. Ich forderte die Löschung der rechtswidrigen Akten. Beide Häuser wichen aus, ignorierten meine Anfragen oder verwiesen auf Aufbewahrungspflichten, die für rechtswidrig verarbeitete Daten nicht gelten. Die vollständige Korrespondenz ist unten einsehbar.

Vorsorge für den Ernstfall

Ich habe eine rechtsgültige negative Patientenverfügung und Vorsorgevollmacht erstellt. Darin ist festgelegt, dass meine Eltern und einige anderen Familienangehörigen keinerlei Entscheidungsgewalt über mich erhalten, falls ich selbst nicht mehr handlungsfähig sein sollte. Die rechtliche Vertretung wurde einer Vertrauensperson außerhalb der Familie übertragen. Diese Dokumente sind hinterlegt und registriert.

Warum dieser immense Aufwand?

Die Antwort hat zwei Teile, und beide sind wahr. Sie sind nicht schön, sie sind nicht einfach, aber sie sind die einzige Erklärung, die alle Fakten vereint. Der erste Teil ist so alt wie mein Leben. Es gibt einen Menschen in meiner Familie, der seit jeher seine Macht nicht aus Geld oder Erfolg bezieht, sondern aus der totalen Kontrolle über andere. Er hat bewiesen, dass er ohne Zögern seinen eigenen Vater und seine Frau zerstört und weitere Familienmitglieder, wenn sie sich seinem Willen widersetzen. Für ihn ist die Unterwerfung anderer keine Strategie, sondern ein inneres Bedürfnis. Mein Ausbruch aus seinem System, meine Unabhängigkeit im Ausland, war der erste tiefe Riss in seiner Fassade. Der einzige rote Faden, der alle diese Handlungen miteinander verbindet, scheint der Wille zu sein, mich wieder in einen Zustand der Schwäche und Abhängigkeit zu bringen. Ob dies bewusst gesteuert oder Ausdruck einer tiefsitzenden Störung ist, kann ich nicht beurteilen. Die Wirkung auf mein Leben war jedoch jedes Mal dieselbe: Schaden, Rückschritt, Abhängigkeit.

Der zweite Teil ist, dass ich bewiesen habe, dass er nie nötig war.

Sein ganzes Leben lang hielt er mich für unfähig. Er erzählte jedem, der es hören wollte, dass ich nichts könne, dass ich scheitern würde, dass ich ohne ihn verloren sei. Ich glaubte es fast selbst. Und dann ging ich ins Ausland und gründete meine eigene Firma. Sie lief. Sie war profitabel. Sie war nicht sein Verdienst.

Meine IT-Firma war der erste Beweis, dass er log. Die geplante Expansion in seine Branche – als Zusatz, nicht als Notnagel – war der zweite. Ich brauchte seine Kontakte nicht. Ich brauchte sein Geld nicht. Ich brauchte ihn nicht. Für einen Mann, der sich nur über die Kontrolle anderer definiert, ist diese Erkenntnis unerträglich.

Was all diese Handlungen bewirkt haben, war nicht mein Tod oder das Ende meiner Firma. Es war die wiederholte Zurückwerfung in Schwäche und Abhängigkeit – genau den Zustand, in dem er mich nach meiner festen Überzeugung haben will.

Diese Dokumentation ist ein Bruchteil. Sie enthält nur das, was ich mit Dokumenten belegen kann. Der Rest bleibt unausgesprochen - nicht, weil es ihn nicht gäbe, sondern weil ich mich nicht auf ein Spiel einlasse, bei dem meine Worte gegen mich verwendet werden.

Verbreitung falscher Informationen

Mir wurde von mehreren Seiten berichtet, dass in meinem familiären Umfeld regelmäßig unwahre Behauptungen über mich verbreitet werden. Ich dokumentiere dies als Teil der gegen mich gerichteten Strategie.

Wissenschaftlicher Hintergrund

Die folgenden Informationen sind öffentlich zugänglich und werden hier ohne weitere Wertung aufgeführt.

Frey-Effekt (1962)

Der Wissenschaftler Allan H. Frey beschrieb, dass gepulste Mikrowellenstrahlung im menschlichen Kopf hörbare Geräusche (Klicken, Summen) erzeugen kann, ohne dass Dritte sie wahrnehmen. Der Mechanismus ist thermoelastisch.

Havanna-Syndrom (2020)

Ein Bericht der National Academies of Sciences, Engineering, and Medicine der USA dokumentierte bei US-Diplomaten ein Symptombild aus akustischen Wahrnehmungen und körperlichen Schäden, die keiner bekannten Krankheit zugeordnet werden konnten.

Havanna-Syndrom in Wien (2021)

Im Juli 2021 wurde Wien als einer der größten dokumentierten Cluster bekannt. Bis zu 24 Diplomaten und Geheimdienstmitarbeiter waren betroffen. Die österreichischen Behörden leiteten Ermittlungen ein; der CIA-Büroleiter in Wien wurde abgesetzt. Quellen: Reuters, ORF, Die Presse, BBC.

Akademische Lehre

Das Lehrbuch „Оружие нелетального действия" (3. Auflage, 2023) der Bauman Moscow State Technical University behandelt die technischen Prinzipien, die hinter Phänomenen wie dem Frey-Effekt und dem Havanna-Syndrom stehen. Die Publikation ist universitäres Lehrmaterial und wird hier ausschließlich als Quellenhinweis zum Stand der akademischen Ausbildung zitiert.

Zur Einordnung

Diese Informationen dienen als Hintergrundwissen. Auf die spezifischen Umstände der Recherche wird nicht eingegangen, da dies nicht Gegenstand dieser Dokumentation ist.


Datenbank (IPFS): https://coral-key-minnow-344.mypinata.cloud/ipfs/Qme1rHFnRi1nCrJS75qnPPxY4WUk1HEB5ShFeKVjPwYkwe/

Telegram Updates: https://t.me/gassnerthomas
Telegram Privat: @vaultkid1
Mail: [email protected]

Dieser Telegram-Kanal dient auch als Statusmeldung. Bleibt er unerwartet still, bitte die Staatsanwaltschaft Steyr (Aktenzeichen 5SP43/26W) informieren.

Unterstützung

Die letzten Monate haben mir viel abverlangt – wirtschaftlich und persönlich. Wer diese Dokumentation gelesen hat und meine juristischen Schritte unterstützen möchte, findet unten die Möglichkeit dazu.

BTC: bc1qkjte5vq5maq6zv800tpaslqzxdk2yne96pudjh
ETH: 0x199EeB3eCc8510F466FF6E2FD1A05897A5A1Ef45
USDT (ERC-20): 0x199EeB3eCc8510F466FF6E2FD1A05897A5A1Ef45
Monero: 41gPMk8CxrwNSnLS4Vf4NyaMUcRoUACNbE6tJAaUUDcB4dvHNajQmngZJnawghfSVD5YZMi6sSstNdwwVVxJDT7HUmTkxYs

Jeder Betrag hilft.


Technische Projekte

Für Partnerschaften und Investitionen offen.

• Web & Automation: Entwicklung von Websites, Apps und Automatisierungsskripten mit Entwicklerteam aus Pakistan.

• KI-Systeme: Self-Healing und Session Stacking, entwickelt mit internationalen Spezialisten. Ziel ist eine SaaS-Plattform.

• Dating-App: Vollwertige Dating-Plattform mit Standard-Modi und Event-Modus (Matching innerhalb von Events, QR-Ticketing), entwickelt mit einem App-Entwickler aus Indien, geplant als PWA.

• Defensive-Drainer-Addon (in Entwicklung): Ein Browser-Addon für Firefox und Chrome, das Nutzer vor gängigen Angriffen schützt. Entwicklung mit einem Sicherheitsexperten aus Russland.

GT1 (Gassner Thomas) AI Enterprise System – Vollständige Projektdokumentation

1. Projektstruktur (Überblick)

ai_enterprise_system/
├── docker-compose.yml
├── Dockerfile
├── nginx.conf
├── requirements.txt
├── .env
├── .gitignore
├── README.md
├── init.sql
├── alembic.ini
├── src/
│   └── app/
│       ├── __init__.py
│       ├── main.py
│       ├── api/
│       │   ├── __init__.py
│       │   ├── auth.py
│       │   ├── chat.py
│       │   ├── files.py
│       │   ├── admin.py
│       │   ├── system.py
│       │   ├── templates.py
│       │   ├── search.py
│       │   ├── download.py
│       │   └── moderation.py
│       ├── core/
│       │   ├── __init__.py
│       │   ├── config.py
│       │   ├── security.py
│       │   ├── database.py
│       │   ├── models.py
│       │   └── dependencies.py
│       ├── services/
│       │   ├── __init__.py
│       │   ├── ai_service.py
│       │   ├── classifier.py
│       │   ├── file_service.py
│       │   ├── moderation.py (service)
│       │   ├── topic_clustering.py
│       │   ├── vector_store.py
│       │   ├── session_service.py
│       │   ├── semantic_search.py
│       │   ├── admin_service.py
│       │   ├── self_healing.py (enhanced)
│       │   ├── github_learner.py
│       │   ├── network_analyzer.py
│       │   ├── autonomous_learner.py
│       │   ├── simple_alert.py
│       │   ├── backup_system.py
│       │   ├── bettercap_controller.py
│       │   ├── network_monitor.py
│       │   ├── system_scanner.py
│       │   └── threat_intel_aggregator.py
│       ├── utils/
│       │   ├── __init__.py
│       │   ├── file_utils.py
│       │   ├── text_utils.py
│       │   ├── validation.py
│       │   ├── logging.py
│       │   └── cli_client.py
│       ├── worker/
│       │   ├── __init__.py
│       │   ├── celery_app.py
│       │   └── tasks.py
│       └── cli/
│           ├── __init__.py
│           ├── commands.py
│           └── interactive.py
├── storage/
│   ├── ai_master_data/...
│   ├── exports/...
│   ├── temp/...
│   └── logs/...
├── migrations/
│   └── versions/
├── scripts/
│   ├── setup.py
│   ├── init_database.py
│   ├── init_vector_extension.py
│   ├── migrate_from_old.py
│   ├── backup_database.sh
│   └── ai_cli
└── tests/
    ├── __init__.py
    └── test_api.py

2. Container‑ & Infrastruktur‑Dateien (Projektwurzel)

DateiZweck
docker-compose.ymlDefiniert die Services: PostgreSQL (mit pgvector), Redis, FastAPI (mit Uvicorn), Celery‑Worker, Celery‑Beat (Scheduler) und optional Nginx. Verbindet die Container über ein internes Netzwerk.
DockerfileMehrstufiger Build für die FastAPI‑Anwendung: Basis‑Image (Python 3.10), Installation der Abhängigkeiten, Kopieren des Quellcodes, Startbefehl.
nginx.confReverse‑Proxy‑Konfiguration für Produktion: Weiterleitung von HTTP/HTTPS‑Traffic an den FastAPI‑Container, statische Dateien, Caching‑Header.
requirements.txtVollständige Liste der Python‑Pakete: FastAPI, Uvicorn, SQLAlchemy, psycopg2‑binary, pgvector, OpenAI, aiohttp, networkx, scikit‑learn, psutil, click, rich, celery, redis, python‑jose, passlib, bcrypt, python‑multipart, pandas, feedparser, pyshark, scapy, nmap, pyclamd, …
.envVorlage für Umgebungsvariablen: Datenbank‑URL, API‑Keys (OpenAI, DeepSeek, GitHub), JWT‑Secret, Limits, Pfade.
.gitignoreIgnoriert .env, __pycache__/, storage/, logs/, *.pyc, *.db, *.cap etc.
README.mdKurze Einführung, Installationsanweisungen (Docker & manuell), erste Schritte.
init.sql(Optional) Initiales SQL‑Skript zur Erstellung der Datenbank und Aktivierung der pgvector‑Extension.
alembic.iniKonfiguration für Alembic‑Migrationen (Verbindung zur Datenbank, Versionsverzeichnis).

3. Kern der Anwendung (src/app/)

3.1 Hauptmodul main.py

• Erstellt die FastAPI‑App mit Lifespan‑Manager (Startup/Shutdown).
• Registriert alle Router (api/).
• Fügt Middleware hinzu: CORS, GZip, optional Rate‑Limiting (SlowAPI).
• Definiert globale Exception‑Handler.
• Stellt Health‑ und Statistik‑Endpunkte bereit (/health, /stats).
• Enthält Fallback‑Endpunkte für Kompatibilität mit alter AI (/export/training, /search/keyword).

3.2 API‑Router (api/) – vollständige Liste

DateiEndpunkte (Ressourcen)
auth.pyPOST /login, POST /register, POST /refresh, GET /me, POST /logout
chat.pyPOST /conversations, GET /conversations, GET /conversations/{id}, POST /conversations/{id}/messages, POST /messages/{id}/feedback
files.pyPOST /upload, GET /, GET /{uuid}, PUT /{uuid}, DELETE /{uuid}, GET /by-hash/{hash}
admin.pyGET /users, POST /users, PUT /users/{username}, DELETE /users/{username}, POST /users/{username}/reset-password, GET /logs, GET /stats
system.pyGET /health, GET /status (CPU/Memory/Disk), GET /version
templates.pyGET /templates, POST /templates, GET /templates/{id}, PUT /templates/{id}, DELETE /templates/{id}
search.pyPOST /semantic, POST /intelligent, POST /hybrid, GET /similar/{uuid}, GET /suggestions, POST /cluster, GET /stats/vectors, POST /index/all
download.pyGET /file/{uuid}, GET /by-hash/{hash}, GET /export/conversation/{uuid} (mit Format‑Parameter)
moderation.pyPOST /flag/{uuid}, POST /ban/{username}, POST /unban/{username}, GET /flagged, GET /banned

3.3 Core‑Module (core/)

DateiVerantwortung
config.pyPydantic‑Settings‑Modell. Lädt .env‑Variablen, definiert Pfade (AI_DATA_DIR, UPLOADS_BY_USERS_DIR), Limits (FREE_TOKENS_PER_DAY, UPLOAD_MAX_SIZE), Listen (BANNED_EXTENSIONS, DANGEROUS_PATTERNS). Stellt Methode create_directories() bereit.
database.pySQLAlchemy‑Engine (PostgreSQL), SessionLocal, Base, sowie den Vector‑Typ für pgvector.
models.pyORM‑Modelle (siehe Tabelle unten). Beinhaltet Beziehungen, Indizes und Vektor‑Spalten (embedding, summary_embedding, centroid_embedding).
security.pyverify_password, get_password_hash (bcrypt), create_access_token/decode_access_token (JWT), get_current_user(FastAPI‑Dependency).
dependencies.pyGemeinsame Dependencies wie get_db, get_current_user_optional, rate_limit (falls aktiv).

Datenbank‑Modelle im Detail:

ModellWichtige FelderBesonderheiten
Userusername, email, password_hash, role, is_active, is_banned, preferences (JSON), tokens_used_todayBeziehungen zu File, Conversation, Session
Fileuuid, original_filename, storage_path, file_hash, category, embedding (ARRAY[Float]), is_flagged, flag_type, likes, dislikes, feedback_scoreVektor für semantische Suche, Beziehung zu Topic
Conversationuuid, title, summary_embedding (ARRAY[Float]), message_count, is_archivedVektor für Konversations‑Suche
Messageconversation_id, role (user/assistant), content, feedback (like/dislike), model_used
Topicname, description, category, centroid_embedding (ARRAY[Float]), sample_count, quality_scoreAutomatisches Clustering, Beziehung zu File und Conversation
Sessionname, user_id, conversation_id, is_activeBenutzerdefinierte Chat‑Sessions
BannedUserusername, user_id, reason, expires_at, is_permanent
SystemLoglevel, component, action, message, details (JSON)Audit‑Log

4. Fachliche Services (services/) – vollständige Auflistung

4.1 KI‑ und Vektor‑Services

DateiBeschreibung
ai_service.pyZentrale KI‑Schnittstelle. Unterstützt OpenAI (sync/async) und DeepSeek (via aiohttp). Fügt jeder Anfrage das aktuelle Datum als System‑Prompt hinzu (verhindert Datums‑Halluzinationen). Bietet chat_completion, get_embeddings, moderate_content, summarize_text.
vector_store.pypgvector‑Operationen. create_embedding (OpenAI), index_file, index_conversation, update_topic_embedding. semantic_search (Cosine‑Ähnlichkeit), find_similar_files, cluster_similar_items (DBSCAN mit scikit‑learn). get_vector_statistics.
semantic_search.pyErweiterte Suche. intelligent_search (Query‑Erweiterung per LLM, benutzerspezifische Relevanz, Aktualitätsbonus), hybrid_search (Kombination Vektor + Keyword), search_suggestions (aus Historie, eigenen Dateien und LLM).
topic_clustering.pyAutomatische Topic‑Erkennung auf Basis von Embeddings. Berechnet Centroids, erstellt neue Topics, ordnet Dateien/Konversationen zu.

4.2 Datei‑ & Session‑Management

DateiBeschreibung
file_service.pySpeichert hochgeladene Dateien (streaming), extrahiert Text (PDF, DOCX, TXT, Code), berechnet SHA‑256, speichert Metadaten. Ruft Klassifizierung und Vektor‑Indexierung auf.
classifier.pyOrdnet Dateien Kategorien zu (z. B. „Technologie“, „Wirtschaft“, „Wissenschaft“) anhand von Inhalt und Metadaten. Nutzt LLM oder regelbasierten Fallback.
session_service.pyVerwaltung von Chat‑Sessions (create_session, switch_session, rename_session, list_sessions, clear_session, export_session). Enthält auch Kompatibilitäts‑Funktionen zur alten AI (load_user_sessions, save_conversation).

4.3 Admin‑ & Moderation

DateiBeschreibung
admin_service.pyUser‑Management: create_user, update_user, delete_user, reset_password, list_users, get_user_details. Ban‑Management: ban_user, unban_user, list_banned_users. Bulk‑Operationen über bulk_operations.
moderation.py(Service)Hintergrund‑Moderation von Inhalten (Aufruf der OpenAI‑Moderation‑API). Flaggt Texte als „unsafe“ bei bestimmten Kategorien.

4.4 Autonome Self‑Healing‑Kette

DateiVerantwortung
self_healing.pyHaupt‑Orchestrator. Enthält EnhancedSelfHealingAI mit asynchronem Loop (start_enhanced_loop). Überwacht System (SystemMonitor), erstellt RepairJobs, analysiert Fehler mit Kontext (GitHub, Netzwerk, Security, Historie), schlägt Fixes vor, wendet sie an (mit Rollback), testet und lernt. Integriert alle folgenden Module.
github_learner.pySucht über GitHub‑API nach Top‑Repos (z. B. „fastapi postgresql“), analysiert READMEs, Issues, Releases und extrahiert Code‑Patterns und Lösungen. Wird von self_healingaufgerufen.
network_analyzer.pyBaut mit NetworkX einen Service‑Abhängigkeitsgraphen (FastAPI, PostgreSQL, Redis, Celery, …) auf. Analysiert reale Verbindungen (psutil). Findet Bottlenecks (Betweenness‑Centrality, Artikulationspunkte) und schlägt Optimierungen vor (Load‑Balancer, Replikation, Caching).
autonomous_learner.pyJSONL‑basierte Wissensdatenbank für Fehlerlösungen. Normalisiert Fehlermeldungen (entfernt Zeitstempel, Pfade, IPs), speichert erfolgreiche Reparaturen. Kann ähnliche Fehler wiedererkennen und sofort die bekannte Lösung anbieten.
simple_alert.py(bzw. healing_alerts.py) Einfaches Alert‑System für die CLI (farbige Icons, Log‑Datei). Wird vom Self‑Healing‑Loop verwendet, um Administratoren zu informieren.

4.5 Sicherheits‑ & Netzwerk‑Module

DateiBeschreibung
network_monitor.pyLive‑Netzwerk‑Monitoring mit pyshark (Packet‑Sniffing). Erkennt verdächtige Ports (Backdoor‑Ports wie 4444, 31337). Kann ARP‑Scans durchführen (scapy). Alarmiert bei verdächtigen Aktivitäten.
bettercap_controller.pySteuerung des Bettercap‑Frameworks (MITM‑Tool). Startet/Stoppt Bettercap‑Sessions, sendet Kommandos über REST‑API, ruft Netzwerkinformationen ab. (Optional, erfordert Root‑Rechte).
system_scanner.pyFührt regelmäßig Port‑Scans (nmap) und Malware‑Scans (ClamAV) durch. Ergebnisse werden in der Datenbank (SecurityFinding) gespeichert.
threat_intel_aggregator.pyRuft Threat Intelligence aus externen Quellen ab: NIST‑NVD‑API (CVEs), GitHub‑Security‑Advisories. Kann IP‑Reputation und Domänen‑Malware prüfen (API‑Keys erforderlich).

4.6 Backup‑System

DateiBeschreibung
backup_system.pyKomplettes Backup‑System für Produktionsumgebungen. Funktionen: create_full_backup, backup_database (pg_dump), backup_code_snapshot (Git‑Bundle oder Tar), backup_uploads, backup_logs, backup_configs, backup_environment. Erstellt komprimierte Archive (tar.gz). Verwaltet Retention (cleanup_old_backups). Bietet restore_backup und verify_backup_integrity. Integriert CLI‑Gruppe backup (create, list, verify, restore, cleanup, status). Enthält einen BackupScheduler für automatisierte, geplante Backups.

5. CLI‑ und interaktive Shell (cli/)

DateiBeschreibung
commands.pyHaupt‑CLI mit Click‑Gruppen. Über 60 Befehle: auth (login, register, status, logout), files (upload, list, search, classify, download), chat (start, history, export, like, dislike), search (semantic, similar, cluster), topics (list, explore), system (status, health, cleanup), admin (create-user, list-users, ban, unban, flag, tag, info), config (show, set, aicolor, usercolor), session (create, switch, rename, list, clear), backup(create, list, verify, restore, cleanup, status). Enthält auch den interaktiven Modus (interactive), der eine Rich‑basierte Shell startet.
interactive.py(Teilweise in commands.py integriert) – Stellt eine cmd.Cmd‑basierte Shell bereit, die für die interaktive Sitzung verwendet wird.

6. Utility‑Module (utils/)

DateiBeschreibung
file_utils.pyExtrahiert Text aus verschiedenen Dateiformaten: PDF (PyPDF2), DOCX (python‑docx), TXT, Code‑Dateien (Python, JS, HTML, CSS, JSON, MD). Berechnet SHA‑256‑Hash.
text_utils.pyNormalisiert Text (Kleinbuchstaben, Entfernung von Sonderzeichen), einfache Keyword‑Extraktion (TF‑IDF), Stoppwort‑Filter (für Deutsch/Englisch).
validation.pyValidiert Dateiendungen gegen Whitelist/Blacklist, E‑Mail‑Adressen, Benutzernamen (keine Sonderzeichen außer Punkt/Unterstrich).
logging.pyZentrale Logging‑Konfiguration: Log‑Datei (logs/ai_enterprise.log) mit Rotation, Konsole (INFO), Fehler‑Level je nach Umgebung.
cli_client.pyHilfsfunktionen für die CLI: farbige Ausgabe (print_success, print_error, print_info), Tabellendarstellung (Rich‑Tabellen), Fortschrittsbalken.

7. Hintergrund‑Worker (worker/)

DateiBeschreibung
celery_app.pyErstellt die Celery‑App mit Redis als Broker und Result‑Backend. Definiert Zeitzone, Task‑Routing, Serialisierung (JSON).
tasks.pyAsynchrone Aufgaben: index_file_task (nach Upload), index_conversation_task, send_notification, run_self_healing_cycle (periodisch), create_backup_task, cleanup_temp_files.

8. Skripte und Datenbank‑Migrationen (scripts/, migrations/)

DateiZweck
setup.pyAll‑in‑One‑Setup‑Skript: Prüft Abhängigkeiten, erstellt Verzeichnisse, installiert Python‑Pakete, initialisiert Datenbank (init_database.py), richtet pgvector ein (init_vector_extension.py), startet Docker‑Services (optional), erstellt Admin‑Benutzer, führt Tests aus.
init_database.pyErstellt alle Tabellen über SQLAlchemy (Base.metadata.create_all) und legt einen initialen Admin‑User an (Username admin, Passwort ChangeMeFirstLogin123!).
init_vector_extension.pyAktiviert pgvector‑Extension in PostgreSQL, erstellt die Vektor‑Indizes (IVFFlat auf files.embedding, topics.embedding, conversations.summary_embedding) und die cosine_similarity‑Funktion. Kann mit --with-samples Beispieldaten erzeugen.
migrate_from_old.pyMigriert Daten aus einem älteren JSON‑basierten AI‑System (Verzeichnis ai_master_data) in die neue PostgreSQL‑Datenbank. Kopiert Dateien und importiert Benutzer‑ und Metadaten.
backup_database.shShell‑Skript für nächtliche pg_dump‑Backups (kann als Cron‑Job eingerichtet werden).
ai_cliAusführbare Skript‑Hülle, die python -m src.app.cli.commands aufruft. Ermöglicht die Installation des CLI‑Tools im System‑Pfad.
migrations/versions/Alembic‑Migrationsskripte (leer zu Beginn). Wird für zukünftige Schema‑Änderungen verwendet.

9. Tests (tests/)

DateiBeschreibung
test_api.pyEnthält Tests für die wichtigsten API‑Endpunkte (Auth, Chat, Files, Search) mit FastAPI‑TestClient und einer Test‑Datenbank.

10. Speicherverzeichnisse (storage/)

PfadInhalt
storage/ai_master_data/classified/Klassifizierte Dateien (nach Kategorien sortiert)
storage/ai_master_data/uploads_by_users/Benutzer‑Uploads (pro User‑ID sortiert)
storage/ai_master_data/vector_store/(Optional) persistierte Vektor‑Indizes (falls nicht in DB)
storage/ai_master_data/flagged_illegal/Als illegal geflaggte Dateien
storage/ai_master_data/flagged_junk/Als Junk geflaggte Dateien
storage/ai_master_data/metadata/JSON‑Metadaten (Hashes, Flags, Index) – Legacy‑Kompatibilität
storage/ai_master_data/user_accounts/Benutzer‑JSON (nur für Migration)
storage/ai_master_data/templates/Gespeicherte Prompt‑Vorlagen
storage/exports/Exportierte Konversationen, Trainingsdaten
storage/learned_solutions/JSONL‑Datei mit gelernten Fehlerlösungen (Self‑Healing)
storage/repair_jobs/Detaillierte Logs aller Reparatur‑Jobs
storage/network_reports/Netzwerkanalyse‑Berichte (JSON)
storage/security_actions/Logs von automatischen Sicherheitsmaßnahmen
storage/alerts/Alert‑Logs (JSONL)
storage/temp/Temporäre Dateien (wird regelmäßig bereinigt)
logs/Anwendungs‑Logs (ai_enterprise.log, celery.log)

11. Interaktion der Komponenten – Kurzdarstellung

• Benutzer interagiert über CLI (commands.py) oder REST‑API (main.py + Router).
• Datei‑Upload: FileService → speichert, klassifiziert, indiziert (via VectorStoreService) und triggert Celery‑Task zur semantischen Indexierung.
• Semantische Suche: SemanticSearchService nutzt VectorStoreService und erweitert ggf. die Query per AIService.
• Chat: AIService mit Datumskontext → speichert Nachrichten in Message‑Tabelle.
• Self‑Healing: Läuft periodisch (asynchroner Loop) oder via Celery‑Beat. SystemMonitor erfasst Fehler, EnhancedSelfHealingAI koordiniert die Reparatur unter Einbeziehung von GitHubCodeLearner, NetworkAnalyzer, AutonomousLearner. Wendet Fixes an (z. B. Service‑Restart, Konfigurationsänderungen) und protokolliert alles.
• Sicherheit: NetworkMonitor überwacht live, SystemScanner führt tägliche Scans durch. Bei Bedrohungen wird die EnhancedSelfHealingAI alarmiert.
• Backup: Manuell über CLI oder automatisch über BackupScheduler. Sichert Datenbank, Code, Uploads, Logs, Konfiguration.
• Admin‑Aufgaben: Über AdminUserService oder CLI‑Befehle (admin‑Gruppe).

GT1 (Gassner Thomas) AI Chat System – Vollständige Beschreibung

Dieses Dokument beschreibt ausschließlich das Chat‑System des GT1 AI Projekts: Server (FastAPI, PostgreSQL mit pgvector, semantische Suche) und CLI‑Client. Es enthält keine Self‑Healing‑, Backup‑ oder Netzwerk‑Monitoring‑Komponenten.

1. Überblick

Das System ist eine asynchrone Plattform für KI‑gestützte Konversationen mit integrierter semantischer Suche. Kernmerkmale:
• Chat mit DeepSeek oder OpenAI (wahlweise Streaming - Deepseek ist generell günstiger und besser)
• Session Stacking – Fortsetzung beliebiger alter Sessions mit vollständigem Kontext
• Datei‑Upload (max. 10 GB) mit Textextraktion (PDF, DOCX, TXT, Code, Excel)
• Semantische Suche über Dateien, Konversationen und automatisch generierte Topics (pgvector, Cosine‑Ähnlichkeit)
• Hybride Suche (Vektor + Keyword) und intelligente Query‑Erweiterung per LLM
• Automatische Topic‑Cluster (DBSCAN auf Embeddings)
• Moderation (OpenAI Moderation API oder regelbasiert)
• Admin‑Funktionen (Benutzer verwalten, sperren, Systemstatistiken)
• CLI‑Client mit interaktiver, farbiger Terminal‑Oberfläche (Rich)

2. Architektur

CLI‑Client (aiohttp, Rich) ↔ FastAPI‑Server (SQLAlchemy, pgvector) ↔ PostgreSQL + pgvector ↔ OpenAI/DeepSeek API

• Server: FastAPI, SQLAlchemy ORM, pgvector, JWT
• Datenbank: PostgreSQL 15+ mit pgvector‑Erweiterung, IVFFlat‑Indizes
• Vektor‑Suche: OpenAI‑Embeddings (1536 Dimensionen), Cosine‑Ähnlichkeit (<=>)
• Client: Asynchroner HTTP‑Client, lokale Session‑Persistenz (JSON)

3. Session Stacking (Block‑basierte Komprimierung)

Das System verhindert Token‑Limit‑Probleme bei langen Sessions durch automatische Blockbildung.
Während einer laufenden Session:
Nach einer festgelegten Anzahl von Nachrichten (z. B. 10) wird ein neuer Block erzeugt. Für diesen Block generiert die KI eine kurze Zusammenfassung (max. 300 Zeichen), die den wesentlichen Inhalt verdichtet. Jeder Block erhält eine laufende Nummer (Blockindex) und wird in einer eigenen Tabelle (session_chunks) gespeichert.
Beim Stacking (Fortsetzen einer alten Session):
Wenn eine neue Session mit Verweis auf eine Eltern‑Session erstellt wird, kopiert das System alle Blöcke der Eltern‑Session in die neue Session. Die Zusammenfassungen bleiben erhalten; es findet keine erneute Generierung statt.
Kontextaufbau für die KI:
Bei einer Anfrage in der gestackten Session werden die jüngsten echten Nachrichten (bis zu einem Token‑Budget von z. B. 70%) priorisiert. Für die älteren, bereits blockierten Teile des Gesprächs werden die gespeicherten Zusammenfassungen als System‑Prompt in den Kontext eingefügt. Dadurch erhält die KI den gesamten relevanten Verlauf, ohne das Token‑Limit zu überschreiten. Die Blöcke können beliebig tief gestapelt werden (Session A → B → C).

4. Semantische Suche (pgvector)

Die semantische Suche ist vollständig in den Chat integriert.
Vektor‑Spalten in der Datenbank:
• files.embedding – Vektor des Dateiinhalts
• conversations.summary_embedding – Vektor der Konversationszusammenfassung
• topics.centroid_embedding – Vektor eines Themenclusters (Mittelwert aller zugehörigen Vektoren)
Ähnlichkeitssuche:
Die Suche verwendet die Cosine‑Ähnlichkeit (1 - (embedding <=> query_embedding)). Ergebnisse werden nach Ähnlichkeit absteigend sortiert; ein konfigurierbarer Schwellwert filtert irrelevante Treffer.
Hybride Suche:
Kombiniert Vektor‑Ähnlichkeit mit traditioneller Keyword‑Suche (ILIKE). Die Gewichtung (z. B. 70% Vektor, 30% Keyword) ist einstellbar.
Intelligente Suche:
Kurze Suchanfragen (≤ 3 Wörter) werden per LLM erweitert (Synonyme, verwandte Konzepte). Die Ergebnisse erhalten einen Relevanz‑Score aus Ähnlichkeit (50%), benutzerspezifischer Relevanz (20%), Qualität (20%) und Aktualität (10%). Eigene Dateien werden höher gewichtet.
Clustering (DBSCAN):
Auf Anforderung (Admin‑API) oder periodisch werden alle vorhandenen Embeddings geclustert. Parameter: Mindestähnlichkeit (z. B. 85%) und minimale Clustergröße (z. B. 3). Für jedes Cluster wird ein Topic erstellt (Centroid, LLM‑generierter Name und Beschreibung). Dateien und Konversationen werden dem Topic zugeordnet.
Indizes:
IVFFlat‑Indizes auf allen drei Vektor‑Spalten beschleunigen die Suche (unterschiedliche Listenanzahlen je nach Tabellengröße).

5. Datei‑Upload & Textextraktion

• Maximale Dateigröße: 10 GB
• Unterstützte Formate für Textextraktion: TXT, PDF, DOCX, XLSX, CSV, JSON, XML, Code‑Dateien (Python, JavaScript, Java, C++, etc.)
• Bei Bildern und anderen binären Formaten wird keine Textextraktion durchgeführt (nur Metadaten)
• Gefährliche Erweiterungen (.exe, .bat, .ps1, .jar, etc.) werden blockiert
• Nach dem Upload wird der extrahierte Text (falls vorhanden) als Embedding indiziert und steht für die semantische Suche zur Verfügung

6. Datenbanktabellen (Chat‑relevante)

• users – Benutzerdaten, Rolle, Preferences, Limits
• sessions – Chat‑Sessions, inkl. parent_session_id, continuation_token, continuation_count, summary
• session_chunks – Blöcke mit Zusammenfassungen (Blockindex, Zusammenfassung, Zeitstempel)
• conversations – Konversationskopf (Titel, Zusammenfassungs‑Embedding)
• messages – Einzelne Nachrichten (Role, Inhalt, Token, Feedback)
• files – Hochgeladene Dateien (Metadaten, Embedding)
• topics – Automatisch generierte Themencluster (Centroid‑Embedding, Qualitätsscore)
• banned_users – Temporäre oder permanente Sperren
• system_logs – Audit‑Log für sicherheitsrelevante Ereignisse

7. API‑Endpunkte (Chat‑relevant)

MethodeEndpunktFunktion
POST/api/v1/auth/loginLogin, JWT erhalten
POST/api/v1/chat/conversationsNeue Konversation (Session)
POST/api/v1/chat/conversations/{id}/messagesNachricht senden (non‑streaming)
POST/api/v1/chat/streamStreaming‑Antwort (SSE)
GET/api/v1/chat/sessionsAlle Sessions des Benutzers
POST/api/v1/chat/sessions/{id}/stackSession stacken (Eltern setzen)
GET/api/v1/chat/sessions/{id}/contextKontextfenster abrufen
POST/api/v1/files/uploadDatei hochladen
POST/api/v1/search/semanticSemantische Suche
POST/api/v1/search/hybridHybride Suche
POST/api/v1/search/intelligentIntelligente Suche
GET/api/v1/search/similar/{uuid}Ähnliche Dateien
POST/api/v1/search/clusterClustering ausführen (Admin)
POST/api/v1/moderation/ban/{username}Benutzer sperren (Admin)
GET/api/v1/admin/usersBenutzerliste (Admin)
GET/api/v1/admin/statsSystemstatistiken (Admin)

8. CLI‑Client – Befehle (Chat‑relevant)

Interaktive Chat‑Befehle (beginnen mit /):

BefehlAktion
/stack <session_id>Zur angegebenen Session wechseln (Kontext wird übernommen)
/sessionsAlle eigenen Sessions anzeigen
/upload <dateipfad>Datei hochladen und an aktuelle Session anhängen
/filesEigene hochgeladene Dateien auflisten
/copyLetzten Code‑Block aus der AI‑Antwort kopieren
/news <thema>RSS‑News zu einem Thema abrufen (BBC, Reuters, Hacker News, TechCrunch) – mit optionaler AI‑Analyse
/search <query>Semantische Suche innerhalb der aktuellen Session
/statsEigene Statistiken (Token‑Verbrauch, Anzahl Sessions, Uploads)

Hauptmenü‑Befehle (nach Login):

BefehlAktion
chatInteraktiven Chat starten
adminAdmin‑Panel öffnen (Benutzer verwalten, sperren, Statistiken)
sessionsSessions auflisten
upload <datei>Datei hochladen (ohne Session‑Kontext)
statsEigene Statistiken anzeigen
passwdEigenes Passwort ändern
exitCLI beenden

Admin‑Panel (nummerierte Menüpunkte):
1. Benutzer erstellen
2. Benutzer auflisten
3. Passwort zurücksetzen
4. Benutzer sperren
5. Sperrung aufheben
6. Backup erstellen (rudimentäres DB‑Backup)
7. Systemstatistiken anzeigen
8. Zurück zum Chat
9. Admin‑Panel verlassen

9. Zentrale Services (Chat‑relevant)

• ai_service.py – Chat‑Completion (OpenAI/DeepSeek), Embedding‑Erzeugung, Moderation
• vector_store.py – Embedding‑Indexierung, semantische Suche, Ähnlichkeitssuche, Clustering (DBSCAN)
• semantic_search.py – Query‑Erweiterung, hybride Suche, Relevanz‑Ranking, Suchvorschläge
• session_service.py – Session‑CRUD, Stacking (Block‑Kopieren), Export, Kompatibilität mit alter AI
• file_service.py – Upload, Textextraktion, Hash‑Berechnung, Duplikaterkennung
• classifier.py – Automatische Kategorisierung von Dateien (LLM‑basiert)
• admin_service.py – User‑Management, Ban‑Verwaltung, Bulk‑Operationen
• topic_clustering.py – Automatische Topic‑Erkennung und Centroid‑Berechnung

10. Sicherheits‑ und Betriebsmerkmale (nur Chat‑relevante)

• Authentifizierung über JWT (7 Tage zum Beispiel gültig)
• Passwörter werden mit bcrypt gehasht
• Rate‑Limiting pro Benutzer/IP (60/Minute, 1000/Stunde, 10000/Tag)
• Inhaltsmoderation: OpenAI Moderation API oder eigene Regex‑Regeln; bei Verstößen automatische temporäre oder permanente Bans
• Datei‑Upload: Blockierung gefährlicher Erweiterungen und MIME‑Typen
• Security‑Header (CSP, X‑Frame‑Options, X‑Content‑Type‑Options) werden gesetzt
• Audit‑Logs in system_logs für sicherheitsrelevante Aktionen

Eine Dating-App – entwickelt mit einem indischen Entwickler.

Vor einiger Zeit hatte ich mit einem indischen Entwickler eine Dating-App entwickelt – nativ für iOS (Swift), Android (Kotlin) und ein umfangreiches Backend. Die App ist bis auf kleinere Bugs so gut wie fertig. Leider hatte ich zu dieser Zeit noch nicht so viel Erfahrung; der Code ist daher ein schwer zu wartender Spaghetti-Code. Ich wäre motiviert, das Projekt als Progressive Web App (PWA) neu aufzubauen – so entfallen die App-Store-Gebühren an Apple und Google.
Die Alleinstellungsmerkmale (USP):
• Event-System: Ein Administrator oder Veranstalter kann über ein Admin-Panel eigene Events erstellen – Festivals, Partys, Bar-Abende – inklusive aller Daten, QR-Code-Ticketkauf und Öffnungszeiten.
• Gezieltes Matching: Der Nutzer tritt einem Event bei und kann Wochen oder Monate im Voraus zusagen. Er kann dann ausschließlich Personen liken, disliken und chatten, die demselben Event beigetreten sind.
• Klick-System mit Sperrbutton: Das Bild ist in vier Blöcke aufgeteilt. Ein Sperrbutton blendet alle Buttons aus. Klick unten rechts = Like, unten links = Dislike, oben rechts = nächstes Bild, oben links = vorheriges Bild.
• Werbemodell: Gratis-Nutzer erhalten Werbung. Zusätzlich gibt es ein Werbesystem für Städte („Was ist neu in der Stadt?" – neue Lokale, neue Speisekarten usw.).
• Story-Funktion für Matches.
• 7 Abo-Modelle und ein hochwertiges Design.
Domain: lilo.io ist bereits vorhanden.
Wenn jemand dieses Projekt gemeinsam mit mir als PWA umsetzen möchte – großartig! Suche einen Co-Founder oder Investor.

Gassner Thomas 17.06.2026

Seitenaufrufe: ...

↑ Nach oben / Top


English Version

Protocol of a System 17 June 2026

The System of Doctors, Officials and the Judiciary

In mid-February, a 17-page criminal complaint was filed with the Steyr Public Prosecutor's Office, and a case number exists.

My name is Thomas Gassner. Born 18 August 1993 in Steyr, Austria.

This page is not a cry for help. It is the digital archive of a crime that did not begin in a dark backyard, but in a family that pretended to be mine.

My grandfather built the family business. My father took it over. I worked there for twelve years. No recognition. Every idea, every improvement, every attempt to move the company forward was blocked. I wanted to sell in southern France – denied. I wanted to calculate, optimise, modernise – denied. Others defrauded the company on a large scale and earned more than I did. I was kept small, systematically, over years.

That was not bad luck. That was a system.

I was already thrown off track as a teenager. I had been accepted at the grammar school in Salzburg, with a passed entrance exam and a place in the boarding school. One week before school started, my mother said she would not pay. My father would not either. I ended up in a lower secondary school, stopped learning, was downgraded and started an apprenticeship – in my father's company. An apprenticeship I never wanted, but later fitted into and in which I began to love what I did.

Later I found out that my father had a bank power of attorney without my knowledge. For almost ten years, with sole authority to sign. I only discovered it because my bank advisor let it slip. Three times I confronted my father. Three times he denied it. In the end he told me to finally leave him alone.

He drew up a will that looks as if I had written it myself. This will states: If I die, my sister inherits everything. My future wife and my children (who do not yet exist) – disinherited. My date of birth is wrong by two months. The dissolution of this will dragged on until the Chamber of Notaries threatened action. Because of the wrong date of birth, I had to obtain a registration certificate, and on exactly that day I deregistered from Austria.

In 2019 I was in Sydney. Three months. I met a girl, I was free. My father called: stress in the company, I had to come back. I was stupid enough to believe him. I flew home. What awaited me: zero stress. Only organisational trivialities. A lie to tear me out of my new life.

In 2022 I quit, just got annoyed because the same problems kept happening and nothing changed. I went to the competition and, in one go, earned almost three times as much net. My father sold the company and, in 2024, the property he had rented out until then. He wanted to buy me an apartment that belonged to him. A golden leash. I said no. I will not die in Austria. I have a start-up and am going abroad. Give me capital for my company instead. His answer: No.

I emigrated. I founded a cybersecurity company (FZCO) in Dubai. It worked. I made contacts and wanted to found an additional Mainland LLC in 2026, for the sale of the division my father's company had made. I asked the new CEO of my father's former company whether I could buy the pre-produced elements and assemble them on site with a team. On the phone he agreed. And then: ignorance. No response. Three weeks later, only the secretary got in touch.

I was furious. After all those years of being kept small, my patience snapped. I impulsively bought a domain – my surname plus activity .com – and said: buy it, or I'll use it myself. It was not my best decision, but they couldn't even say no.

I went to the direct competition, for whom I worked for a year. They also wanted to keep me small at first. But after a clear email about what I need to start a successful business, they agreed.

A few days after the competition's commitment, the situation escalated. My business contacts in Dubai became untenable and I left the country. In the time that followed, I stayed in several places, including other European cities. The circumstances did not allow me to settle anywhere. I finally returned to Austria.

About a month later, I went to St. Pölten Hospital with acute heart palpitations. What happened there was hard to comprehend: they tested me for drugs – four times toxicology, plus tumour markers. I have never taken drugs. A few days later I wrote an email to the hospital with my insurance card and asked for my discharge letter. The answer: they could not find me in the system. I had supposedly never been there. Two months later, an invoice arrived listing all these tests. I demanded an explanation. My date of birth was wrong by one month. No identity check had been carried out, I was told. No hospital in the world admits a patient without an identity check. I had presented my international insurance card. They ignored my enquiries. The results of the toxicology and tumour markers have been withheld from me to this day. I wrote: if anything had been positive, you would have told me straight away and not let me go.

A week later, I felt unwell again. My cousin, who is a police officer, contacted me and said: "Let's go to Steyr Hospital, just to talk." I agreed. I gave my address in Dubai. My cousin gave his own address verbally, and the doctor entered it in my file – without my knowledge, without my consent. The conversation was strange. They tried to persuade me to stay overnight. I refused.

Days later, I asked by email which address was stored in my file. I requested a data protection disclosure. The result: my cousin's address was in the file. And the doctor had noted something about "magnetic radiation" – although the same file states that I bought a frequency meter. A frequency meter does not measure magnetic radiation. Those are two completely different physical concepts. On this contradictory basis, he wrote a "suspected schizophrenia" – I have neither hallucinations nor delusions; I am an entrepreneur.

The entire conversation lasted about 10 to 15 minutes. It was the only conversation I had with this doctor. The entry in my file was made on this basis. That such practices are not isolated is scientifically documented. The Rosenhan experiment of 1973 proved that psychiatric diagnoses often say more about the institution than about the patient. Healthy volunteers who stated a single, feigned acoustic perception were given severe diagnoses and held for weeks – even though they subsequently behaved completely normally. The label once assigned was never questioned. The diagnosis was a weapon, not a medical finding. Source: Rosenhan, D. L. (1973): "On Being Sane in Insane Places." Science, Vol. 179, pp. 250-258.

After my demand for deletion of the records and the threat of legal action against those responsible, I received an invitation to a personal meeting. The invitation did not come from the attending doctor himself, but from an employee of the clinic. I declined.

During a stay outside my apartment in Austria, when I was demonstrably not at home and another person had access to my rooms, my Emirates ID and my company credit card disappeared. Both items have not been in my possession since then. I cannot exclude unauthorised use.

A Personal Incident

During a stay with relatives, an incident occurred that I cannot explain. Shortly after I had a drink that had been provided for me, unusual symptoms appeared within minutes. A strong tingling that started in the throat and spread over the cheeks to the nose. Accompanied by enormous heart palpitations and a feeling on the tongue that I had never experienced before. Unlike any normal physical reaction. The symptoms subsided after about two hours. Similar incidents repeated themselves in the following period.

Based on this evidence, I filed a criminal complaint with the Steyr Public Prosecutor's Office against my father and my cousin. I also applied for two injunctions – against my cousin for the falsified file and against my father.

The judge who decided on my application told me by telephone that the injunction against my cousin had been granted and already sent. A few days later, I found the written decision in the system: both applications rejected. The reasoning contained a medical diagnosis – made without a medical report, without an expert witness, by a civil judge who is not legally authorised to do so.

The decision bears the date 29 October 2025 – a date months before the first incidents that began in January 2026. A decision on a set of facts that did not yet exist at that time is legally impossible.

The GDPR disclosure I submitted, which proves in black and white that my cousin had his own address entered in my medical file, was dismissed as "urgent suspicion" by the judge and ignored. The appointed delivery curator was never communicated to me – I did not receive her contact details; she never got in touch.

Furthermore, in a further decision, the Steyr District Court adopted my cousin's false address as my own. All my court mail thus went to the man who wanted to pathologise me. He could intercept, destroy or act in my name.

I filed a supervisory complaint against the responsible judge. The head of the Steyr District Court dismissed it on the grounds that a judicial decision could only be contested through the instance hierarchy. The judge's described conduct offered no reason for intervention. The President of the Linz Higher Regional Court, to whom I subsequently turned, also declared himself not responsible. The judicial administration is fundamentally prohibited from intervening in court proceedings or even commenting on decisions. A transfer of the case to another court was not possible; no assistance from the President was envisaged.

I wrote to both hospitals and asked what was going on. In Steyr, I had spoken about the Frey effect, a scientifically documented phenomenon, not about magnetic radiation. I demanded the deletion of the unlawful records. Both hospitals evaded, ignored my enquiries or referred to retention obligations that do not apply to unlawfully processed data. The complete correspondence can be viewed below.

Precaution for the Worst Case

I have drawn up a legally valid negative advance directive and lasting power of attorney. They stipulate that my parents and certain other family members shall not have any decision-making power over me should I be unable to act on my own. The legal representation has been transferred to a trusted person outside the family. These documents are deposited and registered.

Why this immense effort?

The answer has two parts, and both are true. They are not beautiful, they are not simple, but they are the only explanation that unites all the facts. The first part is as old as my life. There is a person in my family who has always derived his power not from money or success, but from total control over others. He has proved that he does not hesitate to destroy his own father, his wife, and other family members when they oppose his will. For him, the subjugation of others is not a strategy, but an inner need. My break-out from his system, my independence abroad, was the first deep crack in his façade. The only common thread connecting all these actions seems to be the will to bring me back into a state of weakness and dependence. Whether this is consciously controlled or the expression of a deep-seated disorder, I cannot judge. But the effect on my life was always the same: damage, setback, dependence.

The second part is that I proved he was never necessary.

All his life he considered me incapable. He told anyone who would listen that I could do nothing, that I would fail, that I was lost without him. I almost believed it myself. And then I went abroad and founded my own company. It worked. It was profitable. It was not his merit.

My IT company was the first proof that he lied. The planned expansion into his industry – as an addition, not a fallback – was the second. I did not need his contacts. I did not need his money. I did not need him. For a man who defines himself only through the control of others, this realisation is unbearable.

What all these actions have caused was not my death or the end of my company. It was the repeated throwing back into weakness and dependence – exactly the state in which he firmly believes he wants me.

This documentation is a fraction. It contains only what I can prove with documents. The rest remains unspoken – not because it does not exist, but because I will not engage in a game in which my words are used against me.

Dissemination of False Information

I have been informed from several sources that false claims about me are regularly being spread within my family environment. I document this as part of the strategy directed against me.

Scientific Background

The following information is publicly accessible and is listed here without further evaluation.

Frey Effect (1962): The scientist Allan H. Frey described that pulsed microwave radiation can generate audible sounds (clicking, humming) directly in the human head without others perceiving them. The mechanism is thermoelastic.

Havana Syndrome (2020): A report by the US National Academies of Sciences, Engineering, and Medicine documented a symptom pattern among US diplomats consisting of acoustic perceptions and physical damage that could not be assigned to any known disease.

Havana Syndrome in Vienna (2021): In July 2021, Vienna became known as one of the largest documented clusters. Up to 24 diplomats and intelligence officers were affected. The Austrian authorities launched investigations; the CIA station chief in Vienna was removed. Sources: Reuters, ORF, Die Presse, BBC.

Academic Teaching: The textbook "Оружие нелетального действия" (Non-lethal Weapons, 3rd edition, 2023) of the Bauman Moscow State Technical University deals with the technical principles behind phenomena such as the Frey effect and the Havana Syndrome. The publication is university teaching material and is quoted here solely as a source reference on the state of academic education.

Classification: This information serves as background knowledge. The specific circumstances of the research are not addressed, as this is not the subject of this documentation.


Database (IPFS): https://coral-key-minnow-344.mypinata.cloud/ipfs/Qme1rHFnRi1nCrJS75qnPPxY4WUk1HEB5ShFeKVjPwYkwe/

Telegram Updates: https://t.me/gassnerthomas
Telegram Private: @vaultkid1
Mail: [email protected]

This Telegram channel also serves as a status message. Should it remain silent unexpectedly, please inform the Steyr Public Prosecutor's Office (case number 5SP43/26W).

Support

The last months have demanded a lot from me – economically and personally. Anyone who has read this documentation and wishes to support my legal steps will find the opportunity below.

BTC: bc1qkjte5vq5maq6zv800tpaslqzxdk2yne96pudjh
ETH: 0x199EeB3eCc8510F466FF6E2FD1A05897A5A1Ef45
USDT (ERC-20): 0x199EeB3eCc8510F466FF6E2FD1A05897A5A1Ef45
Monero: 41gPMk8CxrwNSnLS4Vf4NyaMUcRoUACNbE6tJAaUUDcB4dvHNajQmngZJnawghfSVD5YZMi6sSstNdwwVVxJDT7HUmTkxYs

Every contribution helps.


Technical Projects

Open to partnerships and investments.

• Web & Automation: Development of websites, apps and automation scripts with a developer team from Pakistan.

• AI Systems: Self-Healing and Session Stacking, developed with international specialists. Target: a SaaS platform.

• Dating App: Full-featured dating platform with standard modes and event mode (matching within events, QR ticketing), developed with an app developer from India, planned as PWA.

• Defensive Drainer Add-on (in development): A browser add-on for Firefox and Chrome that protects users against common attacks. Development with a security expert from Russia.

GT1 (Gassner Thomas) AI Enterprise System – Complete Project Documentation

1. Project Structure (Overview)

ai_enterprise_system/
├── docker-compose.yml
├── Dockerfile
├── nginx.conf
├── requirements.txt
├── .env
├── .gitignore
├── README.md
├── init.sql
├── alembic.ini
├── src/
│   └── app/
│       ├── __init__.py
│       ├── main.py
│       ├── api/
│       │   ├── __init__.py
│       │   ├── auth.py
│       │   ├── chat.py
│       │   ├── files.py
│       │   ├── admin.py
│       │   ├── system.py
│       │   ├── templates.py
│       │   ├── search.py
│       │   ├── download.py
│       │   └── moderation.py
│       ├── core/
│       │   ├── __init__.py
│       │   ├── config.py
│       │   ├── security.py
│       │   ├── database.py
│       │   ├── models.py
│       │   └── dependencies.py
│       ├── services/
│       │   ├── __init__.py
│       │   ├── ai_service.py
│       │   ├── classifier.py
│       │   ├── file_service.py
│       │   ├── moderation.py (service)
│       │   ├── topic_clustering.py
│       │   ├── vector_store.py
│       │   ├── session_service.py
│       │   ├── semantic_search.py
│       │   ├── admin_service.py
│       │   ├── self_healing.py (enhanced)
│       │   ├── github_learner.py
│       │   ├── network_analyzer.py
│       │   ├── autonomous_learner.py
│       │   ├── simple_alert.py
│       │   ├── backup_system.py
│       │   ├── bettercap_controller.py
│       │   ├── network_monitor.py
│       │   ├── system_scanner.py
│       │   └── threat_intel_aggregator.py
│       ├── utils/
│       │   ├── __init__.py
│       │   ├── file_utils.py
│       │   ├── text_utils.py
│       │   ├── validation.py
│       │   ├── logging.py
│       │   └── cli_client.py
│       ├── worker/
│       │   ├── __init__.py
│       │   ├── celery_app.py
│       │   └── tasks.py
│       └── cli/
│           ├── __init__.py
│           ├── commands.py
│           └── interactive.py
├── storage/
│   ├── ai_master_data/...
│   ├── exports/...
│   ├── temp/...
│   └── logs/...
├── migrations/
│   └── versions/
├── scripts/
│   ├── setup.py
│   ├── init_database.py
│   ├── init_vector_extension.py
│   ├── migrate_from_old.py
│   ├── backup_database.sh
│   └── ai_cli
└── tests/
    ├── __init__.py
    └── test_api.py

2. Container & Infrastructure Files (Project Root)

FilePurpose
docker-compose.ymlDefines the services: PostgreSQL (with pgvector), Redis, FastAPI (with Uvicorn), Celery Worker, Celery Beat (Scheduler) and optional Nginx. Connects the containers via an internal network.
DockerfileMulti-stage build for the FastAPI application: base image (Python 3.10), installation of dependencies, copying of source code, start command.
nginx.confReverse proxy configuration for production: forwarding of HTTP/HTTPS traffic to the FastAPI container, static files, caching headers.
requirements.txtComplete list of Python packages: FastAPI, Uvicorn, SQLAlchemy, psycopg2-binary, pgvector, OpenAI, aiohttp, networkx, scikit-learn, psutil, click, rich, celery, redis, python-jose, passlib, bcrypt, python-multipart, pandas, feedparser, pyshark, scapy, nmap, pyclamd, …
.envTemplate for environment variables: database URL, API keys (OpenAI, DeepSeek, GitHub), JWT secret, limits, paths.
.gitignoreIgnores .env, __pycache__/, storage/, logs/, *.pyc, *.db, *.cap etc.
README.mdBrief introduction, installation instructions (Docker & manual), first steps.
init.sql(Optional) Initial SQL script for creating the database and activating the pgvector extension.
alembic.iniConfiguration for Alembic migrations (connection to the database, version directory).

3. Core of the Application (src/app/)

3.1 Main Module main.py

• Creates the FastAPI app with lifespan manager (startup/shutdown).
• Registers all routers (api/).
• Adds middleware: CORS, GZip, optional rate limiting (SlowAPI).
• Defines global exception handlers.
• Provides health and statistics endpoints (/health, /stats).
• Contains fallback endpoints for compatibility with old AI (/export/training, /search/keyword).

3.2 API Routers (api/) – Complete List

FileEndpoints (Resources)
auth.pyPOST /login, POST /register, POST /refresh, GET /me, POST /logout
chat.pyPOST /conversations, GET /conversations, GET /conversations/{id}, POST /conversations/{id}/messages, POST /messages/{id}/feedback
files.pyPOST /upload, GET /, GET /{uuid}, PUT /{uuid}, DELETE /{uuid}, GET /by-hash/{hash}
admin.pyGET /users, POST /users, PUT /users/{username}, DELETE /users/{username}, POST /users/{username}/reset-password, GET /logs, GET /stats
system.pyGET /health, GET /status (CPU/Memory/Disk), GET /version
templates.pyGET /templates, POST /templates, GET /templates/{id}, PUT /templates/{id}, DELETE /templates/{id}
search.pyPOST /semantic, POST /intelligent, POST /hybrid, GET /similar/{uuid}, GET /suggestions, POST /cluster, GET /stats/vectors, POST /index/all
download.pyGET /file/{uuid}, GET /by-hash/{hash}, GET /export/conversation/{uuid} (with format parameter)
moderation.pyPOST /flag/{uuid}, POST /ban/{username}, POST /unban/{username}, GET /flagged, GET /banned

3.3 Core Modules (core/)

FileResponsibility
config.pyPydantic settings model. Loads .env variables, defines paths (AI_DATA_DIR, UPLOADS_BY_USERS_DIR), limits (FREE_TOKENS_PER_DAY, UPLOAD_MAX_SIZE), lists (BANNED_EXTENSIONS, DANGEROUS_PATTERNS). Provides method create_directories().
database.pySQLAlchemy engine (PostgreSQL), SessionLocal, Base, as well as the Vector type for pgvector.
models.pyORM models (see table below). Contains relationships, indexes and vector columns (embedding, summary_embedding, centroid_embedding).
security.pyverify_password, get_password_hash (bcrypt), create_access_token/decode_access_token (JWT), get_current_user (FastAPI dependency).
dependencies.pyCommon dependencies such as get_db, get_current_user_optional, rate_limit (if active).

Database Models in Detail:

ModelKey FieldsSpecial Features
Userusername, email, password_hash, role, is_active, is_banned, preferences (JSON), tokens_used_todayRelationships to File, Conversation, Session
Fileuuid, original_filename, storage_path, file_hash, category, embedding (ARRAY[Float]), is_flagged, flag_type, likes, dislikes, feedback_scoreVector for semantic search, relationship to Topic
Conversationuuid, title, summary_embedding (ARRAY[Float]), message_count, is_archivedVector for conversation search
Messageconversation_id, role (user/assistant), content, feedback (like/dislike), model_used
Topicname, description, category, centroid_embedding (ARRAY[Float]), sample_count, quality_scoreAutomatic clustering, relationship to File and Conversation
Sessionname, user_id, conversation_id, is_activeUser-defined chat sessions
BannedUserusername, user_id, reason, expires_at, is_permanent
SystemLoglevel, component, action, message, details (JSON)Audit log

4. Technical Services (services/) – Complete Listing

4.1 AI & Vector Services

FileDescription
ai_service.pyCentral AI interface. Supports OpenAI (sync/async) and DeepSeek (via aiohttp). Adds the current date as a system prompt to every request (prevents date hallucinations). Offers chat_completion, get_embeddings, moderate_content, summarize_text.
vector_store.pypgvector operations. create_embedding (OpenAI), index_file, index_conversation, update_topic_embedding. semantic_search (cosine similarity), find_similar_files, cluster_similar_items (DBSCAN with scikit-learn). get_vector_statistics.
semantic_search.pyExtended search. intelligent_search (query expansion via LLM, user-specific relevance, recency bonus), hybrid_search (combination vector + keyword), search_suggestions (from history, own files and LLM).
topic_clustering.pyAutomatic topic detection based on embeddings. Calculates centroids, creates new topics, assigns files/conversations.

4.2 File & Session Management

FileDescription
file_service.pySaves uploaded files (streaming), extracts text (PDF, DOCX, TXT, code), calculates SHA-256, saves metadata. Calls classification and vector indexing.
classifier.pyAssigns files to categories (e.g. "Technology", "Business", "Science") based on content and metadata. Uses LLM or rule-based fallback.
session_service.pyManagement of chat sessions (create_session, switch_session, rename_session, list_sessions, clear_session, export_session). Also contains compatibility functions for the old AI (load_user_sessions, save_conversation).

4.3 Admin & Moderation

FileDescription
admin_service.pyUser management: create_user, update_user, delete_user, reset_password, list_users, get_user_details. Ban management: ban_user, unban_user, list_banned_users. Bulk operations via bulk_operations.
moderation.py (Service)Background moderation of content (calling the OpenAI Moderation API). Flags texts as "unsafe" for certain categories.

4.4 Autonomous Self-Healing Chain

FileResponsibility
self_healing.pyMain orchestrator. Contains EnhancedSelfHealingAI with asynchronous loop (start_enhanced_loop). Monitors system (SystemMonitor), creates RepairJobs, analyses errors with context (GitHub, network, security, history), suggests fixes, applies them (with rollback), tests and learns. Integrates all following modules.
github_learner.pySearches via GitHub API for top repos (e.g. "fastapi postgresql"), analyses READMEs, issues, releases and extracts code patterns and solutions. Called by self_healing.
network_analyzer.pyBuilds a service dependency graph (FastAPI, PostgreSQL, Redis, Celery, …) with NetworkX. Analyses real connections (psutil). Finds bottlenecks (betweenness centrality, articulation points) and suggests optimisations (load balancer, replication, caching).
autonomous_learner.pyJSONL-based knowledge base for error solutions. Normalises error messages (removes timestamps, paths, IPs), stores successful repairs. Can recognise similar errors and immediately offer the known solution.
simple_alert.py(or healing_alerts.py) Simple alert system for the CLI (coloured icons, log file). Used by the self-healing loop to inform administrators.

4.5 Security & Network Modules

FileDescription
network_monitor.pyLive network monitoring with pyshark (packet sniffing). Detects suspicious ports (backdoor ports such as 4444, 31337). Can perform ARP scans (scapy). Alerts on suspicious activity.
bettercap_controller.pyControl of the Bettercap framework (MITM tool). Starts/stops Bettercap sessions, sends commands via REST API, retrieves network information. (Optional, requires root privileges).
system_scanner.pyPerforms regular port scans (nmap) and malware scans (ClamAV). Results are stored in the database (SecurityFinding).
threat_intel_aggregator.pyRetrieves threat intelligence from external sources: NIST NVD API (CVEs), GitHub Security Advisories. Can check IP reputation and domain malware (API keys required).

4.6 Backup System

FileDescription
backup_system.pyComplete backup system for production environments. Functions: create_full_backup, backup_database (pg_dump), backup_code_snapshot (Git bundle or tar), backup_uploads, backup_logs, backup_configs, backup_environment. Creates compressed archives (tar.gz). Manages retention (cleanup_old_backups). Offers restore_backup and verify_backup_integrity. Integrates CLI group backup (create, list, verify, restore, cleanup, status). Contains a BackupScheduler for automated, scheduled backups.

5. CLI and Interactive Shell (cli/)

FileDescription
commands.pyMain CLI with Click groups. Over 60 commands: auth (login, register, status, logout), files (upload, list, search, classify, download), chat (start, history, export, like, dislike), search (semantic, similar, cluster), topics (list, explore), system (status, health, cleanup), admin (create-user, list-users, ban, unban, flag, tag, info), config (show, set, aicolor, usercolor), session (create, switch, rename, list, clear), backup (create, list, verify, restore, cleanup, status). Also contains the interactive mode (interactive), which starts a Rich-based shell.
interactive.py(Partially integrated into commands.py) – Provides a cmd.Cmd-based shell used for the interactive session.

6. Utility Modules (utils/)

FileDescription
file_utils.pyExtracts text from various file formats: PDF (PyPDF2), DOCX (python-docx), TXT, code files (Python, JS, HTML, CSS, JSON, MD). Calculates SHA-256 hash.
text_utils.pyNormalises text (lowercase, removal of special characters), simple keyword extraction (TF-IDF), stopword filter (for German/English).
validation.pyValidates file extensions against whitelist/blacklist, email addresses, usernames (no special characters except dot/underscore).
logging.pyCentral logging configuration: log file (logs/ai_enterprise.log) with rotation, console (INFO), error level depending on environment.
cli_client.pyHelper functions for the CLI: coloured output (print_success, print_error, print_info), table display (Rich tables), progress bars.

7. Background Workers (worker/)

FileDescription
celery_app.pyCreates the Celery app with Redis as broker and result backend. Defines timezone, task routing, serialization (JSON).
tasks.pyAsynchronous tasks: index_file_task (after upload), index_conversation_task, send_notification, run_self_healing_cycle (periodic), create_backup_task, cleanup_temp_files.

8. Scripts and Database Migrations (scripts/, migrations/)

FilePurpose
setup.pyAll-in-one setup script: checks dependencies, creates directories, installs Python packages, initialises database (init_database.py), sets up pgvector (init_vector_extension.py), starts Docker services (optional), creates admin user, runs tests.
init_database.pyCreates all tables via SQLAlchemy (Base.metadata.create_all) and creates an initial admin user (username admin, password ChangeMeFirstLogin123!).
init_vector_extension.pyActivates pgvector extension in PostgreSQL, creates the vector indexes (IVFFlat on files.embedding, topics.embedding, conversations.summary_embedding) and the cosine_similarity function. Can generate sample data with --with-samples.
migrate_from_old.pyMigrates data from an older JSON-based AI system (directory ai_master_data) into the new PostgreSQL database. Copies files and imports user and metadata.
backup_database.shShell script for nightly pg_dump backups (can be set up as a cron job).
ai_cliExecutable script wrapper that calls python -m src.app.cli.commands. Enables installation of the CLI tool in the system path.
migrations/versions/Alembic migration scripts (empty at start). Used for future schema changes.

9. Tests (tests/)

FileDescription
test_api.pyContains tests for the most important API endpoints (Auth, Chat, Files, Search) with FastAPI TestClient and a test database.

10. Storage Directories (storage/)

PathContent
storage/ai_master_data/classified/Classified files (sorted by categories)
storage/ai_master_data/uploads_by_users/User uploads (sorted by user ID)
storage/ai_master_data/vector_store/(Optional) persisted vector indexes (if not in DB)
storage/ai_master_data/flagged_illegal/Files flagged as illegal
storage/ai_master_data/flagged_junk/Files flagged as junk
storage/ai_master_data/metadata/JSON metadata (hashes, flags, index) – legacy compatibility
storage/ai_master_data/user_accounts/User JSON (for migration only)
storage/ai_master_data/templates/Saved prompt templates
storage/exports/Exported conversations, training data
storage/learned_solutions/JSONL file with learned error solutions (Self-Healing)
storage/repair_jobs/Detailed logs of all repair jobs
storage/network_reports/Network analysis reports (JSON)
storage/security_actions/Logs of automatic security measures
storage/alerts/Alert logs (JSONL)
storage/temp/Temporary files (regularly cleaned)
logs/Application logs (ai_enterprise.log, celery.log)

11. Component Interaction – Summary

• User interacts via CLI (commands.py) or REST API (main.py + Router).
• File upload: FileService → saves, classifies, indexes (via VectorStoreService) and triggers Celery task for semantic indexing.
• Semantic search: SemanticSearchService uses VectorStoreService and optionally expands the query via AIService.
• Chat: AIService with date context → saves messages in Message table.
• Self-Healing: Runs periodically (asynchronous loop) or via Celery Beat. SystemMonitor detects errors, EnhancedSelfHealingAI coordinates the repair involving GitHubCodeLearner, NetworkAnalyzer, AutonomousLearner. Applies fixes (e.g. service restart, configuration changes) and logs everything.
• Security: NetworkMonitor monitors live, SystemScanner performs daily scans. In case of threats, EnhancedSelfHealingAI is alerted.
• Backup: Manually via CLI or automatically via BackupScheduler. Saves database, code, uploads, logs, configuration.
• Admin tasks: Via AdminUserService or CLI commands (admin group).

GT1 AI Chat System – Complete Description

This document exclusively describes the chat system of the GT1 AI project: server (FastAPI, PostgreSQL with pgvector, semantic search) and CLI client. It does not contain Self-Healing, Backup or Network Monitoring components. These are described in the GT1 AI Enterprise System.

1. Overview

The system is an asynchronous platform for AI-supported conversations with integrated semantic search. Core features:
• Chat with DeepSeek or OpenAI (streaming optional – DeepSeek is generally cheaper and better)
• Session Stacking – continuation of any old sessions with full context
• File upload (max. 10 GB) with text extraction (PDF, DOCX, TXT, code, Excel)
• Semantic search across files, conversations and automatically generated topics (pgvector, cosine similarity)
• Hybrid search (vector + keyword) and intelligent query expansion via LLM
• Automatic topic clusters (DBSCAN on embeddings)
• Moderation (OpenAI Moderation API or rule-based)
• Admin functions (manage users, ban, system statistics)
• CLI client with interactive, coloured terminal interface (Rich)

2. Architecture

CLI Client (aiohttp, Rich) ↔ FastAPI Server (SQLAlchemy, pgvector) ↔ PostgreSQL + pgvector ↔ OpenAI/DeepSeek API

• Server: FastAPI, SQLAlchemy ORM, pgvector, JWT
• Database: PostgreSQL 15+ with pgvector extension, IVFFlat indexes
• Vector search: OpenAI embeddings (1536 dimensions), cosine similarity (<=>)
• Client: Asynchronous HTTP client, local session persistence (JSON)

3. Session Stacking (Block-Based Compression)

The system prevents token limit problems in long sessions through automatic block formation.
During a running session: After a fixed number of messages (e.g. 10), a new block is created. For this block, the AI generates a short summary (max. 300 characters) that condenses the essential content. Each block receives a sequential number (block index) and is stored in its own table (session_chunks).
When stacking (continuing an old session): When a new session is created with a reference to a parent session, the system copies all blocks of the parent session into the new session. The summaries are retained; no regeneration takes place.
Context construction for the AI: On a request in the stacked session, the most recent real messages (up to a token budget of e.g. 70%) are prioritised. For the older, already blocked parts of the conversation, the stored summaries are inserted into the context as a system prompt. This gives the AI the entire relevant history without exceeding the token limit. The blocks can be stacked arbitrarily deep (Session A → B → C).

4. Semantic Search (pgvector)

Semantic search is fully integrated into the chat.
Vector columns in the database:
• files.embedding – vector of the file content
• conversations.summary_embedding – vector of the conversation summary
• topics.centroid_embedding – vector of a topic cluster (mean of all associated vectors)
Similarity search: The search uses cosine similarity (1 - (embedding <=> query_embedding)). Results are sorted by descending similarity; a configurable threshold filters irrelevant hits.
Hybrid search: Combines vector similarity with traditional keyword search (ILIKE). The weighting (e.g. 70% vector, 30% keyword) is adjustable.
Intelligent search: Short search queries (≤ 3 words) are expanded via LLM (synonyms, related concepts). Results receive a relevance score from similarity (50%), user-specific relevance (20%), quality (20%) and recency (10%). Own files are weighted higher.
Clustering (DBSCAN): On request (admin API) or periodically, all existing embeddings are clustered. Parameters: minimum similarity (e.g. 85%) and minimum cluster size (e.g. 3). For each cluster, a topic is created (centroid, LLM-generated name and description). Files and conversations are assigned to the topic.
Indexes: IVFFlat indexes on all three vector columns accelerate the search (different list sizes depending on table size).

5. File Upload & Text Extraction

• Maximum file size: 10 GB
• Supported formats for text extraction: TXT, PDF, DOCX, XLSX, CSV, JSON, XML, code files (Python, JavaScript, Java, C++, etc.)
• For images and other binary formats, no text extraction is performed (metadata only)
• Dangerous extensions (.exe, .bat, .ps1, .jar, etc.) are blocked
• After upload, the extracted text (if available) is indexed as an embedding and is available for semantic search

6. Database Tables (Chat-Relevant)

• users – user data, role, preferences, limits
• sessions – chat sessions, incl. parent_session_id, continuation_token, continuation_count, summary
• session_chunks – blocks with summaries (block index, summary, timestamp)
• conversations – conversation header (title, summary embedding)
• messages – individual messages (role, content, token, feedback)
• files – uploaded files (metadata, embedding)
• topics – automatically generated topic clusters (centroid embedding, quality score)
• banned_users – temporary or permanent bans
• system_logs – audit log for security-relevant events

7. API Endpoints (Chat-Relevant)

MethodEndpointFunction
POST/api/v1/auth/loginLogin, receive JWT
POST/api/v1/chat/conversationsNew conversation (session)
POST/api/v1/chat/conversations/{id}/messagesSend message (non-streaming)
POST/api/v1/chat/streamStreaming response (SSE)
GET/api/v1/chat/sessionsAll sessions of the user
POST/api/v1/chat/sessions/{id}/stackStack session (set parent)
GET/api/v1/chat/sessions/{id}/contextRetrieve context window
POST/api/v1/files/uploadUpload file
POST/api/v1/search/semanticSemantic search
POST/api/v1/search/hybridHybrid search
POST/api/v1/search/intelligentIntelligent search
GET/api/v1/search/similar/{uuid}Similar files
POST/api/v1/search/clusterExecute clustering (Admin)
POST/api/v1/moderation/ban/{username}Ban user (Admin)
GET/api/v1/admin/usersUser list (Admin)
GET/api/v1/admin/statsSystem statistics (Admin)

8. CLI Client – Commands (Chat-Relevant)

Interactive chat commands (start with /):

CommandAction
/stack <session_id>Switch to the specified session (context is taken over)
/sessionsShow all own sessions
/upload <filepath>Upload file and attach to current session
/filesList own uploaded files
/copyCopy the last code block from the AI response
/news <topic>Retrieve RSS news on a topic (BBC, Reuters, Hacker News, TechCrunch) – with optional AI analysis
/search <query>Semantic search within the current session
/statsOwn statistics (token consumption, number of sessions, uploads)

Main menu commands (after login):

CommandAction
chatStart interactive chat
adminOpen admin panel (manage users, ban, statistics)
sessionsList sessions
upload <file>Upload file (without session context)
statsShow own statistics
passwdChange own password
exitExit CLI

Admin panel (numbered menu items):
1. Create user
2. List users
3. Reset password
4. Ban user
5. Lift ban
6. Create backup (rudimentary DB backup)
7. Show system statistics
8. Back to chat
9. Leave admin panel

9. Central Services (Chat-Relevant)

• ai_service.py – Chat completion (OpenAI/DeepSeek), embedding generation, moderation
• vector_store.py – Embedding indexing, semantic search, similarity search, clustering (DBSCAN)
• semantic_search.py – Query expansion, hybrid search, relevance ranking, search suggestions
• session_service.py – Session CRUD, stacking (block copying), export, compatibility with old AI
• file_service.py – Upload, text extraction, hash calculation, duplicate detection
• classifier.py – Automatic categorisation of files (LLM-based)
• admin_service.py – User management, ban management, bulk operations
• topic_clustering.py – Automatic topic detection and centroid calculation

10. Security & Operational Features (Chat-Relevant Only)

• Authentication via JWT (valid for example 7 days)
• Passwords hashed with bcrypt
• Rate limiting per user/IP (60/minute, 1000/hour, 10000/day)
• Content moderation: OpenAI Moderation API or own regex rules; automatic temporary or permanent bans on violations
• File upload: Blocking of dangerous extensions and MIME types
• Security headers (CSP, X-Frame-Options, X-Content-Type-Options) are set
• Audit logs in system_logs for security-relevant actions


Dating App – PWA

Some time ago I developed a dating app with an Indian developer – native for iOS (Swift), Android (Kotlin) and a comprehensive backend. The app is practically finished apart from minor bugs. Unfortunately, I had less experience at the time; the code is therefore spaghetti code that is difficult to maintain. I would be motivated to rebuild the project as a Progressive Web App (PWA) – this eliminates the App Store fees to Apple and Google.

Unique Selling Points (USP):

• Event System: An administrator or organiser can create their own events via an admin panel – festivals, parties, bar evenings – including all data, QR code ticket purchase and opening times.
• Targeted Matching: The user joins an event and can confirm weeks or months in advance. They can then only like, dislike and chat with people who have joined the same event.
• Click System with Lock Button: The image is divided into four blocks. A lock button hides all buttons. Click bottom right = Like, bottom left = Dislike, top right = next image, top left = previous image.
• Advertising Model: Free users receive advertising. There is also an advertising system for cities ("What's new in town?" – new restaurants, new menus, etc.).
• Story function for matches.
• 7 subscription models and a high-quality design.
Domain: lilo.io is already registered.
If someone wants to realise this project with me as a PWA – great! Looking for a co-founder or investor.

Thomas Gassner, 17 June 2026

Page views: ...

↑ Nach oben / Top