No description
https://miko.ducky.us.kg/
- JavaScript 50%
- CSS 28%
- TypeScript 21.8%
- HTML 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| packages | ||
| .DS_Store | ||
| .gitignore | ||
| bun.lock | ||
| config.json | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
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
-
Install dependencies:
bun install -
Start the development servers:
This command runs both the API and Web frontend concurrently.
bun run dev- Web: http://localhost:5173
- API: http://localhost:3001
Deployment
Frontend (Cloudflare Pages)
- Connect your repository to Cloudflare Pages.
- 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
- Environment Variables:
- Set
VITE_API_URLto your production API URL (e.g.,https://api.yourdomain.com).
- Set
Backend (Self-Hosted)
The API is a standalone Bun application using Hono.
Option 1: Manual / PM2
- Clone the repo on your server.
- Install dependencies:
bun install - Start the API:
cd packages/api bun run start - Use a process manager like PM2 to keep it running:
pm2 start "bun run start" --name cubari-api - Expose the port
3001securely (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.