@@ -10,44 +10,35 @@ moq.dev is a web blog and demo for Media over QUIC (MoQ) protocol. It's built wi
1010
1111``` bash
1212# Development
13- npm run dev # Start dev server with auto-open and HTTPS
13+ just dev # Start dev server with auto-open
1414
15- # Build & Production
16- npm run build # Production build
17- npm run prod # Build and preview production
15+ # Build & Deploy
16+ just build # Production build
17+ just deploy # Deploy to Cloudflare Pages (staging by default)
18+ just deploy live # Deploy to production
19+ just prod # Build and preview production locally
1820
1921# Code Quality
20- npm run check # Run Biome linting and TypeScript checking
21- npm run fix # Auto-fix code issues and audit dependencies
22+ just check # Run Biome linting and TypeScript checking
23+ just fix # Auto-fix code formatting/lint issues
2224```
2325
2426## Architecture Overview
2527
2628### Technology Stack
27- - ** Framework** : Astro with SSR via Node.js adapter
29+ - ** Framework** : Astro (static output)
2830- ** UI Components** : Solid.js for interactive elements
2931- ** Styling** : Tailwind CSS
30- - ** Build** : Vite with WASM and mkcert plugins
32+ - ** Build** : Vite
3133- ** Code Quality** : Biome for linting/formatting
3234- ** Package Manager** : bun v1.3.4
35+ - ** Task Runner** : just
3336
3437### Key Components
3538
36- 1 . ** MoQ Client Implementation** (` @kixelated/hang ` package):
37- - Custom web components: ` <hang-publish> ` , ` <hang-watch> ` , ` <hang-support> `
38- - WebTransport protocol for relay connections
39- - Publishing: ` src/components/publish.tsx ` - Creates broadcasts with random names
40- - Watching: ` src/components/watch.tsx ` - Connects to broadcasts by name
41-
42- 2 . ** Routing Structure** :
43- - ` /publish ` - Create new broadcasts
44- - ` /watch/{name} ` - View specific broadcast
45- - ` /blog/ ` - MDX-based blog posts
46- - Dynamic routes use ` export const prerender = false ` for SSR
47-
48- 3 . ** Environment Configuration** :
49- - ` PUBLIC_RELAY_URL ` - WebTransport URL
50- - Separate ` .env ` files for dev/production
39+ ** MoQ Client Implementation** (` @moq/publish ` + ` @moq/watch ` packages):
40+ - Custom web components: ` <moq-publish> ` , ` <moq-watch> `
41+ - UI wrapper components: ` <moq-publish-ui> ` , ` <moq-watch-ui> `
5142
5243### Important Patterns
5344
@@ -59,14 +50,12 @@ npm run fix # Auto-fix code issues and audit dependencies
5950
6051### Deployment
6152
62- - Docker multi-stage builds
63- - Terraform infrastructure in ` /infra/ `
64- - Production entry: ` dist/server/entry.mjs `
53+ - Cloudflare Pages via Wrangler
54+ - ` just deploy ` for staging, ` just deploy live ` for production
6555
6656## Development Tips
6757
68- - WebTransport requires HTTPS even in development (handled by vite-plugin-mkcert)
6958- Broadcasts are ephemeral - no persistence layer
70- - The ` @kixelated/hang ` package handles all MoQ protocol implementation
59+ - The ` @moq/publish ` and ` @moq/watch ` packages handle all MoQ protocol implementation
7160- For new blog posts, add MDX files to ` src/pages/blog/ `
7261- Component changes in ` src/components/ ` automatically reload with HMR
0 commit comments