Admin Dashboard cho Smart City Platform
CityLens Web Dashboard là giao diện quản trị viên cho phép:
- Xem và quản lý báo cáo từ người dân
- Hiển thị dữ liệu địa lý từ OpenStreetMap
- Tích hợp dữ liệu LOD từ nhiều nguồn (weather, AQI, traffic)
- Theo dõi thống kê và analytics
- Quản lý người dùng và cài đặt
| Thành phần | Công nghệ | Phiên bản |
|---|---|---|
| Framework | Next.js (App Router) | 14.2.33 |
| Language | TypeScript | 5.6.3 |
| Styling | Tailwind CSS | 3.4.15 |
| Maps | Leaflet + React Leaflet | 1.9.4 |
| Charts | Recharts | 2.14.1 |
| State | Zustand | 5.0.2 |
| HTTP | Axios | 1.7.9 |
- Node.js 20 trở lên
- npm 10 trở lên
- Backend API đang chạy (http://localhost:8000)
chmod +x setup.sh
./setup.shBước 1: Clone repository
git clone https://github.com/PKA-Open-Dynamics/CityLens.git
cd CityLens/web-dashboardBước 2: Cài đặt dependencies
npm installBước 3: Cấu hình environment
cp .env.example .env.local
# Chỉnh sửa .env.local nếu cần thay đổi API URLBước 4: Chạy development server
npm run devỨng dụng sẽ chạy tại: http://localhost:3000
# Build application
npm run build
# Start production server
npm start# Build image
docker build -t citylens-web-dashboard .
# Run container
docker run -p 3000:3000 \
-e NEXT_PUBLIC_API_BASE_URL=http://localhost:8000/api/v1 \
citylens-web-dashboardweb-dashboard/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── (dashboard)/ # Dashboard layout group
│ │ │ ├── dashboard/ # Main dashboard
│ │ │ ├── geographic/ # Dữ liệu địa lý
│ │ │ ├── reports/ # Quản lý báo cáo
│ │ │ ├── users/ # Quản lý người dùng
│ │ │ └── settings/ # Cài đặt
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Landing/redirect
│ ├── components/ # React components
│ │ ├── geographic/ # LOD data panels
│ │ ├── layout/ # Header, sidebar
│ │ ├── map/ # Map components
│ │ └── providers/ # Context providers
│ └── lib/ # Utilities
│ ├── api.ts # API services
│ ├── api-client.ts # HTTP client
│ └── utils.ts # Helpers
├── public/ # Static assets
├── setup.sh # Script cài đặt
├── CHANGELOG.md # Lịch sử thay đổi
├── CONTRIBUTING.md # Hướng dẫn đóng góp
├── DEPENDENCIES.md # Thông tin thư viện
├── LICENSE # GPL-3.0 License
└── package.json # npm dependencies
- Thống kê tổng quan (reports, users, facilities)
- Recent activities
- Quick actions
- Interactive map với Leaflet
- Boundary selector (quận, phường)
- Tích hợp dữ liệu LOD:
- Weather (OpenWeatherMap)
- Air Quality (AQICN)
- Traffic (TomTom)
- Geographic (OpenStreetMap)
- Danh sách báo cáo từ người dân
- Filter theo status, category
- Chi tiết báo cáo với location
# Development server
npm run dev
# Lint code
npm run lint
# Format code
npm run format
# Type check
npx tsc --noEmit
# Build
npm run buildXem CONTRIBUTING.md để biết cách đóng góp cho dự án.
Dự án này được phát hành theo giấy phép GNU General Public License v3.0 (GPL-3.0).
Copyright (c) 2025 CityLens Contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Xem file LICENSE để biết chi tiết.
- DEPENDENCIES.md - Danh sách thư viện
- CHANGELOG.md - Lịch sử thay đổi
- Backend README - Backend API documentation
- Main README - Tài liệu dự án chính
