Getting Started

Welcome to FlareKit! This guide will help you quickly set up FlareKit for local development or deploy it to Cloudflare with a single click.

🚀 One-Click Deploy (Recommended)

You can deploy FlareKit to Cloudflare Workers and D1 instantly:

Deploy to Cloudflare

  • This will automatically set up your project on Cloudflare, including D1 database configuration.
  • Follow the prompts to complete the deployment and get your own FlareKit instance online.

🛠️ Local Development

You can also run FlareKit locally for development and testing. By default, the project uses SQLite for local development and Cloudflare D1 for production.

1. Clone the repository

git clone https://github.com/mockkey/flarekit.git
cd flarekit

2. Install dependencies

pnpm install
# or npm install / yarn install

3. Copy Wrangler config

Copy the wrangler.jsonc config file to the apps/web directory:

cp wrangler.jsonc apps/web/

This file is used for local Cloudflare Worker configuration.

4. Local Environment Variables

Before running locally, copy the example file and fill in your own values:

cp .dev.vars.example .dev.vars
# Then edit .dev.vars with your credentials

You can find these in your Cloudflare Dashboard. For local development, this step is optional unless you plan to deploy.

5. Initialize the local SQLite database

Run the provided script or migration command to set up the local database:

pnpm run db:generate

# or
pnpm run db:local

Make sure the SQLite database file is created in your project directory.

6. Start the development server

pnpm dev

7. Open in your browser

Visit http://localhost:5173 to access your local FlareKit instance.


Database Configuration

  • Local development uses SQLite by default for simplicity.
  • Production deployments (Cloudflare) use Cloudflare D1 as the database backend.
  • The project will automatically select the correct database based on your environment.

Troubleshooting

  • If you encounter issues with dependencies or database setup, check your Node.js and pnpm versions.
  • For Cloudflare-specific issues, refer to the Wrangler documentation.
  • For help, open a GitHub Issue