QuizMaster is a web application that allows users to take quizzes, track their progress, and compete with others.
- Node.js 18+ and npm
- Supabase account (for database)
- Clone the repository
- Install dependencies:
npm install- Create a
.env.localfile with your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
- Start the development server:
npm run devThe application uses Supabase (PostgreSQL) as its database.
These commands use the official Supabase CLI and tools for best results:
-
Setup Supabase CLI: Install and configure the Supabase CLI
npm run supabase:setup
-
Generate TypeScript Types: Create types directly from your schema
npm run supabase:types
-
Generate API Documentation: Create API usage documentation
npm run supabase:docs
-
Check Schema Changes: See what's changed in your database
npm run supabase:diff
-
Start Local Supabase: Run Supabase locally for development
npm run supabase:start
The Supabase Dashboard provides important tools for database management:
-
Table Editor: Visual interface to create and edit tables
- Access at: Supabase Dashboard > Table Editor
-
API Documentation: Auto-generated API docs for your tables
- Access at: Supabase Dashboard > API Docs
-
SQL Editor: Run custom SQL queries
- Access at: Supabase Dashboard > SQL Editor
-
Auth Management: Configure authentication
- Access at: Supabase Dashboard > Authentication
These are our custom tools that were created before using the official tools:
-
Test Database Access: Check if your app can access all columns in all tables
npm run test:db
-
Validate Database Schema: Verify that your database tables are accessible
npm run validate:db
-
Generate Database Documentation: Create documentation files based on the current database schema
npm run generate:db-docs
docs/supabase-api.md- Auto-generated API documentation from Supabaselib/database.types.ts- Auto-generated TypeScript types from Supabase schema
Run the full test suite with:
npm testOr run specific tests:
# Run database access tests
npm run test:db
# Run tests in watch mode
npm run test:watchTo build the application for production:
npm run buildThen start the production server:
npm start- User authentication and profile management
- Browse and take quizzes
- View quiz results and statistics
- Track progress over time
- Admin tools for quiz management
This project is licensed under the MIT License.