README

PropEdge AI - Ultra-MVP · Tech stack, quick start, and deployment guide

Tech Stack

Framework: Next.js 16 (App Router)

Runtime: React 19

Language: TypeScript 5

Styling: Tailwind CSS v4

Auth & Database: Supabase

Payments: Stripe

AI: OpenAI-compatible API

Deploy: Vercel

Quick Start

npm install
cp .env.example .env.local
# Fill in Supabase, Stripe, AI keys
npm run dev

Then open http://localhost:3000

Packages

Core: next, react, react-dom, typescript

Forms: react-hook-form, @hookform/resolvers, zod

UI: @radix-ui/*, cva, clsx, tailwind-merge, lucide-react, flowbite-react, framer-motion, sonner

Supabase: @supabase/supabase-js, @supabase/ssr

Stripe: stripe

Other: zustand, recharts, react-modal-hook

Database Schema

See docs/README.md for full schema and migrations.

TableColumnsRLS
profilesid, email, first_name, last_name, birthday, is_premium, ai_insights_used_today, ai_insights_date, created_at, updated_atSELECT, INSERT, UPDATE own
user_modelsid, user_id, name, description, factors (JSONB), performance_score, is_active, created_at, updated_atALL own
stripe_customersuser_id, stripe_customer_idSELECT own
invoicesSynced from Stripe via webhook (invoice.paid)SELECT own

Migrations: 001_initial_schema.sql002_profiles_name_birthday.sql003006

Supabase & Stripe

Supabase

TopicDescription
Project overviewPropEdge uses Supabase for auth and PostgreSQL. See the video showcase below.
Authentication setupEmail/password signup and login. Email URL verification and OTP for confirmation.
Database tablesprofiles, user_models, stripe_customers, invoices. See docs/README.md for schema.
Table editorManage tables in Dashboard → Table Editor. Create and edit columns, indexes, constraints.
RLS policiesRow Level Security enforces per-user data access on all tables.
API & Edge functionsAuto-generated REST API and optional Edge Functions. PropEdge uses the JS client.
Stored proceduresPostgreSQL functions via RPC. Use for complex queries or server-side logic.
Auth usersUser management in Dashboard → Authentication → Users. OTP and email verification.
ProviderAuth providers in Dashboard → Authentication → Providers. Configure email, OAuth, sign-in methods.
SQL editorRun SQL in Dashboard → SQL Editor. Migrations and ad-hoc queries.
Database schemaSchema visualization. Tables, relationships, and RLS policies.
RealtimeLive subscriptions. Enable per-table in Database → Replication.
Project settingsAPI keys, URL, and config in Dashboard → Project Settings.

Showcase

Supabase project — frames from video:

Supabase project overview (full video)

Stripe

Webhook & Transaction

Stripe Webhooks

Stripe Webhooks

Webhook

  • Configure in Stripe Dashboard → Developers → Webhooks
  • Webhook destination — Add endpoint URL; Stripe sends events to this destination. Use Event Destinations or classic Webhooks.
    Stripe Webhook Destination

    Webhook destination

  • Endpoint: /api/stripe/webhook
  • Subscribe to:
    checkout.session.completed
    customer.subscription.created
    customer.subscription.updated
    customer.subscription.deleted
    invoice.paid
  • Set STRIPE_WEBHOOK_SECRET

Transaction

  • Balance and transaction history from Stripe customer balance
  • Add credit ($10+ min): /api/stripe/charge-balance
  • Purchase Premium with balance: /api/premium/purchase-with-balance

Note

Use Stripe test mode for development. Test credit card: 4242 4242 4242 4242. Use any future expiry date, any CVC, and any ZIP.

Webhook source

webhook/route.ts

Backend code

  • Checkout: /api/stripe/checkout
  • Customer Portal: /api/stripe/portal
  • Webhook updates profiles.is_premium and syncs invoice.paid to Supabase

Vercel Deploy

Vercel deployment

Vercel deployment

1. Connect GitHub repo to Vercel

2. Add env vars: Supabase, Stripe, AI keys

3. Set Stripe webhook to /api/stripe/webhook

4. Add /auth/callback to Supabase redirect URLs

Features

First page

PropEdge first page

Landing

Dashboard

Props table (NBA, NFL, MLB, NHL, WNBA, LoL, CS2, Valorant); prop detail modal with AI insight; pick builder

PropEdge dashboard 1

Dashboard 1

Model builder

7 weighted factors, backtesting, set active model

PropEdge model 1

Model 1

Plan

Free (1 model, 5 AI/day) vs Premium (10 models, unlimited AI)

PropEdge plan

Plan

Profile

Edit name, birthday; change password; delete account

PropEdge profile

Profile

Balance & charge

Add credit ($10+ min), purchase Premium with balance

PropEdge charge

Add balance