Add login, role-based portals, and browser-local admin image upload

This commit is contained in:
2026-06-27 16:33:20 -05:00
parent e4b30d6dfd
commit 26559d4cf8
6 changed files with 485 additions and 0 deletions
+17
View File
@@ -24,3 +24,20 @@ src/app/page.tsx
src/components/MeasuredText.tsx
README.md
```
## Authentication
The app now includes simple browser-local authentication with two hardcoded accounts:
- `admin` / `admin` — Admin portal (`/admin`)
- `user` / `user` — User portal (`/user`)
The logged-in role is stored in `localStorage`. The **Login / Logout** control lives in the Navbar.
## Admin portal
Visit `/admin` after logging in as `admin` to upload images. Images are previewed in a gallery and can be deleted individually. For now, uploaded images are stored as base64 strings in the browser's `localStorage` under the key `la-huasca-admin-images` — they are not persisted on a server.
## User portal
Visit `/user` after logging in as `user` to see a member portal with mock reservations, discount coupons, offers, the WiFi password, and a list of benefits.