Skip to content

Johnmiicheal/mazebox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

mazebox - NTU Campus Navigation

AI-powered campus assistant with indoor navigation (Android), AR treasure hunt, and financial wellness tracking
Fine-tuned exclusively for Nottingham Trent University

Lua AI Next.js React TypeScript Mapbox Tailwind CSS Zustand Node.js Android Framer Motion Zod


๐Ÿš€ What is mazebox?

mazebox is a smart campus navigation system built exclusively for NTU students. It combines:

  • ๐Ÿ“ฑ Indoor Navigation (Android only) - Turn-by-turn directions inside NTU buildings
  • ๐Ÿ—บ๏ธ 3D Outdoor Maps - Mapbox visualization for navigating between buildings
  • ๐Ÿค– AI Assistant - 8 intelligent tools fine-tuned for NTU (rooms, timetables, shuttles, gym, events, charging stations)
  • ๐ŸŽฎ Gamification - AR treasure hunt, daily quests, leaderboards, financial tracking
  • ๐Ÿ’ฐ Financial Wellness - Track money saved through smart student choices

โšก Quick Start

Prerequisites

1๏ธโƒฃ Backend (AI Agent)

# Install dependencies
npm install

# Create environment file
cp env.example .env

# Add your API keys to .env (optional for basic testing)
# GOOGLE_MAPS_API_KEY=your_key_here

View more documentation on Lua AI here

2๏ธโƒฃ Frontend (Web App)

# Navigate to frontend
cd frontend

# Install dependencies
npm install

# Create environment file
echo "NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=your_mapbox_token" > .env.local

# Run dev server
npm run dev

Open http://localhost:3000 ๐ŸŽ‰

3๏ธโƒฃ Mobile (Android - Indoor Navigation)

Pre-built APK: frontend/public/apk/map.apk

Install on Android device to access indoor navigation feature.


๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ANDROID APP (Indoor Navigation)                   โ”‚
โ”‚  โ€ข Turn-by-turn indoor directions                  โ”‚
โ”‚  โ€ข Floor-by-floor pathfinding                      โ”‚
โ”‚  โ€ข Offline mode with downloadable maps             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ†•
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  WEB APP (Next.js 16)                               โ”‚
โ”‚  โ€ข 3D outdoor maps (Mapbox GL)                      โ”‚
โ”‚  โ€ข AI chat interface                                โ”‚
โ”‚  โ€ข AR treasure hunt                                 โ”‚
โ”‚  โ€ข Quest system & leaderboard                       โ”‚
โ”‚  โ€ข Game stats (Zustand + localStorage)             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ†•
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  AI AGENT (Lua AI)                                  โ”‚
โ”‚  โ€ข 8 NTU-specific tools:                            โ”‚
โ”‚    1. Find available rooms                          โ”‚
โ”‚    2. Get student timetable                         โ”‚
โ”‚    3. Check gym equipment                           โ”‚
โ”‚    4. Shuttle status                                โ”‚
โ”‚    5. Find events                                   โ”‚
โ”‚    6. Weather suggestions                           โ”‚
โ”‚    7. Directions to buildings                       โ”‚
โ”‚    8. Find charging stations                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฎ Features

Navigation

  • Indoor (Android): MAE, ABK, ARK, BON buildings with floor plans
  • Outdoor (Web): 3D Mapbox maps with routing (walking/cycling/driving)
  • Seamless transition between outdoor and indoor navigation

AI Tools (NTU-Specific)

  • Room finder with proximity sorting
  • Student timetable with auto-routing
  • Gym equipment availability tracker
  • NCTX shuttle real-time arrivals
  • Campus events discovery
  • Weather-aware suggestions
  • Building directions (supports abbreviations: MAE, ARK, BON, etc.)
  • Charging station locator

Gamification

  • 8 AR Treasures (Common โ†’ Legendary rarity, 50-200 pts)
  • 15+ Daily Quests (Exploration, Navigation, Financial)
  • Financial Tracking (Monitor money saved, ยฃ150+/month potential)
  • Leaderboard & daily streaks
  • QR Code System for treasure collection

๐Ÿ› ๏ธ Tech Stack

Frontend:

  • Next.js 16.0, React 18.3, TypeScript 5.4
  • Mapbox GL 3.1, react-map-gl 7.1
  • Zustand 5.0, Framer Motion 11.18
  • Tailwind CSS 3.4, Lucide React 0.400
  • @google/model-viewer 4.1, QRCode 1.5

Backend:

  • Lua CLI 3.0.2, TypeScript 5.9, Zod 3.24
  • Node.js 20+, tsx 4.7
  • Axios 1.6

APIs:

  • Google Geocoding (building locations)
  • Mapbox Directions (routing)

๐Ÿ“ฑ Pages

  • / - Main map + AI chat
  • /hunt - AR treasure hunt
  • /quests - Daily quest management
  • /leaderboard - Student rankings
  • /qr-generator - Generate QR markers for treasures

๐ŸŽฏ Key Differentiators

  • โœ… First campus app with true indoor navigation (Android)
  • โœ… Fine-tuned exclusively for NTU (knows all building codes, locations, services)
  • โœ… Gamification meets utility (fun + practical)
  • โœ… Financial wellness tracking (teaches responsible spending)
  • โœ… Multi-platform (Web + Android, iOS support coming)

๐Ÿ“‚ Project Structure

lua-navigator/ (mazebox)
โ”œโ”€โ”€ src/                    # AI Agent (Lua)
โ”‚   โ”œโ”€โ”€ index.ts
โ”‚   โ”œโ”€โ”€ skills/
โ”‚   โ”‚   โ””โ”€โ”€ campus-navigator.skill.ts
โ”‚   โ”œโ”€โ”€ services/           # Google Geocoding, Mapbox
โ”‚   โ””โ”€โ”€ data/               # NTU rooms, shuttles, gym, events
โ”‚
โ”œโ”€โ”€ frontend/               # Next.js Web App
โ”‚   โ”œโ”€โ”€ app/                # Pages
โ”‚   โ”œโ”€โ”€ components/         # React components
โ”‚   โ”œโ”€โ”€ context/            # Zustand game state
โ”‚   โ”œโ”€โ”€ data/               # Buildings, treasures, quests
โ”‚   โ””โ”€โ”€ public/
โ”‚       โ”œโ”€โ”€ models/         # 3D GLB models
โ”‚       โ””โ”€โ”€ apk/            # Android build
โ”‚
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ lua.skill.yaml
โ””โ”€โ”€ README.md

๐Ÿ”ฎ Roadmap

  • iOS app with indoor navigation
  • Real-time API integrations (NTU Timetable, EWS, NCTX)
  • Voice interface
  • Multi-language support
  • White-label for other universities

๐Ÿ’ก Inspired By

About

like mazemap but [ai]:sparkle

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages