- Overview
Sila Development Documentation
Project structure
We have a package.json in the root of the repository that unites all the packages (from the /packages dir) in the npm workspace. We run npm install
, npm run dev
and npm build
from the root directory.
This should be enough to get started after cloning the repository:
npm install && npm run dev
See Quick Start for the instructions on running, debugging, and building.
Packages
- packages/core is the core functionality shared with other packages.
- packages/client is the client code with UI components written in Svelte.
- packages/desktop is a Svelte /w Vite + Electron wrapper that is using the client package. We use it for desktop builds.
- packages/mobile is a SvelteKit + Capacitor wrapper that is using the client package. We use it for mobile builds.
- packages/demo is a tool to create demo workspaces out of a JSON
- packages/tests is a test suit for the most important systems of Sila
Quick facts about the tech stack
- Standalone application (desktop + mobile)
- Desktop app runs on Electron
- Mobile app runs on Capacitor
- Built with TypeScript
- Frontend uses Svelte 5 + SvelteKit
- Everything runs locally (no server yet) plus external APIs
- Styling via Tailwind CSS
- Components from Skeleton design system
- Inference with AI is done through AIWrapper
- Sync handled by RepTree
- Tiling tabs like in VSCode are built with TTabs
- Context for AI agent generated with Airul
How it ties together and builds
Neither the core nor client gets their own dist/build. Rather than building - we import them to our dedicated Vite projects in the desktop and mobile packages. Desktop and mobile packages import
Core Features
Spaces
Spaces are the primary unit of user data in Sila. Learn about:
- RepTree CRDT system
- Space and App trees
- Persistence layers (IndexedDB, FileSystem)
- Secrets management
- Best practices for developers
Files in Spaces
How Sila handles binary file storage and management:
- Content-addressed storage (CAS)
- Files AppTree for logical organization
- FileStore API for desktop
- Chat attachments integration
- On-disk layout and metadata
Electron Custom File Protocol
How Sila serves files directly from CAS using a custom protocol:
sila://
protocol implementation- Space-aware file serving
- Performance optimization
- Security considerations
Testing
Testing infrastructure and practices in Sila:
- Vitest test suite
- File persistence testing
- Local assets for deterministic tests
- Running tests and development workflow
Space Management
Managing workspaces and data:
- Creating and organizing spaces
- Data persistence and sync
- Workspace configuration
AI Development Guidelines
Everything in For AI Agents is addressed to AI agents - basic rules for commiting, using particular tools, documenting, etc.
Proposals
See proposals for feature proposals. We delete proposals when we complete them (in production and tested).
Related Projects
Sila is built alongside several companion projects:
- AI inference - aiwrapper
- Info about AI models - aimodels
- Tiling tabs - ttabs
- Sync - reptree
- AI context - airul
All projects are maintained by Sila's author.