Prerequisites
Before you begin, ensure you have:- Node.js 20.x or higher installed
- npm or your preferred package manager (yarn, pnpm, bun)
- Access to the backend API URL (provided by your system administrator)
- A valid user account and credentials
Quick Setup
Install dependencies
Install all required packages:This will install all dependencies listed in
package.json, including:- Next.js 15 and React 19
- Form libraries (React Hook Form, Zod)
- UI components (Radix UI, Recharts)
- State management (Zustand, TanStack Query)
Configure environment variables
Create a Environment Variables Explained:
.env.local file in the root directory with the following variables:.env.local
Replace
https://your-api-url.com with your actual backend API URL. The SESSION_SECRET should be a random string used for session encryption.NEXT_PUBLIC_API_URL: The base URL for your backend REST API (required)SESSION_SECRET: A secret key for JWT session management (required)
Start the development server
Launch the application:The application will start on
http://localhost:3000. You should see output like:Access the application
Open your browser and navigate to:You’ll be automatically redirected to the login page at
/auth/login.Log in with your credentials
Enter your email and password on the login form:
- Enter your registered email address
- Enter your password (minimum 8 characters)
- Click Login
src/app/actions/auth.ts:src/app/actions/auth.ts
Verify OTP code
After successful login credentials verification, you’ll be prompted to enter a 6-digit OTP code:Once verified, you’ll be redirected to the dashboard at
- Check your email for the OTP code
- Enter the 6-digit code in the OTP verification screen
- The code will auto-submit when all 6 digits are entered
The OTP verification is implemented in
src/app/auth/components/OTPVerification.tsx and uses the verifyOTPService server action./.Verify Installation
After logging in, you should see: ✅ Dashboard page with summary cards showing:- Asset analytics (total count, by criticality)
- Alarm analytics (active alarms, by severity)
- Recommendations summary
- Sample trend charts
- Dashboard
- Assets
- Samples
- Alarms
- Recommendations
- RCA (Root Cause Analysis)
- Organizations & Sites
- User Management
Common Issues
Backend API connection error
Backend API connection error
Problem: “Unable to connect to server” error messageSolution:
- Verify
NEXT_PUBLIC_API_URLis correct in.env.local - Check that the backend API is running and accessible
- If using a free tier service (like Render), allow 30-60 seconds for cold start
OTP not received
OTP not received
Problem: No OTP email after loginSolution:
- Check your spam/junk folder
- Verify your email address is registered in the system
- Contact your system administrator to check email service configuration
403 Permission errors
403 Permission errors
Problem: Pages show “You do not have permission” messagesSolution:
- Verify your user account has the appropriate role assigned
- Contact your system administrator to grant necessary permissions
- Check the browser console for specific permission errors
Build warnings
Build warnings
Problem: Warnings during
npm run dev or npm run buildSolution:- Warnings about dynamic routes using
cookiesare expected and harmless - Warnings about
useFormContextin CheckboxCells.tsx are pre-existing and safe to ignore
Next Steps
Now that you have MicroCBM running:Explore Features
Learn about asset management, samples, alarms, and more
Understand Architecture
Dive into the application structure and design patterns
Development Guide
Start developing and customizing MicroCBM
Deployment
Deploy MicroCBM to production environments
Available Scripts
Here are the key commands for working with MicroCBM:package.json
For detailed installation instructions including Docker setup, advanced configuration, and troubleshooting, see the Installation Guide.