Skip to content

ulysses-ck/questions-answers

Repository files navigation

Questions & Answers

A quiz application built with Next.js that allows users to create and answer questions.

Tech Stack

Features

  • 📝 Create and manage quizzes
  • 🤖 AI-powered question generation using Google's Gemini
  • 🎯 Intelligent question suggestions based on topics
  • 💾 Persistent storage with PostgreSQL
  • 📱 Responsive design
  • ⚡ Fast page loads with Next.js
  • 🎨 Modern UI with Tailwind CSS and HeroUI
  • 🎬 Smooth animations with Framer Motion
  • 📝 Type-safe development with TypeScript and Zod

Getting Started

  1. Clone the repository:
git clone <your-repo-url>
cd questions-answers
  1. Install dependencies:
npm install
  1. Set up your environment variables:
cp .env.example .env

Fill in your PostgreSQL database connection details and other required variables.

  1. Seed the database with sample data:
npm run seed
  1. Run the development server:
npm run dev

Open http://localhost:3000 with your browser to see the result.

Project Structure

src/
├── app/              # Next.js app directory
├── components/       # React components
├── db/              # Database schema and configurations
└── lib/             # Utility functions and configurations

Available Scripts

  • npm run dev - Start development server
  • npm run build - Create production build
  • npm run start - Start production server
  • npm run lint - Run ESLint for code linting
  • npm run dbml - Generate DBML documentation
  • npm run seed - Populate database with sample quiz questions

Database Management

This project uses PostgreSQL with Drizzle ORM for database management. The schema can be visualized using the DBML generator tool.

Sample Data

Running npm run seed will populate your database with:

  • 10 quiz questions across various categories (capitals, companies, historical events)
  • Each question includes 1 correct answer and 2 wrong answers
  • Answers are randomly shuffled for each question

Deployment

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out the Next.js deployment documentation for more details.

Contributing

We welcome contributions! Please see our Contributing Guide for details on how to:

License

This project is open source and available under the MIT License.

About

A quiz application built with Next.js that allows users to create and answer questions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages