daw.club — Gitea Frontend
Custom React frontend for browsing and managing Songbird projects hosted on the Gitea instance at git.daw.club. Live: https://daw.club (Cloudflare Pages) API backend: https://git.daw.club (Gitea 1.22.6 on GCE)Stack
- Vite + React 19 + TypeScript
- Tailwind CSS v4 with
@tailwindcss/viteplugin - Design tokens: Zinc (dark) + Emerald (accent) palette, Inter font — matches Songbird’s design system
- shadcn/ui-style components (Button, Card, Input) using
class-variance-authority - Lucide React for icons
- React Router v7 for client-side routing
Pages
| Route | Page | Description |
|---|---|---|
/ | Explore | Search and browse projects in a card grid |
/login | Login | Token-based auth against Gitea API |
/register | Register | Redirects to Gitea’s native sign-up page |
/:owner/:name | Repo Detail | File browser, edit name/description, clone URL, ZIP download |
/:owner | User Profile | List of a user’s repositories |
Quick Start
http://localhost:5173. By default it talks to https://git.daw.club.
Environment Variables
Copy.env.example to .env to configure:
Build
dist/ (~285 KB JS, ~90 KB gzipped).
Deploy to Cloudflare Pages
The frontend is deployed as a static site on Cloudflare Pages.Prerequisites
- Wrangler CLI:
npm install -g wrangler - Cloudflare API token with Cloudflare Pages: Edit + Zone DNS: Edit permissions
- Set environment variables:
Deploy
- Custom domain: https://daw.club
- Pages.dev fallback: https://daw-club.pages.dev
First-time setup (already done)
If setting up from scratch:API Layer
The API client lives insrc/lib/api.ts. It wraps the Gitea REST API and handles:
- Auth: Token creation via HTTP Basic Auth (
POST /users/:username/tokens), stored inlocalStorage - Repos: Search, get, update, delete
- Contents: File/directory listing, archive download (fetch-based, no token in URL)
- Users: Get user profile, list user repos
Auth flow
- User enters username/password on
/login - Frontend creates an API token via Gitea’s basic auth endpoint
- Token stored in
localStorageasgitea_token - All subsequent API calls include
Authorization: token <sha1>header - Registration redirects to Gitea’s native sign-up page at
git.daw.club/user/sign_up
CORS
Gitea must have CORS enabled in/etc/gitea/app.ini on the server:
Project Structure
Design Notes
- Dark theme: Uses
color-scheme: darkon:rootplus!importantonhtml/body/#rootbackground to override Tailwind v4’s base layer cascade. Inlinestyleon<body>inindex.htmlas an additional fallback. - Inter font: Loaded from Google Fonts CDN. Falls back to
system-uiif unavailable. - Auth state: Lives in module-level variables +
localStorage, not React state. UI reactivity depends on navigation re-renders after login/logout. - No automated tests: All behavior is verified via manual E2E testing against the live Gitea instance.