A front-end application of a real-time system monitoring platform, built on Next.js 14.
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Style: Tailwind CSS
- UI Components: Radix UI
- Animation: Framer Motion
- Icons: Lucide React
- Charts: Recharts
- ✅ Responsive design (mobile, tablet, desktop)
- ✅ Light/dark theme switching
- ✅ Automatic detection of system topic preferences
- ✅ Modernize the UI component library
- ✅ Type-safe TypeScript
Create a config.json file in the frontend directory based on config.example.json:
cp config.example.json config.json
nano config.json{
"apiUrl": "http://localhost:7788"
}The configuration file will be automatically read during build time. If the file doesn't exist, it will use the default value http://localhost:7788.
Alternatively, you can set the API URL using environment variables:
# .env.local (for development)
NEXT_PUBLIC_API_URL=http://localhost:7788
# .env.production (for production)
NEXT_PUBLIC_API_URL=https://your-api-server.comPriority: Environment variables > config.json > default value
pnpm install-
Copy the example config file:
cp config.example.json config.json
-
Edit
config.jsonand set theapiUrlto your backend server address:{ "apiUrl": "http://localhost:7788" }
pnpm devVisit http://localhost:7777 to view the app.
pnpm buildpnpm startpnpm lint
pnpm type-checkpnpm format- Mobile: < 768px
- Tablet: 768px - 1023px
- Desktop: > 1024px
The app supports three theme modes:
- Light: Bright color mode
- Dark: Dark mode
- System: Follow the system settings (default)
Theme preferences are automatically saved to localStorage.