- Overview
- Project structure
- Requirements and installation
- Architecture and data flow
- Local execution and trusted paths
- Main module:
main.py - Common utilities:
utils.py - Logging system
- Sections (
sections/) - Database
- Asset and path handling
- Style and themes
- Icon handling
- Extension and customization
The Tech Codex is a cross-platform desktop application (Windows, macOS, Linux) written in Python 3.10+ with PyQt6 and QtWebEngine. Its mission is to be a "command center" for IT technicians, centralizing:
- RSS aggregator and reader with embedded preview.
- Daily tips, organized and filterable.
- Repositories of commands, scripts and portable apps.
- Development and incident diaries.
- Local documentation and external links with a WYSIWYG editor.
- Centralized logging system.
| Version | Date | Main changes |
|---|---|---|
| 1.0 | 26/04/2025 | First stable release. All sections integrated plus the logging system. |
Tech-Codex/
├── main.py # Application and main window
├── utils.py # Paths, SQLite, logging, common widgets
├── requirements.txt
├── sections/ # Functional section modules
│ ├── about_section.py
│ ├── apps_section.py
│ ├── commands_section.py
│ ├── diary_section.py
│ ├── documentation_section.py
│ ├── editor_section.py
│ ├── incidences_section.py
│ ├── news_section.py
│ ├── scripts_section.py
│ └── tips_section.py
├── ui/estilos.qss
├── about.md
├── LICENSE
└── README.md
During development, utils.py automatically creates database/, logs/,
scripts/ and app/ for application data. They are not part of the
versioned tree. In a packaged install, database, logs and user assets live
under the user data directory.
- Python 3.10+
- Dependencies:
pip install -r requirements.txt
- Clone the repo and enter it:
git clone https://github.com/SergioGL-14/Tech-Codex.git cd Tech-Codex - Run:
python main.py
- (Optional) Customize the theme in
ui/estilos.qss.
main.pyinitializes the main window and the DB.- Side menu (
QListWidget) for sections. _switch(idx)dynamically loads each section's widget.- Sections use
utils.get_conn()for SQLite CRUD. - Errors log in real time to
logs/techcodex.log.
Scripts and apps are launched as local processes through subprocess; they
do not run on a remote server or inside a sandbox. Only register or select
files and folders from trusted paths whose content and origin have been
verified by you. The app checks that the path exists, but that check is no
substitute for your review — no additional trust policy or permissions are
applied.
_SCHEMA_SQL(inutils.py): SQL that creates missing tables.init_db(): boots the DB and enables foreign keys.excepthook(): catches global exceptions and sends them to the logger.ProcWorker(QObject): runs commands/processes in the background.MainWindow:_switch(self, idx): switches section._run_generic(self, path, lang): runs local scripts/apps._open_folder(self, path): opens folders.
- Paths:
BASE_DIR,DB_PATH,LOG_PATH, etc. - DB:
get_conn(),fetchone(sql, args),fetchall(),exec_sql(). - Files:
get_relative_path_or_copy(src), asset handling. - UI:
clear_layout(),RepoCard,AssetDialog,TextEditorDialog. - Icons: local helpers in
diary_section.pyanddocumentation_section.py.
Every error (scripts, apps, exceptions) is recorded in
logs/techcodex.log, newest entries at the top:
------- 26/04/2025 00:54 -------
[Python]: utils.py
Traceback (most recent call last):
File "utils.py", line 42, in get_conn
conn = sqlite3.connect(DB_PATH)
sqlite3.OperationalError: unable to open database file
- Format:
------- DD/MM/YYYY HH:MM -------header. - Category:
[Python],[Script],[App],[Exception], etc. - Order: new entries inserted at the top.
- Rotation: (future improvement) cap by size or lines; currently unlimited.
- Feed configuration in
NewsCfg. RSSFetcher(QThread): async downloads.NewsCard: title, summary, buttons Ver, Leída, Favorito.- Filters: source, text, date, favorites.
- Tips stored in the DB with category and level.
- Navigation: random or sequential.
- Shortcuts: F (favorite), → (next), Esc.
- CRUD for shell commands with examples.
- Filters: text, status, favorites, category, language.
- Quick-flag buttons.
- Add/edit/reload scripts.
- Automatic copy into
scripts/. - Hidden execution (
CREATE_NO_WINDOW) or in a new console.
- Same as scripts, under
app/. - Extension-to-category mapping.
- Silent or visible execution.
- CRUD for projects and WYSIWYG entries.
- Statuses: En curso, Pausado, Finalizado.
- Per-diary icons with
_copy_icon()and_pixmap().
- CRUD with priority and category.
- Filters and marking of resolved incidents.
- Categories stored in the DB (
CategorySettings). - Interactive grid of folders and links.
- CRUD for local files and URLs.
- WYSIWYG HTML editor (
FileCreatorDialog).
- SQLite with foreign keys enabled.
- Tables:
DiariosDesarrollo,EntradasDesarrollo,Incidencias.Consejos,Comandos,Scripts,Aplicaciones.Documentacion,CategorySettings.
CREATE TABLE IF NOT EXISTS DiariosDesarrollo (
id INTEGER PRIMARY KEY AUTOINCREMENT,
titulo TEXT UNIQUE NOT NULL,
descripcion TEXT,
fecha_creacion TEXT NOT NULL,
lenguaje TEXT,
estado TEXT DEFAULT 'En curso',
icono TEXT
);
-- Remaining tables defined in utils._SCHEMA_SQL- Relative paths from
BASE_DIR. get_relative_path_or_copy()copies external assets into internal folders.- Folder
icons/<slug>/...for icons.
- Qt Fusion style.
- Stylesheet in
ui/estilos.qss. - Drop shadows (
QGraphicsDropShadowEffect) and a coherent palette.
- Selection via the “…” dialog
- Validation:
.png,.jpg,.ico, ≤2 MB. - Copy to
icons/<slug>/...when coming from outside. - Stored in the DB and pixmap cache at 80×80.
- Add a section: create a module in
sections/, register it inmain.py. - Extend the DB: edit
_SCHEMA_SQLinutils.pyand migrate. - Tweak QSS in
ui/estilos.qssand feeds innews_section.py.
Next candidates when the app needs them: automatic database backup/restore and PDF/CSV report export from the different sections.
UI labels quoted above (Ver, En curso, …) appear as the interface shows them, which is in Spanish.