System overview
How qareg is put together
A compact map of runtime, persistent data, backups and the safe rebuild workflow.
Click any box for details
Version control
Application & database versions
Backups carry their source schema so restore can choose a safe strategy.
APPApplication version 008+
The running application release is 008. The database reports 008.
DBSchema version 6+
The current database structure is schema 6, generated by generator 028-linux. Older backups are restored into compatible current columns; backups from a newer schema are blocked.
Architecture
Runtime flow
The application code can be replaced without replacing the project data.
01Browser & usersHTTP · login · roles+
Users work with the Flask application through the browser. Authentication, profiles and role-based administration are part of the generic foundation.
02qaregAppDisposable application+
This folder contains Flask source code, templates, static application assets, the virtual environment and the start/kill scripts. A generator rebuild may replace this whole folder.
03qaregFolderPersistent project data+
The sibling data folder survives application rebuilds. It owns the live database, project images, generator copy, temporary update export and routine backups.
Persistent data
Inside qaregFolder
These folders are kept separate from replaceable application code.
database/Live SQLite database+
database/app.db is the active database. The app and generator both point to this persistent location.images/Project images+
Project image files live here and are deliberately left alone during normal application rebuilds.
generator/Generator revisions+
Every generator revision is archived here with its revision number, for example
GenericFlaskAppGenerator027.py. Older revisions are kept instead of being overwritten.temp files/Update transfer area+
During a rebuild, compatible database rows are exported here before the old app is replaced and imported into the newly created schema afterwards. Successful import cleans up the temporary backup.
backups/Routine database backups+
Backups are tagged with the app revision. Daily/weekly retention applies separately to each revision, so upgrading the app never deletes backup history from older revisions.
Daily02:00Keep 14
WeeklySunday 03:00Keep 12
While the app is running, its background scheduler creates validated SQLite backups. If a scheduled backup was missed while the app was stopped, it catches up on the next start.
Generator workflow
Safe rebuild flow
The generator preserves data while replacing the application around it.
01PreflightValidate new source+
Python syntax, templates, routes and common references are checked before the existing application is touched.
02Stop appKill launcher & process tree+
The generated kill script and generator fallback stop the running application so Windows releases source and database handles.
03Export dataTemporary row backup+
Application-table rows are exported to temp files so compatible data can cross database schema changes.
04Replace appRebuild qaregApp+
The disposable application folder is removed and regenerated with fresh source, venv and requirements.
05Recreate & importNew schema + old data+
The database schema is created from the new application, defaults are seeded, then compatible old rows are imported.
06Verify & startHealth check+
SQLite integrity and application import checks run before the rebuilt application is started again.