A modern anime streaming app with a Next.js frontend and a Hono API backend.
- Next.js 16 (App Router)
- React 19 + TypeScript
- Tailwind CSS + shadcn/ui
- Hono (Node adapter) API
- Bun runtime/package manager
- SQLite (default), Turso/libSQL, or Supabase/Postgres
src/- Next.js app, components, client/server actionsserver/- Hono API, DB, streaming modules, auth, admin endpointspublic/- static assetsrefs/- local references/supporting files
- Anime browsing/search, watch pages, streaming source extraction
- Authentication with JWT + DB-backed sessions
- MAL-style profile pages
- watch history
- currently watching
- stats (hours watched, completion rate, genres)
- pinned top favorites
- recent activity and friends sections
- Admin panel
- user management (sort/search/delete/delete-all)
- per-user settings screen
- media source management (add/remove)
- server health panel (uptime/memory/storage/active streams/users)
- Bun (required)
- Node-compatible environment for Next.js/Hono runtime
From repository root:
bun install
cd server && bun installFrom repository root:
bun run devThis starts:
- Frontend:
http://localhost:3000 - API:
http://localhost:4001
From repository root:
bun run build
bun run startThis repo now follows the same high-level deployment shape as refs/zenime:
- Root
Dockerfilefor Render deployment - Root
vercel.jsonfor Vercel deployment - One-click deploy buttons for both platforms
Render uses the repository-root Dockerfile, starts Next.js + Hono together, and exposes one public URL.
- Use these deployment buttons:
render.yaml is included at the repo root and points to the root Dockerfile.
- In Render, create a Blueprint service from this repository.
- Render will provision
anihostusing the config inrender.yaml. - Set required secret env vars in Render:
SUPABASE_DATABASE_URLJWT_SECRETORIGIN(optional CORS override)
- Deploy and open your app URL (example:
https://anihost.onrender.com).
API health check path: /ping
vercel.json is included and uses Bun + build:web.
- Import this repository in Vercel.
- Set project environment variable:
NEXT_PUBLIC_API_URL=https://<your-render-domain>/api/v1
- Deploy.
After Vercel gives you the production domain:
- Update Render
ORIGINto include your Vercel domain. - Redeploy Render once after updating
ORIGIN.
From repository root:
bun run lintBackend-only lint/test:
cd server
bun run lint
bun testNEXT_PUBLIC_API_URL=/api/v1
API_BASE_URL=http://127.0.0.1:4001/api/v1# Server
PORT=4001
INTERNAL_API_PORT=4001
ORIGIN=http://localhost:3000
# Auth
JWT_SECRET=change-me
AUTH_ACCESS_TOKEN_TTL_SECONDS=604800
AUTH_SESSION_TTL_SECONDS=604800
AUTH_MAX_SESSIONS_PER_USER=5
AUTH_MAX_SESSION_STORE_SIZE=10000
# Rate limiting
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_LIMIT=20
# DB provider (sqlite default)
DB_PROVIDER=sqlite
SQLITE_DB_PATH=server/sqlite.db
# Turso/libSQL (optional)
# DB_PROVIDER=turso
# TURSO_DATABASE_URL=libsql://<db>.turso.io
# TURSO_AUTH_TOKEN=<token>
# Supabase/Postgres (optional)
# DB_PROVIDER=supabase
# SUPABASE_DATABASE_URL=postgresql://postgres:<password>@<host>:5432/postgres
# DB_POOL_MAX=10
# POSTGRES_SSL_MODE=require
# Optional Redis cache
# UPSTASH_REDIS_REST_URL=
# UPSTASH_REDIS_REST_TOKEN=
# Optional proxy host allowlist
# PROXY_ALLOWED_HOSTS=example.com,cdn.example.com- SQLite is the default provider.
- API bootstrap creates required tables/indexes if missing.
DB_PROVIDER=tursois supported.DB_PROVIDER=supabaseis supported via direct Postgres connection string.
Run the app and open the API docs route exposed by Hono (configured in server/lib/configure-docs.js).
bun run dev- run frontend + API in parallelbun run build- Next.js build + server TypeScript checkbun run start- start frontend + API in production modebun run lint- run ESLint
bun run dev- Hono API in watch modebun run start- Hono API production modebun run lint- lint backendbun test- run backend tests
- Use Bun instead of npm/yarn/pnpm for dependency and script workflows.
- If streaming providers change upstream behavior, update source extractors under
server/modules/stream/.