This guide walks you through running SpinAI on your local machine from a clean clone to a fully working app. By the end you will have the Next.js dev server running, your Supabase database seeded with the correct schema, and the roulette ready to assign your first facilitator.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fmoraga01/SpinAI/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you start, make sure you have the following:- Node.js 18 or later — SpinAI uses Next.js 16 and React 19, which require Node 18+.
- A Supabase account — Create a free project at supabase.com. You will need the project URL and the anon/public key.
- A Gmail account with an App Password — SpinAI sends email via Gmail SMTP. You must generate an App Password in your Google Account security settings; your regular Gmail password will not work.
Setup Steps
Install dependencies
Install all Node.js dependencies with npm.This installs Next.js 16,
@supabase/supabase-js, nodemailer, jose for JWT handling, and the rest of the packages listed in package.json.Create your Supabase project and run migrations
In your Supabase dashboard, create a new project, then run the initial migration to create all required tables (Alternatively, if you have the Supabase CLI installed, run:The migration enables the
members, assignments, templates, assignment_logs) along with their indexes and Row Level Security policies.Navigate to SQL Editor in your Supabase dashboard and paste the contents of the migration file:pgcrypto extension, creates all four tables with UUID primary keys, and applies anon full access RLS policies so the app can read and write using the public anon key. The members table includes an email column from the start, enabling per-member email notifications without any additional schema changes.Create your .env.local file
Create a
.env.local file in the root of the project and fill in all required variables. You can copy the block below as a starting template.Start the development server
Run the Next.js development server.Open http://localhost:3000 in your browser. You should see the SpinAI PIN gate.
Enter your PIN and spin the roulette
Enter the PIN you set in
PIN to authenticate. On successful entry, the app creates a signed JWT cookie (spinai_token) valid for 30 days and redirects you to the home page.From the home page, add your team members, then click Spin to let the roulette randomly assign a facilitator to an upcoming Friday. The assignment is saved immediately to Supabase and will appear on the calendar.