Guides
Build From Source
Build CoreLayer from the source repository.
This guide covers building CoreLayer from source for development or when pre-built binaries aren't available.
Prerequisites
| Requirement | Version |
|---|---|
| Node.js | >= 22 |
| pnpm | >= 9 |
| Rust | Latest stable |
| Platform tools | See Tauri prerequisites |
Platform-Specific Requirements
Windows:
- Microsoft Visual Studio C++ Build Tools
- Windows SDK
macOS:
- Xcode Command Line Tools
Linux:
- Various system libraries (see Tauri docs)
Clone and Install
git clone https://github.com/alvinluo-tech/CoreLayer.git
cd CoreLayer
pnpm installDevelopment Mode
Run the full app in development mode with hot reload:
pnpm devThis starts:
- The daemon on port 3001
- The Vite dev server for the frontend
- The Tauri app with hot reload
Build for Production
pnpm buildThis will:
- Build the daemon sidecar
- Build the Tauri app with production optimizations
- Output platform-specific installers
Build Individual Components
Daemon only
pnpm build:daemonDaemon sidecar (for packaging)
pnpm build:daemon:sidecarFrontend only (web mode)
pnpm dev:webProject Structure
CoreLayer/
├── frontend/ # Tauri + React frontend
│ ├── src/ # React source
│ └── src-tauri/ # Rust native code
├── daemon/ # Node.js backend
├── packages/ # Shared packages
│ ├── types/ # TypeScript types
│ ├── model-gateway/ # AI model routing
│ ├── mcp-client/ # MCP connections
│ ├── tool-registry/ # Tool management
│ ├── permission-guard/ # Safety system
│ ├── runtime-core/ # Runtime management
│ ├── runtime-protocol/ # Protocol definitions
│ └── execution-environment/ # Execution abstraction
├── skills/ # Built-in skill definitions
├── scripts/ # Build scripts
└── supabase/ # Database migrationsTroubleshooting
pnpm install fails:
- Ensure Node.js 22+ and pnpm 9+ are installed
- Try
pnpm install --frozen-lockfile
Tauri build fails:
- Verify Rust toolchain is installed:
rustc --version - Check platform-specific prerequisites
- See Tauri troubleshooting
Daemon won't start:
- Check port 3001 is not in use
- Verify database permissions
- Check daemon logs for errors
Next Steps
- System Overview — understand the architecture
- Daemon — daemon details