GitHub

Quick Start Guide

Setting up Diskus for local development, testing, or contributing is incredibly fast thanks to our reliance on the Bun runtime.

Prerequisites

Before you begin, ensure you have the following installed on your machine:

  • Bun (v1.0.0 or higher) - Required for running the backend and installing monorepo dependencies.
  • Node.js (v18+ recommended) - Sometimes required as a fallback for specific frontend build tools.
  • Git - For cloning the repository.

Installation Steps

1. Clone the Repository

Start by cloning the Diskus repository to your local machine and navigating into the project directory:

git clone https://github.com/fadhilbarkah/diskus.git
cd diskus

2. Install Dependencies

Diskus utilizes Bun’s incredibly fast package manager to handle workspaces. Run the following command from the root directory to install dependencies for the backend, dashboard, and widget simultaneously:

bun install

3. Configure Environment Variables

You need to set up environment variables for the different packages. We provide .env.example files to make this easy.

Copy .env.example to .env in all three workspace directories:

cp backend/.env.example backend/.env
cp dashboard/.env.example dashboard/.env
cp widget/.env.example widget/.env

Key configurations:

  • Backend (backend/.env): You must set a secure JWT_SECRET. You can also configure DASHBOARD_ORIGIN (to handle CORS restrictions) and DATABASE_PATH (to specify where the SQLite file is stored).
  • Dashboard & Widget (dashboard/.env & widget/.env): Ensure VITE_API_URL correctly points to your backend instance (default is http://localhost:3000/api/v1).

4. Initialize the Database

Diskus uses Drizzle ORM to manage SQLite schemas. Navigate to the backend directory to push the schema to your local database file:

cd backend
bun run db:push

(Optional) You can populate the database with test data to immediately see how the dashboard looks:

bun run src/db/seed.ts

5. Start the Development Server

Navigate back to the project root and start the concurrent development server. This single command will boot up the Hono backend, the Dashboard Vite server, and the Widget bundler simultaneously:

cd ..
bun dev

First-Time Setup Note: If you did not run the seed script, open the Dashboard (http://localhost:5173) in your browser. You will automatically be prompted to create your initial Admin account. No manual database seeding is required!