Compass Frontend Development
The Compass frontend is built with React and provides the user interface for room discovery, booking, and space management.Overview
The Compass frontend is located inMeridian/frontend/ and serves as the primary user-facing application for Meridian’s space management features.
Key Technologies
- React - UI framework
- SCSS - Styling
- Context API - State management
- React Router - Navigation
- WebSocket - Real-time updates
Component Structure
Core Components
Key Features
Room Discovery
The search and discovery interface allows users to:- Browse available rooms by location, capacity, and amenities
- View real-time availability calendars
- Filter by specific requirements (projector, whiteboard, etc.)
- See ratings and reviews from other users
Booking System
Real-time Updates
Compass uses WebSocket connections to provide:- Live availability updates
- Instant booking confirmations
- Real-time occupancy status
- Notification of room changes
State Management
Context Providers
AuthContext: Manages user authentication and sessionRouting
Key routes for Compass:/- Landing page with room search/classroom/:id- Room detail page/create-event- Event creation with room booking/feature-admin/compass- Admin dashboard for Compass
Styling Guidelines
Compass uses SCSS with BEM naming convention:Development Workflow
-
Start Development Server
-
Make Component Changes
- Edit files in
src/components/ - Changes auto-reload via hot module replacement
- Edit files in
-
Test Components
Best Practices
- Component Reusability: Create reusable components for common UI patterns
- Performance: Use React.memo for expensive components
- Accessibility: Follow WCAG guidelines for inclusive design
- Error Handling: Implement error boundaries for graceful failures
Integration Points
- Backend API: RESTful endpoints for room and event data
- WebSocket Server: Real-time updates and notifications
- Calendar Systems: External calendar integration
- Authentication: SAML/OAuth for user login