This is the landing page for Turva - our 21st Century Clinical Safety Compliance Platform.
This project is built with modern web technologies:
- React 19 - UI library with latest features including concurrent rendering
- Vite - Fast build tool and development server with HMR (Hot Module Replacement)
- Mantine UI - Modern React components library with excellent theming support
- TypeScript - Type-safe JavaScript with strict configuration
- React Router - Declarative routing for React applications
- Yarn 4 - Package manager
src/
├── app/
│ ├── App.tsx # Main app component with routing
│ └── contexts/
│ └── ConfigurationContext.tsx # Global configuration context/state
├── pages/
│ ├── LandingPage/ # Home page component
│ └── ResourceNotFoundPage/ # 404 error page
├── types/
│ └── Configuration.ts # TypeScript type definitions
├── resources/images/ # Static assets
├── theme.ts # Mantine UI theme configuration
└── main.tsx # Application entry point
- Node.js (version compatible with React 19)
- Yarn 4.9.2 (included in the project)
- Clone the repository
- Install dependencies:
yarn installStart the development server with hot module replacement:
yarn devThe application will be available at http://localhost:5173 (or the next available port).
yarn dev- Start development serveryarn build- Build for production (TypeScript compilation + Vite build)yarn lint- Run ESLint for code quality checksyarn preview- Preview production build locally
The application uses a custom Mantine theme (theme.ts) with:
- Custom color palette including "turva" brand colors
- Dark mode support with custom dark color scheme
- Consistent component styling (no border radius by default)
Global app configuration is managed through React Context (ConfigurationContext.tsx):
- Persists user preferences to localStorage
- Currently supports dark mode toggle
- Easily extensible for additional configuration options
Uses React Router v7 with:
- Browser router with basename support for deployment flexibility
- Simple route structure: home page (
/) and catch-all 404 page - Configured in
App.tsx
The project uses a multi-config TypeScript setup:
tsconfig.json- Project TypeScript configuration
Strict TypeScript settings are enabled for better code quality.
- PostCSS with Mantine preset for CSS processing
- Custom breakpoint variables defined in
postcss.config.cjs
- ESLint configured with TypeScript, React, and React Hooks rules
- Strict TypeScript configuration with unused variable detection
- Uses Yarn 4 with
node-moduleslinker for compatibility - Modern imports configuration in
package.jsonsupporting multiple file extensions
- Vite handles bundling and optimization
- TypeScript compilation happens before build
- Development server supports modern ES modules
The application is configured for flexible deployment:
BASE_URLenvironment variable support for subdirectory deployment- Static asset optimization through Vite
- Production build outputs to
dist/directory
When contributing:
- Follow the existing TypeScript strict configuration
- Maintain the established project structure
- Use the configured ESLint rules
- Test locally with
yarn devbefore submitting changes