# asa.news web Next.js 16 frontend for the asa.news RSS reader. ## Prerequisites - 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: | 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 | ## Development ```bash pnpm install pnpm dev ``` The app runs on `http://localhost:3000`. The Go worker (`services/worker/`) must be running separately for feed fetching. ## Scripts | 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 | ## Architecture - **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 ## Project Structure ``` 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 ```