Documentation Index Fetch the complete documentation index at: https://docs.s4kit.com/llms.txt
Use this file to discover all available pages before exploring further.
Run S4Kit on your own infrastructure for full control over your data.
Prerequisites
Docker with Compose support
Bun 1.3.4+ (install )
Quick Setup
Clone and Install
git clone https://github.com/michal-majer/s4kit.git
cd s4kit
bun install
Start Database Services
docker compose up -d postgres redis
Initialize Database
cd packages/platform/backend
bun x drizzle-kit push --force
bun run db:seed
bun run db:setup-admin
Build and Start
cd ../..
bun run build
# Start services (3 terminals or use PM2)
cd packages/platform/backend && bun run start
cd packages/platform/frontend && bun run start
cd packages/platform/proxy && bun run start
Access : http://localhost:3001 | Login : admin@example.com / changeme123
Service Ports
Service Port Description Frontend 3001 Admin dashboard (Next.js) Backend 3000 Admin API Proxy 3002 SDK proxy PostgreSQL 5433 Database Redis 6379 Cache
Configuration
Main config in packages/platform/backend/.env:
DATABASE_URL = postgresql://s4kit:s4kit_dev_password@localhost:5433/s4kit
REDIS_URL = redis://localhost:6379
ENCRYPTION_KEY =< openssl rand -hex 3 2>
BETTER_AUTH_SECRET =< openssl rand -base64 3 2>
ADMIN_EMAIL = admin@example.com
ADMIN_PASSWORD = changeme123
FRONTEND_URL = http://localhost:3001
Generate new ENCRYPTION_KEY and BETTER_AUTH_SECRET for production!
Process Management (PM2)
npm install -g pm2
pm2 start packages/platform/backend/src/index.ts --name backend --interpreter ~/.bun/bin/bun
pm2 start packages/platform/frontend/server.js --name frontend
pm2 start packages/platform/proxy/src/index.ts --name proxy --interpreter ~/.bun/bin/bun
pm2 save && pm2 startup
Health Checks
curl http://localhost:3000/api/health # Backend
curl http://localhost:3002/health # Proxy
Production Deployment See DEPLOY.md for infrastructure, SSL, and scaling →