This document records all architectural implementations, migrations, features, and refinements performed during the creation of Parcel-Python, converted from the original C++ (Qt 6) codebase.
- Framework Stack: Migrated from C++17 / Qt 6 Widgets / QML to Python 3.10+ / PyQt6 / PyQt6-WebEngine.
- Modular Package Structure: Organized inside the
parcel/package with dedicated submodules for core, services, AI agents, and views.
NavigationController: Thread-safe singleton managing view transitions viaNavigationTargetenums (HOME,NEW_PROJECT,OPEN_PROJECT,SETTINGS,WORKSPACE).- Constants & Version: Global application constants and versioning (
1.0.0).
PersistenceService: Settings manager with XOR-based encryption (0xAF) for LLM API keys (Gemini/OpenAI) and usage telemetry tracking.BackupService: SQLite database snapshotter (.parcel_backups.db) managing recursive build backups and individual file revision saves.ExportService: Native Python export engine capable of generating Debian packages (.deb), release tarballs (.tar.gz), and AppImage directory structures inside thebuild/folder.GitService& Desktop Managers: Subprocess Git repository detector, branch tracker, and environment bridges for KDE, GTK (2/3/4), .NET, PHP, and Node.js.
QLMEngine: Evaluates natural language instructions against JSON rule files (QLM/andSS QLM/).LocalAgent&ProjectKnowledge: Recursively indexes project symbols (classes and functions), manages short-term memory, and tracks technical debt.FilePatcher: Transactional code patcher ensuring safe, atomic file modifications (reconstruct,safe_create,patch,smart_append).ScriptValidator: Shell script linter enforcing SSQLM safety standards (set -uo pipefail, error traps, unquoted variable checks).MLService&WebSearch: Python ML context predictor and Trafilatura web research agent.
- Cyber-Dark Theme (
theme.py): Deep space color palette applied via customQPaletteand stylesheets. - Navigation Views:
DashboardView: Welcome dashboard with New Project and Open Project buttons.NewProjectView: Multi-step project creation wizard.OpenProjectView: Folder picker and static project analysis report viewer.SettingsView: API key configuration and framework integrations view.
- Project Header & Workspace (
project_header.py,project_workspace.py):- Compact header with Git branch badge and action buttons: East Pane, South Pane, Designer, Build + Backup (triggers SQLite backup and live terminal build logging), and Export (menu with
.deb,.tar.gz,.AppDiroptions).
- Compact header with Git branch badge and action buttons: East Pane, South Pane, Designer, Build + Backup (triggers SQLite backup and live terminal build logging), and Export (menu with
- Advanced Syntax Highlighter (
highlighter.py):- Supports Python, C/C++, Java, C#, VB.NET, F#, Go, Rust, JavaScript, TypeScript, PHP, Ruby, Perl, Raku, ASP, JSP, Assembly, Shell Script, SQL, JSON, YAML, HTML/XML/QML, and Markdown.
- Interactive QML Designer (
designer_pane.py,DesignerCanvas):- Component palette with 30+ QML & Kirigami elements, interactive mouse-draggable canvas for precise X/Y positioning, Properties Inspector, and live QML Code Generator.
- Assistant & Tool Panes:
- Gemini, OpenAI, Terminal, Logcat, Browser, Databases, Inspection, Versions, and Saves panes.
build.sh&run.sh: Automated environment setup and execution scripts (available at project root and insidebuild/).- Dynamic Application Icon: Automatically generates and saves the "PP" monogram icon with Python branding colors (
resources/parcel-python-dark.pngand~/.local/share/icons/). .gitignore: Configured to exclude virtual environments, build artifacts, and large SQLite backup files (.parcel_backups.db).