A production-ready React Native mobile application for booking cafeteria seats at IBM. Built with Expo, TypeScript, and a custom design system.
- IBM w3 SSO Authentication - Secure login with IBM credentials
- Real-time Seat Availability - View available seats across 2 floors
- Visual Seat Selection - BookMyShow-style circular cafeteria layout
- Multi-seat Booking - Choose 1-5 seats via a stepper and select the same count on the map
- Smart Check-In System - 10-minute check-in window after slot starts
- Booking Management - View, manage, and cancel bookings
- Auto-expiration - Unused bookings automatically expire
- 2 Floors - Ground Floor & First Floor
- 10 Tables per floor - Arranged in circular layout
- 5 Seats per table - Total of 100 seats
- Visual Selection - See the entire floor layout at once
- Select Date - Choose from next 7 days
- Select Time Slot - 4 lunch slots (12:00 PM - 2:00 PM)
- Select Floor - Ground or First Floor
- Select Seat(s) - Interactive circular cafeteria view with multi-select (match the seat count you chose)
- Confirm - Review and confirm all selected seats
Riviera/
βββ src/
β βββ components/ # Reusable UI components
β β βββ Button.tsx
β β βββ Card.tsx
β β βββ EmptyState.tsx
β β βββ Loading.tsx
β β βββ SeatIcon.tsx
β β βββ SeatLegend.tsx
β β βββ TableLayout.tsx
β βββ constants/ # App constants & config
β β βββ cafeteriaLayout.ts
β β βββ config.ts
β β βββ theme.ts
β β βββ timeSlots.ts
β βββ context/ # React Context providers
β β βββ AuthContext.tsx
β β βββ BookingContext.tsx
β βββ navigation/ # Navigation setup
β β βββ BookNavigator.tsx
β β βββ MainNavigator.tsx
β β βββ RootNavigator.tsx
β βββ screens/ # Screen components
β β βββ booking/
β β β βββ SelectDateScreen.tsx
β β β βββ SelectTimeSlotScreen.tsx
β β β βββ SelectFloorScreen.tsx
β β β βββ SelectSeatScreen.tsx
β β β βββ ConfirmBookingScreen.tsx
β β βββ HomeScreen.tsx
β β βββ LoginScreen.tsx
β β βββ MyBookingsScreen.tsx
β β βββ ProfileScreen.tsx
β βββ services/ # API services
β β βββ api.ts
β βββ types/ # TypeScript definitions
β βββ index.ts
βββ App.tsx
βββ package.json
- Framework: Expo with TypeScript
- Navigation: React Navigation v6 (Stack + Bottom Tabs)
- State Management: Context API
- Date Handling: date-fns
- Storage: AsyncStorage
- Design: Custom IBM-inspired design system
- Node.js 18+ (Expo SDK 54 requirement)
- npm (ships with Node) or yarn
- Expo CLI (optional;
npx expo startworks without a global install) - iOS Simulator (Mac) or Android Emulator (or a real device with Expo Go)
- Install dependencies
cd Riviera
npm install- Start the development server
npm start
# or
npx expo start- Run on your device/emulator
- iOS: Press
ior scan the QR with the Camera app (Expo Go) - Android: Press
aor scan the QR with Expo Go - Web: Press
w
- If Metro cache misbehaves
npm start -- --clear- Primary: IBM Blue (#0F62FE)
- Secondary: Purple (#8A3FFC)
- Success: Green (#24A148)
- Warning: Yellow (#F1C21B)
- Error: Red (#DA1E28)
- Available: Green
- Booked: Red
- Selected: Blue
- Checked In: Purple
- H1: 32px, Bold
- H2: 24px, Semibold
- H3: 20px, Semibold
- Body: 16px, Regular
- Caption: 12px, Regular
Currently uses mock authentication. To integrate IBM w3 SSO:
- Update
src/constants/config.tswith your SSO credentials:
SSO_CONFIG: {
CLIENT_ID: 'your-ibm-w3-client-id',
REDIRECT_URI: 'riviera://auth/callback',
AUTHORIZATION_ENDPOINT: 'https://w3id.sso.ibm.com/auth/...',
TOKEN_ENDPOINT: 'https://w3id.sso.ibm.com/auth/...',
}- Update
src/services/api.tsauthApi.login()to handle real SSO flow
The app uses mock APIs with simulated delays. All mock data is in src/services/api.ts.
- Update
src/constants/config.ts:
API_BASE_URL: 'https://your-api-domain.com',
ENABLE_MOCK_API: false,- Update API functions in
src/services/api.tsto call real endpoints
POST /api/auth/login - Login with SSO
POST /api/auth/logout - Logout
GET /api/bookings - Get user bookings
POST /api/bookings - Create booking
POST /api/bookings/:id/checkin - Check in
DELETE /api/bookings/:id - Cancel booking
GET /api/availability?date= - Get seat availability
- User authentication state
- Login/logout functionality
- Session persistence with AsyncStorage
- Booking list management
- Create, check-in, cancel operations
- Seat availability data
- Button - Primary, secondary, outline, ghost variants
- Card - Elevated cards with shadows
- Loading - Full-screen loading indicator
- EmptyState - Empty state with icon and message
- SeatIcon - Individual seat representation
- TableLayout - Circular table with 5 seats
- SeatLegend - Color-coded seat status legend
- LoginScreen - IBM w3 SSO login
- HomeScreen - Dashboard with quick actions
- MyBookingsScreen - View and manage bookings with check-in
- ProfileScreen - User profile and app info
- SelectDateScreen - Calendar-style date picker
- SelectTimeSlotScreen - Time slots with availability
- SelectFloorScreen - Floor selection (2 floors)
- SelectSeatScreen - Visual seat selection (circular layout)
- ConfirmBookingScreen - Review and confirm
Run the app and test:
- Login flow
- Date and time slot selection
- Circular seat selection on both floors
- Booking confirmation
- Check-in within 10-minute window
- Booking cancellation
- View past bookings
iOS:
eas build --platform iosAndroid:
eas build --platform androidCreate eas.json:
{
"build": {
"production": {
"ios": {
"distribution": "internal"
},
"android": {
"distribution": "internal"
}
}
}
}Edit src/constants/timeSlots.ts to modify lunch hours:
export const TIME_SLOTS: TimeSlot[] = [
{ id: 'slot-1', startTime: '12:00', endTime: '12:30', ... },
// Add more slots
];Edit src/constants/cafeteriaLayout.ts to change floor/table/seat configuration
Edit src/constants/timeSlots.ts:
export const CHECK_IN_WINDOW_MINUTES = 10;Metro bundler error:
npm start -- --reset-cacheAsyncStorage not found:
npx expo install @react-native-async-storage/async-storageNavigation type errors:
- Check
src/types/index.tsnavigation types match your navigator setup
react-native-screens version warning:
- The project pins
react-native-screens@~4.16.0(Expo SDK 54 expectation). If you see a warning, run:
npx expo install react-native-screens@~4.16.0Internal IBM use only.
Built by IBM Engineering Team for cafeteria management.
- Push Notifications - Remind users to check in
- QR Code Check-in - Scan to check in at cafeteria
- Favorites - Save preferred seats
- Analytics - Track popular times/seats
- Admin Panel - Manage cafeteria settings
- Waitlist - Join waitlist for full slots
- Social Features - See which colleagues are booking
- Menu Integration - View daily menu
Version: 1.0.0
Last Updated: January 2026