Skip to content

OvercomeMH/nextjs-quizzes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuizMaster Application

QuizMaster is a web application that allows users to take quizzes, track their progress, and compete with others.

Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Supabase account (for database)

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Create a .env.local file with your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
  1. Start the development server:
npm run dev

Database

The application uses Supabase (PostgreSQL) as its database.

Official Supabase Tools

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

Supabase Dashboard Tools

The Supabase Dashboard provides important tools for database management:

  1. Table Editor: Visual interface to create and edit tables

  2. API Documentation: Auto-generated API docs for your tables

  3. SQL Editor: Run custom SQL queries

  4. Auth Management: Configure authentication

Legacy Custom Tools (Deprecated)

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

Documentation Files

  • docs/supabase-api.md - Auto-generated API documentation from Supabase
  • lib/database.types.ts - Auto-generated TypeScript types from Supabase schema

Testing

Run the full test suite with:

npm test

Or run specific tests:

# Run database access tests
npm run test:db

# Run tests in watch mode
npm run test:watch

Building for Production

To build the application for production:

npm run build

Then start the production server:

npm start

Features

  • User authentication and profile management
  • Browse and take quizzes
  • View quiz results and statistics
  • Track progress over time
  • Admin tools for quiz management

License

This project is licensed under the MIT License.

About

Like the other one, but nextjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors