Skip to content

amrith-r-naik/quiz-website

Repository files navigation

Practice MCQs Website

🌟 This GitHub repository contains a project designed for practicing MCQs related to our subjects in a quiz format. It provides an engaging alternative to studying from question bank PDFs. As the admin, I will upload quizzes for practice, and you can use this platform to enhance your learning experience.

Overview 💡

This is a Next.js 15 project built with TypeScript. It leverages the following technologies:

  • Prisma ORM for database management.
  • Tailwind CSS and Shadcn UI for the frontend.
  • Docker to set up a local database for development.

💡 Follow these steps to set up the project locally:

1. Prerequisites 🔧

Ensure you have the following installed:

  • pnpm package manager. If you already have Node.js installed, install pnpm globally:
    npm install -g pnpm
  • Docker: Used to create and manage the local PostgreSQL database.

2. Fork and Clone the Repository 🔼

  1. Fork this repository to your GitHub account.
  2. Clone your forked repository:
    git clone <your-fork-url>
  3. Navigate into the project directory:
    cd <project-directory>

3. Install Dependencies 📝

Install all the required dependencies using pnpm:

pnpm install

4. Set Up the Local Database 🏛️

Make sure Docker is running (e.g., open Docker Desktop on Windows) and execute:

pnpm start-db

This will create and run a PostgreSQL container with the necessary configuration.

5. Configure the Environment Variables 🔒

Create a .env file in the root of the project and add the following:

DATABASE_URL="postgresql://dev_user:dev_password@localhost:5432/quiz_db"

Make sure the credentials match those defined in the docker-compose.yaml file.

6. Migrate the Prisma Schema 🔄

Initialize the database schema by running the Prisma migration:

pnpx prisma migrate dev

This sets up the database tables as defined in the Prisma schema.

7. Run the Development Server 🚀

Start the development server:

pnpm dev

Open http://localhost:3000 in your browser to view the application.

Learn More 📖

Explore the following resources to learn more about the technologies used in this project:

Deployment 🌐

The website is deployed on Vercel. You can visit it here: https://those-mcq-subjects.vercel.app.


Feel free to contribute by opening issues or submitting pull requests to improve the project! 🙌

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published