summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-10 00:15:26 -0800
committerFuwn <[email protected]>2026-02-10 00:15:26 -0800
commite74fe39ef58e77c3e7e25007a39cb25605753303 (patch)
tree4c477a98c663028916c3d4ec838938bacf50eb6e /apps
parentfeat: add vitest tests and GitHub Actions CI (diff)
downloadasa.news-e74fe39ef58e77c3e7e25007a39cb25605753303.tar.xz
asa.news-e74fe39ef58e77c3e7e25007a39cb25605753303.zip
docs: replace boilerplate README with project documentation
Document prerequisites, env vars, scripts, architecture, and project structure for the asa.news web app.
Diffstat (limited to 'apps')
-rw-r--r--apps/web/README.md81
1 files changed, 58 insertions, 23 deletions
diff --git a/apps/web/README.md b/apps/web/README.md
index e215bc4..15bddc2 100644
--- a/apps/web/README.md
+++ b/apps/web/README.md
@@ -1,36 +1,71 @@
-This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
+# asa.news web
-## Getting Started
+Next.js 16 frontend for the asa.news RSS reader.
-First, run the development server:
+## Prerequisites
-```bash
-npm run dev
-# or
-yarn dev
-# or
-pnpm dev
-# or
-bun dev
-```
+- Node.js 22+
+- pnpm 10+
+- A Supabase project with the schema applied (see `supabase/schema.sql`)
+- Stripe account (for billing features)
+- Go worker running (see `services/worker/`)
+
+## Environment Variables
+
+Copy `.env.example` to `.env.local` and fill in the values:
-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+| Variable | Description |
+|---|---|
+| `NEXT_PUBLIC_SUPABASE_URL` | Supabase project URL |
+| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Supabase anonymous/public key |
+| `SUPABASE_SERVICE_ROLE_KEY` | Supabase service role key (server-side only) |
+| `STRIPE_SECRET_KEY` | Stripe secret key |
+| `STRIPE_WEBHOOK_SECRET` | Stripe webhook signing secret |
+| `STRIPE_PRO_MONTHLY_PRICE_IDENTIFIER` | Stripe price ID for Pro monthly |
+| `STRIPE_PRO_YEARLY_PRICE_IDENTIFIER` | Stripe price ID for Pro yearly |
+| `STRIPE_DEVELOPER_MONTHLY_PRICE_IDENTIFIER` | Stripe price ID for Developer monthly |
+| `STRIPE_DEVELOPER_YEARLY_PRICE_IDENTIFIER` | Stripe price ID for Developer yearly |
-You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
+## Development
-This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
+```bash
+pnpm install
+pnpm dev
+```
-## Learn More
+The app runs on `http://localhost:3000`. The Go worker (`services/worker/`) must be running separately for feed fetching.
-To learn more about Next.js, take a look at the following resources:
+## Scripts
-- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
-- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
+| Command | Description |
+|---|---|
+| `pnpm dev` | Start development server |
+| `pnpm build` | Production build (uses webpack for service worker generation) |
+| `pnpm lint` | Run ESLint |
+| `pnpm test` | Run vitest unit tests |
-You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
+## Architecture
-## Deploy on Vercel
+- **Framework**: Next.js 16 (App Router) with React 19
+- **Styling**: Tailwind CSS 4
+- **State**: Zustand (client), TanStack Query (server)
+- **Auth**: Supabase Auth with cookie-based sessions
+- **Billing**: Stripe Checkout + Customer Portal
+- **PWA**: Serwist service worker with offline support
+- **Deployment**: Vercel
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
+## Project Structure
-Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
+```
+app/
+ (auth)/ sign-in, sign-up, reset-password, forgot-password
+ (marketing)/ landing page
+ reader/ main reader UI (entry list, detail panel, settings)
+ shared/ public shared entry pages
+ api/ API routes (billing, webhooks, data export, v1 API)
+lib/
+ hooks/ custom React hooks
+ queries/ TanStack Query hooks
+ stores/ Zustand stores
+ supabase/ Supabase client factories
+```