How lucasffigueiredo/frontend-ebusworkspace works
E-bus WorkSpace is a Next.js frontend for reserving desks and meeting rooms, checking in with QR codes, and managing workplace usage. The main flow is Google sign-in, authenticated access to booking pages, and reservation operations against a backend API; separate branches cover check-in, spaces administration, metrics, profiles, and department selection. The graph reflects documented capabilities and indexed references. Some feature implementations were not sampled, so uncertain connections are omitted or marked unverified.
Main entry points: app App routes · serverApi.ts Server API client · useGoogleAuth.ts Google sign-in · auth.service.ts Authentication service
Components 23
App and access
- App routes
src/app - Route protection
src/middleware.ts
Reservations and check-in
- Home dashboard
src/app/page.tsx - Desk booking
src/features/booking/hooks/useDeskBookingPage.ts - Room booking
src/features/booking/hooks/useRoomBookingPage.ts - My bookings
src/features/booking/pages/MyBookingsPage.tsx - QR check-in
src/features/booking/hooks/useScanPage.ts - Booking actions
src/core/actions/booking.actions.ts - Booking data types
src/core/models/booking.types.ts
Spaces and reporting
- Space management
src/features/spaces/pages/SpacesPage.tsx - Space actions
src/core/actions/space.actions.ts - Usage metrics
src/features/metrics/pages/MetricsPage.tsx - Department selection
src/features/spaces/hooks/useSelectDepartmentPage.ts
Identity and profile
- Google sign-in
src/features/auth/hooks/useGoogleAuth.ts - Authentication service
src/core/services/auth.service.ts - Login handler
src/app/api/auth/login/route.ts - User profile
src/features/auth/pages/ProfilePage.tsx - User actions
src/core/actions/user.actions.ts - Local user state
src/core/services/user.service.ts
Data access
- Server API client
src/core/services/serverApi.ts
Other components
- Employee
- WorkSpace backend
- Google OAuth
Connections 27
- Employee → App routes: uses
- App routes → Home dashboard: routes to
src/app/page.tsx - App routes → My bookings: routes to
src/app/bookings/page.tsx - App routes → User profile: routes to
src/app/profile/page.tsx - Employee → Google sign-in: signs in
- Google sign-in → Google OAuth: authenticates with
- Google sign-in → Authentication service: calls
src/features/auth/hooks/useGoogleAuth.ts - Authentication service → Login handler: posts credentials
src/core/services/auth.service.ts - Login handler → WorkSpace backend: exchanges token
src/app/api/auth/login/route.ts - Employee → Desk booking: books desks
- Employee → Room booking: books rooms
- Employee → QR check-in: checks in
- Desk booking → Booking actions: invokes
src/features/booking/hooks/useDeskBookingPage.ts - Room booking → Booking actions: invokes
src/features/booking/hooks/useRoomBookingPage.ts - Booking actions → Server API client: calls
src/core/actions/booking.actions.ts - Server API client → WorkSpace backend: sends API requests
src/core/services/serverApi.ts - Employee → My bookings: manages reservations
- Employee → Space management: manages spaces
- Space management → Space actions: invokes
- Space actions → Server API client: calls
src/core/actions/space.actions.ts - Employee → Usage metrics: views usage
- Employee → Department selection: selects department
- Employee → User profile: edits profile
- User profile → User actions: invokes
- User actions → Server API client: calls
src/core/actions/user.actions.ts - Authentication service → Local user state: persists session
src/core/services/auth.service.ts - Route protection → App routes: guards access