No description https://miko.ducky.us.kg/
  • JavaScript 50%
  • CSS 28%
  • TypeScript 21.8%
  • HTML 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
The Ducktor 06b9bcda5f k
2026-02-23 08:46:54 +08:00
packages k 2026-02-23 08:46:54 +08:00
.DS_Store k 2026-02-23 08:46:54 +08:00
.gitignore Convert to Bun monorepo and update README 2026-02-22 19:18:40 +08:00
bun.lock k 2026-02-22 13:59:34 +08:00
config.json k 2026-02-22 09:53:25 +08:00
LICENSE k 2026-02-22 09:53:25 +08:00
package.json Update package.json 2026-02-22 19:38:31 +08:00
README.md k 2026-02-22 19:34:22 +08:00

Cubari.moe

An image proxy and reader application, now modernized as a Bun monorepo.

Structure

This project is a monorepo managed by Bun workspaces.

  • packages/web: Frontend application (React + Vite).
  • packages/api: Backend API (Hono + Bun).
  • packages/shared: Shared TypeScript types and utilities.

Prerequisites

  • Bun (latest version)

getting Started

  1. Install dependencies:

    bun install
    
  2. Start the development servers:

    This command runs both the API and Web frontend concurrently.

    bun run dev
    

Deployment

Frontend (Cloudflare Pages)

  1. Connect your repository to Cloudflare Pages.
  2. Configure the build settings:
    • Framework Preset: Vite / Create React App (or None)
    • Root Directory: / (the project root, not packages/web)
    • Build Command: bun run build
    • Output Directory: packages/web/dist
  3. Environment Variables:
    • Set VITE_API_URL to your production API URL (e.g., https://api.yourdomain.com).

Backend (Self-Hosted)

The API is a standalone Bun application using Hono.

Option 1: Manual / PM2

  1. Clone the repo on your server.
  2. Install dependencies: bun install
  3. Start the API:
    cd packages/api
    bun run start
    
  4. Use a process manager like PM2 to keep it running:
    pm2 start "bun run start" --name cubari-api
    
  5. Expose the port 3001 securely (e.g., via Nginx reverse proxy or Cloudflare Tunnel).

Option 2: Docker

A Dockerfile can be created to bundle the API. Ensure you mount a volume for packages/api/cache.sqlite to persist data.