Frontend#
The frontend is built using Next.js with PWA support.
π Tech Stack#
Framework: Next.js (React + SSR)
UI Library: Mantine UI
Maps: MapLibre GL JS with MapTiler tiles
Auth: Firebase Authentication
Testing: Sonarqube, Vitest, Cypress
Language: TypeScript
π Features#
π Search for rooms by name
πΊοΈ View indoor locations on a map
π Show room-specific schedule (from StarPlan)
π§ Mobile-first, responsive design
π Admin dashboard for:
Clearing cached schedules
Deleting and refreshing room entries from OSM
π± PWA Support for more mobile-friendly usage
βοΈ Environment Variables#
Create a .env file with the following variables:
NEXT_PUBLIC_API_URL=http://localhost:8080
NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_MAPTILER_KEY=...
π§ͺ Testing#
We use Cypress for end-to-end testing. For e2e testing, we need to set a further environment variable to inject a mapgrab to enable map testing.
.env:
...
NEXT_PUBLIC_TEST_ENV=true
Run tests:
npm run test # Run unit tests
npx cypress open # Run E2E tests interactively
π Authentication#
Admin dashboard is secured using Firebase Auth.
Only users with a valid ID token can access admin functionality.
Public pages (room map, schedule) are accessible without login.