Das System aus Ärzten, Beamten und Justiz
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.
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.
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.
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.
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.
Die folgenden Informationen sind öffentlich zugänglich und werden hier ohne weitere Wertung aufgeführt.
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.
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.
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.
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.
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.
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.
Jeder Betrag hilft.
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.
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
| Datei | Zweck |
|---|---|
| docker-compose.yml | Definiert die Services: PostgreSQL (mit pgvector), Redis, FastAPI (mit Uvicorn), Celery‑Worker, Celery‑Beat (Scheduler) und optional Nginx. Verbindet die Container über ein internes Netzwerk. |
| Dockerfile | Mehrstufiger Build für die FastAPI‑Anwendung: Basis‑Image (Python 3.10), Installation der Abhängigkeiten, Kopieren des Quellcodes, Startbefehl. |
| nginx.conf | Reverse‑Proxy‑Konfiguration für Produktion: Weiterleitung von HTTP/HTTPS‑Traffic an den FastAPI‑Container, statische Dateien, Caching‑Header. |
| requirements.txt | Vollstä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, … |
| .env | Vorlage für Umgebungsvariablen: Datenbank‑URL, API‑Keys (OpenAI, DeepSeek, GitHub), JWT‑Secret, Limits, Pfade. |
| .gitignore | Ignoriert .env, __pycache__/, storage/, logs/, *.pyc, *.db, *.cap etc. |
| README.md | Kurze Einführung, Installationsanweisungen (Docker & manuell), erste Schritte. |
| init.sql | (Optional) Initiales SQL‑Skript zur Erstellung der Datenbank und Aktivierung der pgvector‑Extension. |
| alembic.ini | Konfiguration für Alembic‑Migrationen (Verbindung zur Datenbank, Versionsverzeichnis). |
• 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).
| Datei | Endpunkte (Ressourcen) |
|---|---|
| auth.py | POST /login, POST /register, POST /refresh, GET /me, POST /logout |
| chat.py | POST /conversations, GET /conversations, GET /conversations/{id}, POST /conversations/{id}/messages, POST /messages/{id}/feedback |
| files.py | POST /upload, GET /, GET /{uuid}, PUT /{uuid}, DELETE /{uuid}, GET /by-hash/{hash} |
| admin.py | GET /users, POST /users, PUT /users/{username}, DELETE /users/{username}, POST /users/{username}/reset-password, GET /logs, GET /stats |
| system.py | GET /health, GET /status (CPU/Memory/Disk), GET /version |
| templates.py | GET /templates, POST /templates, GET /templates/{id}, PUT /templates/{id}, DELETE /templates/{id} |
| search.py | POST /semantic, POST /intelligent, POST /hybrid, GET /similar/{uuid}, GET /suggestions, POST /cluster, GET /stats/vectors, POST /index/all |
| download.py | GET /file/{uuid}, GET /by-hash/{hash}, GET /export/conversation/{uuid} (mit Format‑Parameter) |
| moderation.py | POST /flag/{uuid}, POST /ban/{username}, POST /unban/{username}, GET /flagged, GET /banned |
| Datei | Verantwortung |
|---|---|
| config.py | Pydantic‑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.py | SQLAlchemy‑Engine (PostgreSQL), SessionLocal, Base, sowie den Vector‑Typ für pgvector. |
| models.py | ORM‑Modelle (siehe Tabelle unten). Beinhaltet Beziehungen, Indizes und Vektor‑Spalten (embedding, summary_embedding, centroid_embedding). |
| security.py | verify_password, get_password_hash (bcrypt), create_access_token/decode_access_token (JWT), get_current_user(FastAPI‑Dependency). |
| dependencies.py | Gemeinsame Dependencies wie get_db, get_current_user_optional, rate_limit (falls aktiv). |
| Modell | Wichtige Felder | Besonderheiten |
|---|---|---|
| User | username, email, password_hash, role, is_active, is_banned, preferences (JSON), tokens_used_today | Beziehungen zu File, Conversation, Session |
| File | uuid, original_filename, storage_path, file_hash, category, embedding (ARRAY[Float]), is_flagged, flag_type, likes, dislikes, feedback_score | Vektor für semantische Suche, Beziehung zu Topic |
| Conversation | uuid, title, summary_embedding (ARRAY[Float]), message_count, is_archived | Vektor für Konversations‑Suche |
| Message | conversation_id, role (user/assistant), content, feedback (like/dislike), model_used | |
| Topic | name, description, category, centroid_embedding (ARRAY[Float]), sample_count, quality_score | Automatisches Clustering, Beziehung zu File und Conversation |
| Session | name, user_id, conversation_id, is_active | Benutzerdefinierte Chat‑Sessions |
| BannedUser | username, user_id, reason, expires_at, is_permanent | |
| SystemLog | level, component, action, message, details (JSON) | Audit‑Log |
| Datei | Beschreibung |
|---|---|
| ai_service.py | Zentrale 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.py | pgvector‑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.py | Erweiterte 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.py | Automatische Topic‑Erkennung auf Basis von Embeddings. Berechnet Centroids, erstellt neue Topics, ordnet Dateien/Konversationen zu. |
| Datei | Beschreibung |
|---|---|
| file_service.py | Speichert hochgeladene Dateien (streaming), extrahiert Text (PDF, DOCX, TXT, Code), berechnet SHA‑256, speichert Metadaten. Ruft Klassifizierung und Vektor‑Indexierung auf. |
| classifier.py | Ordnet Dateien Kategorien zu (z. B. „Technologie“, „Wirtschaft“, „Wissenschaft“) anhand von Inhalt und Metadaten. Nutzt LLM oder regelbasierten Fallback. |
| session_service.py | Verwaltung 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). |
| Datei | Beschreibung |
|---|---|
| admin_service.py | User‑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. |
| Datei | Verantwortung |
|---|---|
| self_healing.py | Haupt‑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.py | Sucht ü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.py | Baut 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.py | JSONL‑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. |
| Datei | Beschreibung |
|---|---|
| network_monitor.py | Live‑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.py | Steuerung des Bettercap‑Frameworks (MITM‑Tool). Startet/Stoppt Bettercap‑Sessions, sendet Kommandos über REST‑API, ruft Netzwerkinformationen ab. (Optional, erfordert Root‑Rechte). |
| system_scanner.py | Führt regelmäßig Port‑Scans (nmap) und Malware‑Scans (ClamAV) durch. Ergebnisse werden in der Datenbank (SecurityFinding) gespeichert. |
| threat_intel_aggregator.py | Ruft 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). |
| Datei | Beschreibung |
|---|---|
| backup_system.py | Komplettes 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. |
| Datei | Beschreibung |
|---|---|
| commands.py | Haupt‑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. |
| Datei | Beschreibung |
|---|---|
| file_utils.py | Extrahiert Text aus verschiedenen Dateiformaten: PDF (PyPDF2), DOCX (python‑docx), TXT, Code‑Dateien (Python, JS, HTML, CSS, JSON, MD). Berechnet SHA‑256‑Hash. |
| text_utils.py | Normalisiert Text (Kleinbuchstaben, Entfernung von Sonderzeichen), einfache Keyword‑Extraktion (TF‑IDF), Stoppwort‑Filter (für Deutsch/Englisch). |
| validation.py | Validiert Dateiendungen gegen Whitelist/Blacklist, E‑Mail‑Adressen, Benutzernamen (keine Sonderzeichen außer Punkt/Unterstrich). |
| logging.py | Zentrale Logging‑Konfiguration: Log‑Datei (logs/ai_enterprise.log) mit Rotation, Konsole (INFO), Fehler‑Level je nach Umgebung. |
| cli_client.py | Hilfsfunktionen für die CLI: farbige Ausgabe (print_success, print_error, print_info), Tabellendarstellung (Rich‑Tabellen), Fortschrittsbalken. |
| Datei | Beschreibung |
|---|---|
| celery_app.py | Erstellt die Celery‑App mit Redis als Broker und Result‑Backend. Definiert Zeitzone, Task‑Routing, Serialisierung (JSON). |
| tasks.py | Asynchrone Aufgaben: index_file_task (nach Upload), index_conversation_task, send_notification, run_self_healing_cycle (periodisch), create_backup_task, cleanup_temp_files. |
| Datei | Zweck |
|---|---|
| setup.py | All‑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.py | Erstellt alle Tabellen über SQLAlchemy (Base.metadata.create_all) und legt einen initialen Admin‑User an (Username admin, Passwort ChangeMeFirstLogin123!). |
| init_vector_extension.py | Aktiviert 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.py | Migriert 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.sh | Shell‑Skript für nächtliche pg_dump‑Backups (kann als Cron‑Job eingerichtet werden). |
| ai_cli | Ausfü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. |
| Datei | Beschreibung |
|---|---|
| test_api.py | Enthält Tests für die wichtigsten API‑Endpunkte (Auth, Chat, Files, Search) mit FastAPI‑TestClient und einer Test‑Datenbank. |
| Pfad | Inhalt |
|---|---|
| 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) |
• 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).
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.
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)
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)
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).
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).
• 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
• 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
| Methode | Endpunkt | Funktion |
|---|---|---|
| POST | /api/v1/auth/login | Login, JWT erhalten |
| POST | /api/v1/chat/conversations | Neue Konversation (Session) |
| POST | /api/v1/chat/conversations/{id}/messages | Nachricht senden (non‑streaming) |
| POST | /api/v1/chat/stream | Streaming‑Antwort (SSE) |
| GET | /api/v1/chat/sessions | Alle Sessions des Benutzers |
| POST | /api/v1/chat/sessions/{id}/stack | Session stacken (Eltern setzen) |
| GET | /api/v1/chat/sessions/{id}/context | Kontextfenster abrufen |
| POST | /api/v1/files/upload | Datei hochladen |
| POST | /api/v1/search/semantic | Semantische Suche |
| POST | /api/v1/search/hybrid | Hybride Suche |
| POST | /api/v1/search/intelligent | Intelligente Suche |
| GET | /api/v1/search/similar/{uuid} | Ähnliche Dateien |
| POST | /api/v1/search/cluster | Clustering ausführen (Admin) |
| POST | /api/v1/moderation/ban/{username} | Benutzer sperren (Admin) |
| GET | /api/v1/admin/users | Benutzerliste (Admin) |
| GET | /api/v1/admin/stats | Systemstatistiken (Admin) |
Interaktive Chat‑Befehle (beginnen mit /):
| Befehl | Aktion |
|---|---|
| /stack <session_id> | Zur angegebenen Session wechseln (Kontext wird übernommen) |
| /sessions | Alle eigenen Sessions anzeigen |
| /upload <dateipfad> | Datei hochladen und an aktuelle Session anhängen |
| /files | Eigene hochgeladene Dateien auflisten |
| /copy | Letzten 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 |
| /stats | Eigene Statistiken (Token‑Verbrauch, Anzahl Sessions, Uploads) |
Hauptmenü‑Befehle (nach Login):
| Befehl | Aktion |
|---|---|
| chat | Interaktiven Chat starten |
| admin | Admin‑Panel öffnen (Benutzer verwalten, sperren, Statistiken) |
| sessions | Sessions auflisten |
| upload <datei> | Datei hochladen (ohne Session‑Kontext) |
| stats | Eigene Statistiken anzeigen |
| passwd | Eigenes Passwort ändern |
| exit | CLI 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
• 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
• 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
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
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.
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.
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.
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.
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.
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).
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.
Every contribution helps.
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.
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
| File | Purpose |
|---|---|
| docker-compose.yml | Defines the services: PostgreSQL (with pgvector), Redis, FastAPI (with Uvicorn), Celery Worker, Celery Beat (Scheduler) and optional Nginx. Connects the containers via an internal network. |
| Dockerfile | Multi-stage build for the FastAPI application: base image (Python 3.10), installation of dependencies, copying of source code, start command. |
| nginx.conf | Reverse proxy configuration for production: forwarding of HTTP/HTTPS traffic to the FastAPI container, static files, caching headers. |
| requirements.txt | Complete 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, … |
| .env | Template for environment variables: database URL, API keys (OpenAI, DeepSeek, GitHub), JWT secret, limits, paths. |
| .gitignore | Ignores .env, __pycache__/, storage/, logs/, *.pyc, *.db, *.cap etc. |
| README.md | Brief introduction, installation instructions (Docker & manual), first steps. |
| init.sql | (Optional) Initial SQL script for creating the database and activating the pgvector extension. |
| alembic.ini | Configuration for Alembic migrations (connection to the database, version directory). |
• 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).
| File | Endpoints (Resources) |
|---|---|
| auth.py | POST /login, POST /register, POST /refresh, GET /me, POST /logout |
| chat.py | POST /conversations, GET /conversations, GET /conversations/{id}, POST /conversations/{id}/messages, POST /messages/{id}/feedback |
| files.py | POST /upload, GET /, GET /{uuid}, PUT /{uuid}, DELETE /{uuid}, GET /by-hash/{hash} |
| admin.py | GET /users, POST /users, PUT /users/{username}, DELETE /users/{username}, POST /users/{username}/reset-password, GET /logs, GET /stats |
| system.py | GET /health, GET /status (CPU/Memory/Disk), GET /version |
| templates.py | GET /templates, POST /templates, GET /templates/{id}, PUT /templates/{id}, DELETE /templates/{id} |
| search.py | POST /semantic, POST /intelligent, POST /hybrid, GET /similar/{uuid}, GET /suggestions, POST /cluster, GET /stats/vectors, POST /index/all |
| download.py | GET /file/{uuid}, GET /by-hash/{hash}, GET /export/conversation/{uuid} (with format parameter) |
| moderation.py | POST /flag/{uuid}, POST /ban/{username}, POST /unban/{username}, GET /flagged, GET /banned |
| File | Responsibility |
|---|---|
| config.py | Pydantic 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.py | SQLAlchemy engine (PostgreSQL), SessionLocal, Base, as well as the Vector type for pgvector. |
| models.py | ORM models (see table below). Contains relationships, indexes and vector columns (embedding, summary_embedding, centroid_embedding). |
| security.py | verify_password, get_password_hash (bcrypt), create_access_token/decode_access_token (JWT), get_current_user (FastAPI dependency). |
| dependencies.py | Common dependencies such as get_db, get_current_user_optional, rate_limit (if active). |
| Model | Key Fields | Special Features |
|---|---|---|
| User | username, email, password_hash, role, is_active, is_banned, preferences (JSON), tokens_used_today | Relationships to File, Conversation, Session |
| File | uuid, original_filename, storage_path, file_hash, category, embedding (ARRAY[Float]), is_flagged, flag_type, likes, dislikes, feedback_score | Vector for semantic search, relationship to Topic |
| Conversation | uuid, title, summary_embedding (ARRAY[Float]), message_count, is_archived | Vector for conversation search |
| Message | conversation_id, role (user/assistant), content, feedback (like/dislike), model_used | |
| Topic | name, description, category, centroid_embedding (ARRAY[Float]), sample_count, quality_score | Automatic clustering, relationship to File and Conversation |
| Session | name, user_id, conversation_id, is_active | User-defined chat sessions |
| BannedUser | username, user_id, reason, expires_at, is_permanent | |
| SystemLog | level, component, action, message, details (JSON) | Audit log |
| File | Description |
|---|---|
| ai_service.py | Central 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.py | pgvector 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.py | Extended 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.py | Automatic topic detection based on embeddings. Calculates centroids, creates new topics, assigns files/conversations. |
| File | Description |
|---|---|
| file_service.py | Saves uploaded files (streaming), extracts text (PDF, DOCX, TXT, code), calculates SHA-256, saves metadata. Calls classification and vector indexing. |
| classifier.py | Assigns files to categories (e.g. "Technology", "Business", "Science") based on content and metadata. Uses LLM or rule-based fallback. |
| session_service.py | Management 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). |
| File | Description |
|---|---|
| admin_service.py | User 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. |
| File | Responsibility |
|---|---|
| self_healing.py | Main 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.py | Searches 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.py | Builds 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.py | JSONL-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. |
| File | Description |
|---|---|
| network_monitor.py | Live 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.py | Control of the Bettercap framework (MITM tool). Starts/stops Bettercap sessions, sends commands via REST API, retrieves network information. (Optional, requires root privileges). |
| system_scanner.py | Performs regular port scans (nmap) and malware scans (ClamAV). Results are stored in the database (SecurityFinding). |
| threat_intel_aggregator.py | Retrieves threat intelligence from external sources: NIST NVD API (CVEs), GitHub Security Advisories. Can check IP reputation and domain malware (API keys required). |
| File | Description |
|---|---|
| backup_system.py | Complete 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. |
| File | Description |
|---|---|
| commands.py | Main 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. |
| File | Description |
|---|---|
| file_utils.py | Extracts 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.py | Normalises text (lowercase, removal of special characters), simple keyword extraction (TF-IDF), stopword filter (for German/English). |
| validation.py | Validates file extensions against whitelist/blacklist, email addresses, usernames (no special characters except dot/underscore). |
| logging.py | Central logging configuration: log file (logs/ai_enterprise.log) with rotation, console (INFO), error level depending on environment. |
| cli_client.py | Helper functions for the CLI: coloured output (print_success, print_error, print_info), table display (Rich tables), progress bars. |
| File | Description |
|---|---|
| celery_app.py | Creates the Celery app with Redis as broker and result backend. Defines timezone, task routing, serialization (JSON). |
| tasks.py | Asynchronous tasks: index_file_task (after upload), index_conversation_task, send_notification, run_self_healing_cycle (periodic), create_backup_task, cleanup_temp_files. |
| File | Purpose |
|---|---|
| setup.py | All-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.py | Creates all tables via SQLAlchemy (Base.metadata.create_all) and creates an initial admin user (username admin, password ChangeMeFirstLogin123!). |
| init_vector_extension.py | Activates 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.py | Migrates 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.sh | Shell script for nightly pg_dump backups (can be set up as a cron job). |
| ai_cli | Executable 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. |
| File | Description |
|---|---|
| test_api.py | Contains tests for the most important API endpoints (Auth, Chat, Files, Search) with FastAPI TestClient and a test database. |
| Path | Content |
|---|---|
| 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) |
• 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).
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.
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)
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)
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).
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).
• 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
• 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
| Method | Endpoint | Function |
|---|---|---|
| POST | /api/v1/auth/login | Login, receive JWT |
| POST | /api/v1/chat/conversations | New conversation (session) |
| POST | /api/v1/chat/conversations/{id}/messages | Send message (non-streaming) |
| POST | /api/v1/chat/stream | Streaming response (SSE) |
| GET | /api/v1/chat/sessions | All sessions of the user |
| POST | /api/v1/chat/sessions/{id}/stack | Stack session (set parent) |
| GET | /api/v1/chat/sessions/{id}/context | Retrieve context window |
| POST | /api/v1/files/upload | Upload file |
| POST | /api/v1/search/semantic | Semantic search |
| POST | /api/v1/search/hybrid | Hybrid search |
| POST | /api/v1/search/intelligent | Intelligent search |
| GET | /api/v1/search/similar/{uuid} | Similar files |
| POST | /api/v1/search/cluster | Execute clustering (Admin) |
| POST | /api/v1/moderation/ban/{username} | Ban user (Admin) |
| GET | /api/v1/admin/users | User list (Admin) |
| GET | /api/v1/admin/stats | System statistics (Admin) |
Interactive chat commands (start with /):
| Command | Action |
|---|---|
| /stack <session_id> | Switch to the specified session (context is taken over) |
| /sessions | Show all own sessions |
| /upload <filepath> | Upload file and attach to current session |
| /files | List own uploaded files |
| /copy | Copy 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 |
| /stats | Own statistics (token consumption, number of sessions, uploads) |
Main menu commands (after login):
| Command | Action |
|---|---|
| chat | Start interactive chat |
| admin | Open admin panel (manage users, ban, statistics) |
| sessions | List sessions |
| upload <file> | Upload file (without session context) |
| stats | Show own statistics |
| passwd | Change own password |
| exit | Exit 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
• 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
• 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
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