Some checks failed
Android CI Build / check (push) Has been cancelled
Android CI Build / package-apks (push) Has been cancelled
Docs Deploy / build (push) Has been cancelled
Module Market Check / Validate modules/ (push) Has been cancelled
Module Market Publish / Generate submissions.json (push) Has been cancelled
Docs Deploy / deploy (push) Has been cancelled
- Package rename com.webtoapp -> br.com.drukstech.codeapp - Product rename WebToApp/web-to-app -> DruksCode/drukscode - Design system Wta* -> Dkc* - applicationId br.com.drukstech.codeapp (.play for gplay flavor) - rootProject.name DruksCode - Fresh git history (upstream kept as remote for sync)
3.0 KiB
3.0 KiB
Developer Docs
This section is for people working on DruksCode itself — contributors, deep customizers, and AI coding agents. It explains how the codebase is organized and how the two things that trip everyone up actually work: the export pipeline and shell sync.
::: tip Authoritative reference
AGENTS.md at the repo root is the authoritative guide for AI agents and deep contributors. These pages expand on it with more context.
:::
Repository layout
| Path | Role |
|---|---|
app/ |
Full builder host: editor UI, export pipeline, runtimes, preview. The main application module. |
shell/ |
Runtime template. Built to app/src/main/assets/template/webview_shell.apk via :shell:assembleRelease + :app:syncShellTemplateApk. |
clone-host/ |
Host-side APK clone / identity reshape support library (compiled to a DEX asset). |
modules/ |
Module Market catalog (registry.json + per-module folders). |
scripts/ |
Build helpers and gates (check_config_field_drift.py). |
docs/ |
This documentation site. |
Runtime Kotlin is authored under app/ and synced into shell/ by syncShellRuntimeSources. Edit the app/ source once; do not permanently fork copies under shell/.
The three Gradle modules
:app— the builder.applicationId = br.com.drukstech.codeapp,compileSdk = 36,minSdk = 23,targetSdk = 35,buildConfigField SHELL_RUNTIME_ONLY = false.:shell— the runtime template embedded into generated APKs. SamecompileSdk/minSdk/version as:app, buttargetSdk = 28(generated apps keep the low targetSdk for fork+exec runtimes) andSHELL_RUNTIME_ONLY = true. Its sources are synced fromapp/.:clone-host— a minimalcom.android.library(namespacebr.com.drukstech.codeapp.clone) with no dependencies, compiled to a DEX asset forAppCloner.
Package structure (app/src/main/java/br/com/drukstech/codeapp)
core/*— ~53 sub-packages of business/runtime logic:apkbuilder,shell,webview,engine,extension,crypto,nodejs,php,python,golang,wordpress,linux,port,dns,network,adblock,agent, and more.data/*— persistence: Room DAOs, database, type converters, and theWebAppmodel + nested*Configclasses.ui/*— Jetpack Compose screens, components, design system, and the shell UI.di/— Koin dependency injection.util/— helpers and constants.
Native C++ lives under app/src/main/cpp/ (crypto, integrity, anti-debug, node_bridge, node_launcher, go_exec_loader).
Where to read next
- Architecture — the preview-vs-export mental model.
- Export Pipeline — how a
WebAppbecomes a signed APK. - Shell Sync & Template — how runtime code reaches generated apps.
- Config Field Drift — the most common silent failure.