# BransonMO.org Tech Stack ## Current prototype - Static HTML, CSS, and vanilla JavaScript for fast local iteration. - Data-first directory model in `data/businesses.js`. - Local JSON-backed backend API in `server.mjs`. - Persistent operational state in `data/platform-state.json`. - Static generator in `scripts/generate-pages.mjs` for category, business, guide, and trust pages. - Speed and SEO budget audit in `scripts/audit-site.mjs`. - Zero package dependencies, so the site can run anywhere with Node. - Local server in `server.mjs`. - SEO basics: canonical URL, meta description, robots file, sitemap, WebSite schema, and dynamic ItemList schema. ## Current backend routes - `GET /api/health`: verifies the local backend is running. - `GET /api/platform`: returns pipeline counts and recent activity for the business portal. - `POST /api/claims`: captures business owner claim requests. - `POST /api/profile-updates`: captures profile, hours, service area, offer, FAQ, and photo URL updates. - `POST /api/referrals`: captures consumer referral requests and creates estimated revenue events. - `POST /api/referral-partners`: captures paid referral partner applications and payout-term acceptance. - `POST /api/sponsorships`: captures sponsorship plan interest and budget. ## Quality gates - `npm run build`: regenerates crawlable SEO pages and `sitemap.xml`. - `npm run audit`: enforces lightweight speed and SEO budgets. - `npm run check`: runs generation, scaffold validation, and the audit. ## Recommended production stack - Next.js App Router for static generation, server-rendered listing pages, and API routes. - Supabase Postgres for businesses, categories, owners, claims, reviews, events, deals, and referral requests. - Supabase Auth or Clerk for business owner accounts. - Vercel hosting with ISR for category and business pages. - Stripe for listing subscriptions, sponsorship packages, and invoice-backed plans. - Resend or Postmark for referral notifications and claim workflows. - Plausible, Fathom, or PostHog for privacy-aware analytics. - Google Search Console and Bing Webmaster Tools for index monitoring. ## Data model direction - `businesses`: core NAP, category, geo, service area, verification status, ownership status. - `business_profiles`: descriptions, photos, FAQs, amenities, audience tags, sponsor fields. - `categories`: parent category, slug, SEO copy, schema type, monetization priority. - `guides`: editorial content connected to categories and listings. - `claims`: owner submissions, verification notes, status, admin assignment. - `referrals`: consumer request, category, urgency, matched businesses, outcome, commission state. - `referral_partners`: signed partner terms, category, territory, success fee, lead fee, payout status. - `revenue_events`: source referral, expected value, billing trigger, invoice status, paid date. - `events`: calendar entries, host business, recurring schedule, ticket URL. - `offers`: coupons, seasonal deals, sponsor-exclusive promotions. ## SEO requirements - Every real business needs a crawlable URL and unique page title. - Use the most specific LocalBusiness schema subtype available. - Keep NAP data crawlable in visible HTML. - Add FAQ schema only when the page visibly contains the same questions and answers. - Avoid fake reviews, fake ratings, or unverified business details. - Build category pages around real search intent, not keyword stuffing. ## Near-term migration path 1. Keep this prototype as the design and product baseline. 2. Convert static sections into Next.js components. 3. Move `data/businesses.js` into seeded database rows. 4. Generate `/business/[slug]`, `/categories/[slug]`, and `/guides/[slug]` pages. 5. Add claim and referral forms as server-backed workflows. 6. Add sponsor dashboards and analytics after the directory has real supply. 7. Replace JSON persistence with Postgres tables and row-level permissions. 8. Add signed agreements, Stripe invoices, call tracking, and CRM handoff for referral revenue.