tinykit
repository·main·Indexed 19 days ago
https://github.com/tinykit-studio/tinykitAn open-source agentic app builder and AI development platform for building and deploying web applications. tinykit manages the full stack, including code, deployment, and a PocketBase database, allowing users to focus on prompting and design. It supports deployment via Docker, Railway, and Fly.io, and features domain-based routing to host multiple AI-generated apps on a single server.
What's inside tinykit
- tinykit can be deployed to any Node.js host. The recommended approach for the Alpha phase is using Railway for its ease of use and managed infrastructure. If you require full control or already own a VPS, Docker is the universal option for self-hosting on providers like DigitalOcean, AWS, Azure, or GCP.
Configure Persistent Storage Volumes
mainRailway services are ephemeral. You must configure volumes to ensure your database and user projects are not lost on restart.
Required Volumes
Pocketbase Data
- Mount Path:
/app/pocketbase/pb_data - Purpose: Stores database, auth, and uploaded files.
- Recommended Size: 1GB (Minimum 500MB; 5GB+ if handling many file uploads).
- Mount Path:
Workspace
- Mount Path:
/app/workspace - Purpose: Stores source code and compiled HTML output. Note:
node_modulesare NOT stored here. - Recommended Size: 1GB (Minimum 500MB; 2GB+ for heavy use).
- Mount Path:
Understand Tinykit domain-based routing and access points
mainTinykit uses domain-based routing, allowing you to host multiple apps on a single server by pointing different domains to it. Each domain serves a specific app at the root path, while the Tinykit management tools are accessed via specific sub-paths.
Routing Example
calculator.myserver.com/→ Serves the calculator appcalculator.myserver.com/tinykit/studio→ Opens the editor for the calculator app
URL Access Points
URL Description /Your production app /tinykit/studioEdit the app associated with the current domain /tinykit/dashboardView all hosted apps /tinykit/settingsConfigure LLM settings Run Tinykit locally using Node.js
mainTo run Tinykit directly with Node.js, clone the repository, install dependencies via npm, and run the development script. The dev server will automatically download PocketBase. After starting, visit
http://localhost:5173/setupto complete the initial configuration.# Clone and install git clone https://github.com/tinykit-studio/tinykit.git cd tinykit npm install # Start dev server (auto-downloads PocketBase) npm run devDeploy Tinykit to Railway
mainThe fastest way to deploy Tinykit is using the one-click Railway deployment. This requires no manual configuration. Once deployed, you can configure your LLM directly from the application interface or by adding your API key as an environment variable.
[](https://railway.com/deploy/tinykit?referralCode=RCPU7k&utm_medium=integration&utm_source=template&utm_campaign=generic)Quick Start with Docker Compose
mainTo get a local instance of tinykit running quickly using Docker Compose, follow these steps:
- Clone the repository and enter the directory.
- Create your
.envfile from the example and add yourLLM_API_KEY. - Navigate to the docker deployment directory and start the containers.
Once running, the App is available at
http://localhost:3000and the Builder athttp://localhost:3000/tinykit.# 1. Clone the repository git clone https://github.com/tinykit-studio/tinykit.git cd tinykit # 2. Set environment variables cp .env.example .env # Edit .env and add your LLM_API_KEY # 3. Run with Docker Compose cd deploy/docker docker-compose up -dSelf-host tinykit using Docker
mainDocker is a universal option for deploying tinykit to any VPS (DigitalOcean, AWS, Azure, GCP, etc.). It provides full control and portability, with estimated costs between $6-15/mo depending on your VPS provider.
For detailed instructions, refer to the Docker Deployment Guide.
Deploy to Fly.io
mainDeploy tinykit to Fly.io using the provided Dockerfile. You will need to install
flyctl, launch the app, and set your LLM configuration as secrets.# Install flyctl curl -L https://fly.io/install.sh | sh # Launch app fly launch --dockerfile deploy/docker/Dockerfile # Set secrets fly secrets set LLM_API_KEY=sk-your-key fly secrets set LLM_PROVIDER=openai fly secrets set LLM_MODEL=gpt-4 # Deploy fly deployManual Docker Build and Run
mainIf you prefer not to use Docker Compose, you can manually build and run the tinykit image. You must provide the required LLM environment variables and mount volumes for data persistence.
# Build image docker build -f deploy/docker/Dockerfile -t crud-one . # Run container docker run -d \ -p 3000:3000 \ -e LLM_PROVIDER=openai \ -e LLM_API_KEY=sk-your-key \ -e LLM_MODEL=gpt-4 \ -v crud_pb_data:/app/pocketbase/pb_data \ -v crud_workspace:/app/workspace \ --name crud-one \ crud-oneDeploy tinykit to Railway (Recommended)
mainRailway is the easiest deployment method, offering one-click deployment, automatic HTTPS, and built-in volumes. It is ideal for beginners who want managed infrastructure with a base cost of approximately $5/mo.
For detailed instructions, refer to the Railway Deployment Guide.
Run Tinykit locally using Docker
mainTo run Tinykit locally with Docker, clone the repository, navigate to the docker deployment directory, and use docker-compose. This will start Tinykit on port 5173. After starting, visit
http://localhost:5173/setupto complete the initial configuration.git clone https://github.com/tinykit-studio/tinykit.git cd tinykit/deploy/docker docker-compose up -dDeploy tinykit to Railway via GitHub
mainThe recommended way to deploy is by connecting your GitHub repository to Railway. Railway will automatically detect the configuration from
railway.toml.- Push to GitHub: Ensure your latest code is pushed to your repository.
- Create Railway Project: In the Railway dashboard, select 'New Project' and 'Deploy from GitHub repo'.
- Add Persistent Volumes (CRITICAL): Because Railway services are ephemeral, you must mount volumes to prevent data loss. Add two volumes in the 'Variables' tab:
- Pocketbase Data: Mount path
/app/pocketbase/pb_data. Size: 1GB recommended (500MB min, 5GB+ for heavy file uploads). - Workspace: Mount path
/app/workspace. Size: 1GB recommended (500MB min, 2GB+ for heavy use).
- Pocketbase Data: Mount path
- Configure Environment Variables: Add your AI provider details and server configuration (see Environment Variables Reference).
- Deploy: Wait for the build to complete (~2-3 minutes).
git add . git commit -m "Prepare for Railway deployment" git push origin master