Project Directory Structure
Relevant source files
The following files were used as context for generating this wiki page:
KernelForge-App uses a modern, mobile-native architecture built on Next.js 15 and Capacitor 6. The directory structure organizes the application into logical layers for frontend components, AI logic, and native Android integration.
This structure supports a standalone ARM64 Android application that facilitates kernel development, patching, and packaging directly on a mobile device.
Sources: README.md:1-17, package.json:67-73
Architecture Overview
The project follows a standard Next.js App Router layout, supplemented by Capacitor for native filesystem and mobile capabilities.
The diagram above illustrates the high-level hierarchical organization of the KernelForge repository.
Sources: README.md:15-17, components.json:10-16
Root Directory
The root directory contains project-wide configuration files for build tools, dependency management, and native bridge settings.
| File | Description |
|---|---|
package.json | Defines project metadata, scripts (dev, build, zip-project), and dependencies including Next.js, React, and Capacitor. |
components.json | Configures Shadcn/UI settings, including path aliases for @/components, @/ui, and @/lib. |
README.md | Provides the project overview, technical architecture details, and CI/CD pipeline documentation. |
skills-lock.json | Tracks Genkit AI dependencies and specific hashes for AI skill modules. |
Sources: package.json:1-92, components.json:1-19, README.md:1-33, skills-lock.json:1-10
The src Directory
The src directory houses all functional code, divided by domain and responsibility.
src/app
This directory utilizes the Next.js App Router for routing and global application state.
- layout.tsx: Defines the root layout, including font configurations (Inter, Space Grotesk) and PWA metadata.
- page.tsx: Serves as the main dashboard, managing states for kernel building, patching (KernelSU, SUSFS), and UI tabs.
- globals.css: Contains Tailwind CSS directives and custom neon-glow/purple-glow utility classes.
- manifest.ts: Dynamically generates the PWA manifest for standalone mobile display.
Sources: src/app/layout.tsx:1-45, src/app/page.tsx:1-55, src/app/globals.css:1-60, src/app/manifest.ts:1-29
src/components
Components are split between generic UI elements and dashboard-specific modules.
- ui/: Contains reusable Radix-based components like
sheet.tsx,chart.tsx,button.tsx, andinput.tsx. - dashboard/: Contains high-level feature components:
AITroubleshooter.tsx: Interfaces with the AI flow to analyze build logs.KernelLogs.tsx: Renders a simulated build terminal with scroll management.SidebarNav.tsx: Manages application navigation.
Sources: src/components/ui/sheet.tsx:1-135, src/components/dashboard/AITroubleshooter.tsx:1-100, src/components/dashboard/KernelLogs.tsx:1-65, src/app/page.tsx:5-18
src/ai
This directory manages AI-driven logic for debugging kernel builds.
- flows/: Contains structured AI workflows, such as the
ai-build-troubleshooting-assistant.ts, which defines input schemas for build logs and device info.
Sources: src/ai/flows/ai-build-troubleshooting-assistant.ts:1-51
The public Directory
The public directory stores static assets accessible via the root URL.
- manifest.json: A static PWA manifest defining the app name ("Lineage Kernelcrafter"), theme colors (#00ff55), and icons.
Sources: public/manifest.json:1-22
Component Relationship Flow
The application coordinates data between user inputs in the UI and the underlying build logic.
The diagram above shows how components in different directories interact during a kernel build cycle.
Sources: src/app/page.tsx:78-140, src/components/dashboard/AITroubleshooter.tsx:19-32
Conclusion
The directory structure of KernelForge-App reflects a clear separation between infrastructure (Capacitor/Next.js config), application logic (src/app), and specialized features (src/ai and src/components). This organization facilitates the automated build pipeline described in the documentation, allowing for seamless integration of kernel patching and packaging tools.
Sources: README.md:21-33