Quick Start
Get up and running with Bklit Analytics in under 2 minutes
Get Bklit Analytics running locally in under 2 minutes with our interactive setup wizard.
Zero Configuration Required: The setup wizard automatically generates secrets, configures databases, and gets you running - no manual configuration needed!
One-Command Setup
Run this single command to set up everything:
npx @bklit/createnpm create @bklitpnpm dlx @bklit/createThat's it! The wizard will:
- ✓ Check your system (Node.js, Docker)
- ✓ Generate secure secrets automatically
- ✓ Set up PostgreSQL & ClickHouse
- ✓ Install dependencies
- ✓ Create database schema
- ✓ Start the development server
Total time: ~90 seconds
What You'll Be Asked
The setup wizard asks about optional features you can enable later:
- Use Docker for databases? (Recommended - auto-configures everything)
- Set up billing with Polar.sh? (Optional - for paid plans)
- Set up OAuth providers? (Optional - GitHub/Google login)
- Set up email with Resend? (Optional - for sending emails)
- Start development server? (Yes to start immediately)
All Optional! Core features work out of the box with just email authentication (magic links). Add OAuth, billing, and email later when you need them.
Authentication in Development
When you skip email setup, login codes appear directly in your terminal:
🔐 ==========================================
📧 Email: [email protected]
🔑 OTP Code: 123456
📝 Type: email-verification
==========================================No email checking needed! Just copy the code from your terminal.
Watch Your Terminal: OTP codes and email logs appear in the terminal during development. This makes testing super fast!
What's Included Out of the Box
Core Features (Zero Configuration):
- ✅ Email authentication (magic links)
- ✅ Analytics tracking & dashboards
- ✅ Funnel builder
- ✅ Session tracking
- ✅ Geographic insights (list view)
- ✅ Custom events
- ✅ Real-time analytics
Optional Features (Add Later):
- OAuth (GitHub/Google) - Social login
- Billing (Polar.sh) - Paid subscription plans
- Email sending (Resend) - Transactional emails
- Maps (Mapbox) - Geographic map visualization
- Background jobs (Trigger.dev) - Scheduled tasks
Enable any optional feature by adding API keys to your .env file.
Custom Directory Name
By default, the wizard creates a bklit directory. To use a custom name:
npx @bklit/create my-analytics-projectManual Setup (Alternative)
If you prefer manual setup:
# Clone the repository
git clone https://github.com/bklit/bklit.git
cd bklit
# Install and configure manually
pnpm install
# ... configure .env
pnpm db:migrate
pnpm devSee Local Development for detailed manual setup instructions.
Next Steps
Create Your First Project
Set up your first analytics project in the dashboard
Install the SDK
Add analytics tracking to your application
Test with Playground
Try out tracking with the included playground app
Environment Variables
Learn about required and optional configuration
Troubleshooting
Docker Not Available
If you don't have Docker, the wizard will fall back to manual database setup. You'll need to:
- Install PostgreSQL and ClickHouse manually
- Provide connection URLs when prompted
- Run migrations:
pnpm db:migrate
Port Already in Use
If port 3000 is already in use:
# Set custom port
PORT=3001 pnpm dev