Skip to content

Trivia More is a quiz app designed to help you prepare for university exams. Test your knowledge with multiple-choice questions, track your time, and get instant feedback to improve your performance.

License

Notifications You must be signed in to change notification settings

MarinCervinschi/TriviaMore

Repository files navigation

Trivia MORE πŸŽ“πŸ§ 

GitHub license GitHub stars GitHub forks GitHub issues

Prepare. Practice. Succeed.

Trivia MORE is a comprehensive quiz application designed to enhance learning and prepare students for university exams through structured practice and assessment.

🌐 Live Demo

Visit the application at trivia-more.it

πŸ“– About

Trivia MORE transforms the way students prepare for university exams by providing an interactive, structured learning environment. Built with modern web technologies, it offers a comprehensive quiz platform that adapts to different learning styles and academic needs.

The application serves as a bridge between traditional study methods and digital learning, offering features like real-time progress tracking, adaptive questioning, and collaborative learning tools. Whether you're a student looking to test your knowledge, an educator wanting to create engaging content, or an administrator managing academic programs, Trivia MORE provides the tools you need to succeed.

πŸ“‹ Table of Contents

πŸ—οΈ Architecture Overview

Trivia MORE is built with a modern, scalable architecture designed for performance and maintainability:

graph TD
    A[πŸ–₯️ Frontend - Next.js 15] --> B[πŸ”Œ API Routes]
    B --> C[πŸ” NextAuth.js v5]
    B --> D[πŸ—ƒοΈ Prisma ORM]
    D --> E[🐘 PostgreSQL]

    F[πŸš€ Vercel Edge] --> A
    G[🌐 Neon Database] --> E

    H[πŸ“± Client Components] --> A
    I[⚑ Server Components] --> A

    J[🎯 TanStack Query] --> B
    K[🎨 Radix UI + Tailwind] --> A
Loading

For detailed architecture documentation, see docs/ARCHITECTURE.md

πŸ› οΈ Tech Stack

Our technology choices are specifically selected to support the architecture above:

Frontend Layer

Next.js - App Router for server-side rendering and optimal performance
React - Server & Client Components for hybrid rendering
TypeScript - Type safety across the entire application
Tailwind CSS - Utility-first styling for rapid development
Radix UI - Accessible components foundation
Framer Motion - Smooth animations and transitions
TanStack Query - Server state management and caching

Backend Layer

Next.js API - API Routes with file-based routing
NextAuth.js - Authentication with hybrid edge approach
Prisma - Type-safe ORM with migration support
PostgreSQL - Robust database with full ACID compliance
Zod - Runtime validation and type inference

Infrastructure & DevOps

Vercel - Edge deployment with global CDN
Docker - Local development environment
ESLint - Code quality and consistency
Prettier - Code formatting standards

πŸš€ Getting Started

Prerequisites

  • Docker and Docker Compose (recommended for local development)
  • Node.js (18+ recommended)

Environment Setup

  1. Clone the repository

    git clone https://github.com/MarinCervinschi/TriviaMore.git
    cd TriviaMore
  2. Configure environment variables

    Copy the example environment file and configure it:

    cp .env.example .env

    Edit the .env file with your specific configuration. The default database URL for local Docker development is already set up.

  3. Install dependencies

    npm install

Local Development with Docker

The easiest way to run the application locally is using Docker for the database:

  1. Start the PostgreSQL database

    docker-compose up -d postgres
  2. Set up the database

    # Generate Prisma client and push schema to database
    npm run db:push
    
    # Seed the database with sample data
    npm run db:seed
  3. Start the development server

    npm run dev
  4. Open the application

    Navigate to http://localhost:3000 in your browser.

🐳 Docker Commands

# Start the database
docker-compose up -d postgres

# Stop the database
docker-compose down

# View database logs
docker-compose logs postgres

# Access PostgreSQL shell
docker-compose exec postgres psql -U postgres -d triviamore

# Restart the database
docker-compose restart postgres

πŸ—„οΈ Database Management

Prisma Commands

# Generate Prisma client
npx prisma generate

# Push schema changes to database (development)
npx prisma db push

# Create and apply migrations (production)
npx prisma migrate dev --name "migration_name"

# Apply pending migrations
npx prisma migrate deploy

# Reset database and apply all migrations
npx prisma migrate reset

# Open Prisma Studio
npx prisma studio

# Check migration status
npx prisma migrate status

πŸ“š Documentation

🀝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests and linting
    npm run lint
    npm run format:check
  5. Commit your changes
    git commit -m 'Add some amazing feature'
  6. Push to the branch
    git push origin feature/amazing-feature
  7. Open a Pull Request

Development Guidelines

  • Follow the existing code style and patterns
  • Write meaningful commit messages
  • Test your changes thoroughly
  • Update documentation when necessary
  • Ensure all linting and formatting checks pass

πŸ› Issue Reporting

Found a bug or have a feature request? Please use our issue templates:

When reporting issues, please include:

  • Clear description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots (if applicable)
  • Environment details (browser, OS, etc.)

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Marin Cervinschi - @MarinCervinschi


⭐ If you find this project helpful, please consider giving it a star!

About

Trivia More is a quiz app designed to help you prepare for university exams. Test your knowledge with multiple-choice questions, track your time, and get instant feedback to improve your performance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published