One Server Philosophy
One server. One deployment. Zero complexity. Unlike other platforms where you build locally and deploy separately, tinykit runs the builder AND your app on the same server. Edit at/tinykit, ship at /.
URL Structure
Your tinykit instance serves everything from a single domain:| Path | Purpose | Who Uses It |
|---|---|---|
/ | Your generated app | End users |
/tinykit/dashboard | List all projects | You (developer) |
/tinykit/studio | Edit app for current domain | You (developer) |
/tinykit/studio?id=X | Edit specific project | You (developer) |
/api/agent | AI code generation | Builder |
/_pb/_ | PocketBase admin | You (optional) |
Domain-Based Routing
Run hundreds of apps from one tinykit instance. Each domain serves a different app:- Point multiple domains to your tinykit server
- Each domain is associated with a project in PocketBase
- Root URL (
/) serves the pre-built HTML for that domain’s project /tinykitlets you edit the project for the current domain
/tinykit/new?domain=X to create a new project.
Tech Stack
SvelteKit
Fast, modern framework for the builder and generated apps
CodeMirror 6
Modern code editor with syntax highlighting and autocomplete
OpenAI / Anthropic / Gemini
Your choice of AI provider for code generation
PocketBase
Embedded database for data persistence
Tailwind CSS
Utility-first styling for rapid UI development
TypeScript
Type safety throughout the codebase
Data Storage
All project data is stored in a single PocketBase collection (_tk_projects):
Everything in one collection means simple backups and easy migrations.
Data Flow
1
You Chat with AI
Send a prompt like “Create a todo list app” to the AI Agent panel.
2
AI Generates Code
The AI responds with code, which streams to your browser in real-time.
3
Files are Saved
Generated code is saved to the project’s
frontend_code field.4
Preview Updates
The live preview compiles and shows your changes immediately.
5
Build for Production
Server compiles Svelte to standalone HTML, saves as static file.
6
Users See Changes
Anyone visiting your root URL sees the updated app instantly.
Build System
Preview uses in-browser Svelte compilation for instant feedback. Production uses server-side compilation:- Svelte 5’s native
compile()function - Generates standalone HTML with CDN-based imports
- Triggered by clicking “Deploy” button
- Result stored as file attachment in PocketBase
AI Agent System
The AI agent uses a tool-use pattern to build your app:Available Tools
| Tool | What It Does |
|---|---|
write_code | Updates app code |
create_design_field | Adds CSS variables (colors, fonts) |
create_content_field | Adds CMS fields (text, images) |
create_data_file | Creates data collections |
insert_records | Seeds data into collections |
update_spec | Updates project metadata |
Performance
| Operation | Typical Time |
|---|---|
| Editor load | ~100-200ms |
| File save | ~50-100ms |
| Preview refresh | ~100-200ms |
| AI response | ~2-5s (depends on model) |
| Production build | ~500ms-2s |