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/create
npm create @bklit
pnpm dlx @bklit/create

That'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:

  1. Use Docker for databases? (Recommended - auto-configures everything)
  2. Set up billing with Polar.sh? (Optional - for paid plans)
  3. Set up OAuth providers? (Optional - GitHub/Google login)
  4. Set up email with Resend? (Optional - for sending emails)
  5. 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-project

Manual 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 dev

See Local Development for detailed manual setup instructions.

Next Steps

Troubleshooting

Docker Not Available

If you don't have Docker, the wizard will fall back to manual database setup. You'll need to:

  1. Install PostgreSQL and ClickHouse manually
  2. Provide connection URLs when prompted
  3. Run migrations: pnpm db:migrate

Port Already in Use

If port 3000 is already in use:

# Set custom port
PORT=3001 pnpm dev

Need Help?

On this page