Part of the ZarishSphere Platform - A No-Code FHIR Healthcare Data Management System
The Zarish Frontend Shell is the main web application that serves as the microfrontend container for the ZarishSphere Platform. It provides a unified user interface for healthcare data management, patient records, and FHIR resource interactions.
- Framework: React 19 with TypeScript
- Build Tool: Vite 7
- Styling: TailwindCSS 3
- Routing: React Router DOM 7
- Authentication: Keycloak JS
- HTTP Client: Axios
- Linting: ESLint 9
Before you begin, ensure you have the following installed on your machine:
- Node.js: Version 20 or higher (Download Node.js)
- npm: Comes with Node.js (verify with
npm --version) - Git: For version control (Download Git)
- Code Editor: VS Code recommended (Download VS Code)
Open a terminal and run these commands to verify:
node --version # Should show v20.x.x or higher
npm --version # Should show 10.x.x or higher
git --version # Should show git version 2.x.x# Navigate to your desired directory
cd ~/Desktop
# Clone the repository
git clone https://github.com/ZarishSphere-Platform/zarish-frontend-shell.git
# Navigate into the project
cd zarish-frontend-shell# Install all required packages
npm installThis will download and install all the packages listed in package.json. It may take a few minutes.
Create a .env file in the project root:
# Create the environment file
touch .envAdd the following configuration (adjust values as needed):
VITE_KEYCLOAK_URL=http://localhost:8080
VITE_KEYCLOAK_REALM=zarish
VITE_KEYCLOAK_CLIENT_ID=zarish-frontend
VITE_FHIR_SERVER_URL=http://localhost:8081/fhir
VITE_TERMINOLOGY_SERVER_URL=http://localhost:8082# Start the development server
npm run devThe application will start at http://localhost:5173 (or another port if 5173 is busy).
Open your web browser and navigate to:
http://localhost:5173
You should see the Zarish Frontend Shell application running!
| Command | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build production-ready application |
npm run preview |
Preview production build locally |
npm run lint |
Run ESLint to check code quality |
npm run deploy |
Deploy to GitHub Pages |
zarish-frontend-shell/
βββ public/ # Static assets
βββ src/
β βββ components/ # React components
β βββ pages/ # Page components
β βββ services/ # API services
β βββ utils/ # Utility functions
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
βββ .github/
β βββ workflows/ # GitHub Actions workflows
βββ index.html # HTML template
βββ package.json # Project dependencies
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
βββ tailwind.config.js # TailwindCSS configuration
- Make your code changes
- Save the file (Vite will automatically reload)
- Check the browser for updates
- Test the functionality
# Build the application
npm run build
# Preview the production build
npm run previewThe application automatically deploys to GitHub Pages when you push to the main branch.
# Build and deploy to GitHub Pages
npm run deployThe deployed site will be available at:
https://zarishsphere-platform.github.io/zarish-frontend-shell/
The application uses Keycloak for authentication. To set up Keycloak:
- Install Keycloak locally or use a hosted instance
- Create a realm named
zarish - Create a client named
zarish-frontend - Configure the client as a public client
- Update the
.envfile with your Keycloak URL
If port 5173 is already in use:
# Vite will automatically use the next available port
# Check the terminal output for the actual port# Clear npm cache
npm cache clean --force
# Delete node_modules and package-lock.json
rm -rf node_modules package-lock.json
# Reinstall dependencies
npm install# Check for TypeScript errors
npx tsc --noEmit
# Check for linting errors
npm run lint- Create a new branch for your feature
- Make your changes
- Test thoroughly
- Commit with clear messages
- Push to your branch
- Create a pull request
This project is part of the ZarishSphere Platform.
If you encounter any issues:
- Check the Issues page
- Create a new issue with detailed information
- Include error messages and steps to reproduce
- zarish-fhir-server - FHIR Server Backend
- zarish-terminology-server - Terminology Server
- zarish-fhir-infra - Infrastructure & Deployment