Skip to content

SahilSR81/MindMashV3

 
 

Repository files navigation

MindMash

MindMash is a modern, AI-powered quiz and learning platform built with Next.js, TypeScript, Firebase, and Gemini (Google Genkit). It features:

  • AI-Generated Quizzes: Daily and on-demand quizzes generated by Gemini AI, with random topics and difficulty.
  • Proctored Quiz Experience: Fullscreen, anti-cheating, webcam/motion detection, and offline support.
  • Community Stories & Queries: Share your learning stories, questions, or experiences. Like and comment on others' posts.
  • Persistent Likes & Comments: All interactions are stored in Firestore and update in real time.
  • Responsive Design: Fully mobile-first, works great on all devices.
  • Dark/Light Mode: Adaptive theming for accessibility and user preference.
  • PWA Support: Installable, offline-capable, and fast.
  • Firebase Integration: Auth, Firestore, and storage for all user and quiz data.

Table of Contents


Features

AI Quiz Generation

  • Uses Gemini (Google Genkit) to generate quizzes daily and on demand.
  • Random topic and difficulty for daily challenge.
  • Quizzes are stored in Firestore and accessible to all users.

Proctored Quizzes

  • Fullscreen mode with scroll lock on large screens.
  • Anti-cheating: tab switch, copy/paste, right-click, and screenshot detection.
  • Webcam/motion detection for proctored quizzes.
  • Offline answer storage and sync.

Community Stories & Queries

  • Share your learning stories or ask questions in a beautiful card UI.
  • Like and comment on stories; all data is persistent and real-time.
  • Responsive, accessible, and themed for both dark and light mode.

PWA & Mobile Support

  • Installable as a Progressive Web App.
  • Works offline for quiz-taking and answer storage.
  • Real-time online/offline status indicator.

Firebase Integration

  • Auth (email, Google, etc.)
  • Firestore for quizzes, stories, likes, comments, and reports.
  • Secure, scalable, and real-time.

Setup & Installation

1. Clone the Repository

git clone https://github.com/yourusername/MindMashV3.git
cd MindMashV3

2. Install Dependencies

npm install

3. Environment Variables

Create a .env.local file in the root with the following:

NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id
GENKIT_API_KEY=your_gemini_or_genkit_api_key
NEXT_PUBLIC_SITE_URL=https://your-vercel-url.vercel.app

4. Firebase Setup

  • Create a Firebase project.
  • Enable Firestore, Auth, and (optionally) Storage.
  • Set up indexes as prompted by Firestore errors (see console for links).

5. Gemini/Genkit Setup

  • Sign up for Google Genkit/Gemini and get your API key.
  • Configure the GENKIT_API_KEY in your .env.local.
  • See src/ai/genkit.ts and src/ai/flows/generate-quiz-questions.ts for integration details.

6. Run Locally

npm run dev

7. Build for Production

npm run build
npm start

Usage Guide

AI Quizzes

  • Visit the quiz page to take daily or on-demand quizzes.
  • Quizzes are generated by Gemini AI and stored in Firestore.
  • Proctored quizzes require fullscreen and webcam access.

Community Stories & Queries

  • Use the top card to share your story or ask a question.
  • Like and comment on others' stories.
  • All interactions are persistent and real-time.

PWA

  • Install the app on your device for offline access.
  • Quiz answers are stored and synced when online.

Accessibility

  • Toggle dark/light mode from the UI.
  • Text-to-speech available for quiz questions.

Development & Contribution

Code Structure

  • src/app/ — Main Next.js app routes and pages
  • src/components/ — Reusable UI and quiz components
  • src/ai/ — AI integration (Gemini/Genkit flows)
  • src/contexts/ — React context providers (auth, quiz, etc.)
  • src/hooks/ — Custom React hooks
  • src/lib/ — Utility functions and Firebase logic
  • public/ — Static assets and icons

Contributing

  1. Fork the repo and create a new branch.
  2. Make your changes with clear commit messages.
  3. Test thoroughly (including dark/light mode, mobile, and offline).
  4. Submit a pull request with a description of your changes.

Deployment

  • Vercel: Recommended for seamless Next.js deployment.
  • Set all environment variables in the Vercel dashboard.
  • Ensure Firebase indexes are created as needed.
  • PWA and offline support work out of the box.

Credits & Acknowledgements

  • Google Gemini/Genkit for AI quiz generation
  • Firebase for backend, auth, and real-time data
  • Next.js for the modern React framework
  • Tailwind CSS for rapid, responsive UI
  • Lucide Icons for beautiful iconography
  • Me(Sahil Singh) & Sk Shahil Akhtar
  • All contributors and testers!

About

Full-Stack AI Learning Platform built with Next.js, TypeScript, Firebase and Google Gemini API featuring AI-generated quizzes, real-time engagement and scalable cloud architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages