Skip to content

Overview Map of museums when clicked on a museum you get the following info about the museum and the artifacts images of the museum after you read the info, you can attempt a mini quiz target audience: Museum lovers

License

Notifications You must be signed in to change notification settings

dganesh05/MuseumQuest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

// ...existing code...

MuseumQuest

MuseumQuest is an educational web app that showcases museums on an interactive world map. Click a museum to view details, images, and try a short quiz. Users can collect stamps, earn XP, level up, and compete on a leaderboard.


Features

  • Interactive map with museum markers
  • Museum detail pages with background images and quizzes
  • Passport system: stamps, XP, levels, and progress bar
  • AI-powered chatbot for museum context
  • Leaderboard showing top explorers
  • Local backend API that integrates with Firestore

Tech stack


Repo structure (key files)

Backend helpers:

Frontend helpers:


Prerequisites

  • Node.js 18.x (backend engines in backend/package.json)
  • npm or pnpm
  • Firebase project / credentials if using production Firestore (or run with emulator)

Setup (local development)

  1. Backend

    • Copy env example:
      • cp backend/.env.example backend/.env
    • Provide credentials:
      • Set GOOGLE_APPLICATION_CREDENTIALS to your service account JSON path or set FIREBASE_SERVICE_ACCOUNT env var.
    • Install & run:
      • cd backend
      • npm install
      • npm run dev
    • Backend listens on port 5000 by default and exposes endpoints implemented in backend/server.js.
  2. Frontend

    • Install & run:
      • cd frontend
      • npm install
      • npm run dev
    • Open the Vite URL printed in the console.

Important environment variables

Check backend/.env.example. Common vars:

  • GOOGLE_APPLICATION_CREDENTIALS or FIREBASE_SERVICE_ACCOUNT — Firebase admin credentials (see backend/firebase-admin.js)
  • GEMINI_API_KEY — Google Generative AI key used in backend/server.js
  • WOLFRAM_API_KEY — optional Wolfram support used in backend routes

The frontend uses Firebase config stored in frontend/src/firebase.js.


API Endpoints (overview)

Implemented in backend/server.js:

  • GET /api/museums — list museums
  • GET /api/museums/:id — museum detail
  • POST /api/quiz/:museumId — get quiz for a museum
  • POST /api/quiz/check — check quiz answers
  • POST /api/passport/stamp — award a stamp (server side) — uses calculateLevel
  • GET /api/passport/:userId — get a user's passport (getUserProgress)
  • GET /api/leaderboard — top users aggregation
  • POST /api/ai/ask — AI museum Q&A (Gemini) (see backend/server.js)
  • GET /api/wolfram/context/:year — simple historical context

Client wrappers are in frontend/src/services/api.js.


Notes & gotchas


Running tests

There are no tests configured in the repo. Add tests and scripts to backend/package.json and frontend/package.json as needed.


Contributing

  1. Fork the repo
  2. Create a branch
  3. Open a PR with a description

License

MIT — see LICENSE

// ...existing code... { changed code } // ...existing code...

About

Overview Map of museums when clicked on a museum you get the following info about the museum and the artifacts images of the museum after you read the info, you can attempt a mini quiz target audience: Museum lovers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.9%
  • CSS 5.6%
  • HTML 0.5%