A React + TypeScript real-time service request application that enables communication between internal and external users. The app features role-based form editing, real-time notifications via Ably, and a complete workflow for service request management with modern component styling using SCSS and Material UI.
- Real-time Communication: Live notifications between internal and external users via Ably
- Role-based Form Editing: Different form capabilities based on user role (internal vs external)
- Service Request Workflow: Complete workflow from request creation to completion
- Real-time Notifications: Material-UI Snackbar notifications with detailed request information
- Dynamic Form Sections: Scheduling, deliverables, notes, and contact information
- Form Pre-population: Notifications can load existing data into the form for editing
- Responsive Design: Mobile-friendly layout with semantic markup and accessibility features
- Node.js 18+
npm8+
npm install
npm run devThe Vite dev server launches on http://localhost:5173 by default.
npm run dev– start the Vite development server with HMRnpm run build– type-check withtscand build the production bundlenpm run preview– preview the production build locallynpm run lint– run ESLint across the projectnpm test– run tests with Vitestnpm run test:ui– run tests with Vitest UInpm run test:run– run tests once (CI mode)
src/
├── App.tsx # Root layout with AblyProvider and role management
├── App.scss # Global shell styling
├── ably.ts # Ably configuration and real-time setup
├── components/
│ ├── topbar/ # Role switcher and header display
│ │ ├── topbar.tsx
│ │ ├── topbar.scss
│ │ ├── role_options.ts
│ │ └── components/basic_select/
│ │ ├── basic_select.tsx
│ │ └── basic_select.scss
│ └── order_form/ # Service request form system
│ ├── order_form.tsx
│ ├── order_form.scss
│ ├── constants/
│ │ └── constants.ts # Form data types and options
│ ├── services/
│ │ └── ablyService.ts # Ably real-time communication service
│ └── components/
│ ├── notifications/
│ │ ├── notifications.tsx
│ │ └── notifications.scss
│ ├── service_request_form/
│ │ ├── service_request_form.tsx
│ │ └── service_request_form.scss
│ └── deliverables_and_notes/
│ └── deliverables_and_notes.tsx
├── scss_variables/
│ └── variables.scss # Shared SCSS variables
├── test/
│ ├── setup.ts # Test environment setup
│ └── test-utils.tsx # Custom test utilities
├── services/
│ └── ablyService.ts # Ably real-time communication service
├── index.scss # Base styles and CSS variables
└── main.tsx # Application bootstrap
This application uses Ably for real-time communication between internal and external users. The system enables live notifications and form data synchronization.
- Internal User fills out and submits a service request form
- External User receives a real-time notification about the new request
- External User can click the notification to open the form with pre-populated data
- External User completes the work by filling out deliverables & notes and submitting
- Internal User receives a real-time notification that the service request is completed
- Open the application in two browser windows/tabs
- Set one window to "Internal User" and the other to "External User"
- In the Internal User window, fill out and submit the service request form
- Check the External User window - you should see a notification appear
- Click "Open Form" in the notification to see the pre-populated form
- Complete the deliverable checkboxes and add notes in the External User window
- Submit the form as the External User
- Check the Internal User window - you should see a completion notification
For detailed Ably setup information, see ABLY_SETUP.md.
The project includes comprehensive test coverage using Vitest and React Testing Library:
- 43 tests across 7 test files
- Component testing for all major UI components
- User interaction testing with userEvent
- Mocking for Ably services and external dependencies
- TypeScript support with proper type checking in tests
# Run tests in watch mode
npm test
# Run tests once (CI mode)
npm run test:run
# Run tests with UI
npm run test:ui- React 19 with the modern compiler-ready JSX runtime
- Ably real-time messaging for live notifications and data synchronization
- Material UI components for accessible select controls and notifications
- TypeScript types for form data, Ably messages, and option lists ensure type safety
- SCSS modules for component-scoped styling with shared variables in
src/scss_variables/ - Form state managed with React hooks (
useState,useMemo,useCallback,useEffect) - Role-based form editing with different capabilities for internal vs external users
- Comprehensive test suite with Vitest and React Testing Library
- React 19 - Modern React with compiler-ready JSX runtime
- TypeScript - Type safety and enhanced developer experience
- Vite - Fast build tool and development server
- Material UI - Accessible UI components and theming
- Ably - Real-time messaging and communication
- SCSS - Enhanced CSS with variables and nesting
- Vitest - Fast unit testing framework
- React Testing Library - Simple and complete testing utilities
- Jest DOM - Custom Jest matchers for DOM testing
- Add data persistence (e.g., API integration or local storage)
- Implement user authentication and authorization
- Add request history and tracking features
- Implement file uploads for deliverables
- Add email notifications as a fallback
- Expand test coverage for edge cases and error handling
- Add integration tests for the complete user workflow
This project is for interview preparation and internal demos. No license has been assigned.