A modern, fullstack talent assessment platform built with Next.js 14, TypeScript, Tailwind CSS, and Supabase.
- Modern Tech Stack: Next.js 14 with App Router, TypeScript, Tailwind CSS
- Authentication: Supabase Auth with email/password and OAuth providers
- Database: PostgreSQL via Supabase with real-time subscriptions
- Deployment: Optimized for Vercel deployment
- UI Components: Custom component library with shadcn/ui
- Type Safety: Full TypeScript coverage with database types
- Frontend: Next.js 14, React 18, TypeScript
- Styling: Tailwind CSS, CSS Modules
- Backend: Supabase (PostgreSQL, Auth, Storage)
- Deployment: Vercel
- Package Manager: npm
- Node.js 18+
- npm or yarn
- Supabase account
- Vercel account (for deployment)
git clone git@github.com:Cyberworld-builders/involved-v2.git
cd involved-v2npm installOption A: Local Development (Recommended)
The project includes a pre-configured .env.local for local Supabase:
# Local Supabase is already configured!
# Just make sure it's running:
npx supabase start
npm run devOption B: Staging Supabase
- Create a staging project at supabase.com
- Get your project URL and anon key from the project settings
- Update
.env.stagingwith your credentials, then switch to it:
# Edit .env.staging with your staging credentials
./switch-env.sh staging
# or manually: cp .env.staging .env.localEnvironment Files:
.env.local- Active config (local by default).env.staging- Template for staging Supabase.env.production- Production config (coming after staging validation).env.example- Example/template for reference
See ENV_SETUP.md for detailed environment configuration.
Manual .env.local setup
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME="Involved Talent"Run the following SQL in your Supabase SQL editor to create the initial tables:
-- Create profiles table
CREATE TABLE profiles (
id UUID REFERENCES auth.users(id) PRIMARY KEY,
email TEXT UNIQUE NOT NULL,
first_name TEXT,
last_name TEXT,
role TEXT DEFAULT 'user' CHECK (role IN ('admin', 'client', 'user')),
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Create assessments table
CREATE TABLE assessments (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
title TEXT NOT NULL,
description TEXT,
type TEXT NOT NULL CHECK (type IN ('360', 'blockers', 'leader', 'custom')),
status TEXT DEFAULT 'draft' CHECK (status IN ('draft', 'active', 'completed', 'archived')),
created_by UUID REFERENCES profiles(id) NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Create questions table
CREATE TABLE questions (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
assessment_id UUID REFERENCES assessments(id) ON DELETE CASCADE NOT NULL,
text TEXT NOT NULL,
type TEXT NOT NULL CHECK (type IN ('multiple_choice', 'rating', 'text', 'boolean')),
"order" INTEGER NOT NULL,
required BOOLEAN DEFAULT true,
options JSONB,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Enable Row Level Security
ALTER TABLE profiles ENABLE ROW LEVEL SECURITY;
ALTER TABLE assessments ENABLE ROW LEVEL SECURITY;
ALTER TABLE questions ENABLE ROW LEVEL SECURITY;
-- Create policies
CREATE POLICY "Users can view own profile" ON profiles FOR SELECT USING (auth.uid() = id);
CREATE POLICY "Users can update own profile" ON profiles FOR UPDATE USING (auth.uid() = id);
CREATE POLICY "Users can view assessments they created" ON assessments FOR SELECT USING (auth.uid() = created_by);
CREATE POLICY "Users can create assessments" ON assessments FOR INSERT WITH CHECK (auth.uid() = created_by);
CREATE POLICY "Users can update their assessments" ON assessments FOR UPDATE USING (auth.uid() = created_by);
CREATE POLICY "Users can view questions for their assessments" ON questions FOR SELECT USING (
EXISTS (
SELECT 1 FROM assessments
WHERE assessments.id = questions.assessment_id
AND assessments.created_by = auth.uid()
)
);npm run devOpen http://localhost:3000 to see the application.
src/
βββ app/ # Next.js App Router pages
β βββ api/ # API routes
β βββ auth/ # Authentication pages
β βββ dashboard/ # Dashboard pages
β βββ ...
βββ components/ # Reusable UI components
β βββ ui/ # Base UI components
βββ lib/ # Utility libraries
β βββ supabase/ # Supabase client configuration
β βββ utils.ts # Utility functions
βββ types/ # TypeScript type definitions
βββ hooks/ # Custom React hooks
- Push your code to GitHub
- Connect your repository to Vercel
- Add your environment variables in Vercel dashboard
- Deploy!
The app will be automatically deployed on every push to the main branch.
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm test- Run unit and integration testsnpm run test:watch- Run tests in watch modenpm run test:coverage- Generate test coverage reportnpm run test:e2e- Run end-to-end tests
- Use TypeScript for all new files
- Follow the existing component patterns
- Use Tailwind CSS for styling
- Write meaningful commit messages
This project uses a comprehensive testing setup:
- Vitest: Unit and integration tests
- Playwright: End-to-end (E2E) tests
- React Testing Library: Component tests
# Run all unit/integration tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverage
# Run E2E tests
npm run test:e2eFor detailed testing guidelines and best practices, see docs/TESTING.md.
For the complete test plan, see docs/PHASE_1_TEST_PLAN.md.
This project is proprietary software owned by Cyberworld Builders.
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For support, email support@cyberworldbuilders.com