How akhan280/radar-rules-frontend works
Project type and purpose
• This is a full-stack Next.js (v13+) web application that lets users sign up/log in, create projects, upload CSVs, define “rules,” train models, and pay via Stripe. It uses React on the frontend, Next.js API routes for backend logic, Redux slices for client state, Prisma (with Supabase Postgres) for persistence, and Supabase for auth/session management.
File structure
• Top-level “app” directory follows Next.js App Router conventions:
• app/page.tsx – public landing page
• app/auth/* – sign-up, login, email-check, callback flows
• app/checkout, app/dashboard/* – private pages behind auth
• app/api/stripe/* – API handlers for creating Stripe checkout sessions and webhook endpoints
• “components” holds shared UI elements (and a nested “ui” folder for primitives)
• “lib” contains:
• db.ts / prisma.ts – Prisma client setup
• supabase-*.ts – Supabase client, server helpers & middleware
• actions/*.ts – business-logic functions called from pages & API routes
• store/*.ts – Redux toolkit slices and store
• Configuration: next.config.ts, middleware.ts (for Supabase session gating), Tailwind, ESLint, TypeScript, etc.