ONGOINGWeb Development
  • Next.js 15
  • React 19
  • TypeScript
  • Tailwind CSS v4
  • PostgreSQL
  • Neon
  • Drizzle ORM
  • oRPC
  • Better Auth
  • Turborepo
  • shadcn/ui
  • TanStack Query
  • Zod

Road Information System

Production road management system for BP Kawasan Karimun, Indonesia

A production road infrastructure management system deployed for BP Kawasan Karimun, a government agency managing industrial zone roads in Karimun, Indonesia. Handles road inventory, pavement condition assessment, and automated TTI calculations based on PKRMS Manual (SE 22/2022). Features role-based access (Admin/Operator/Visitor), PDF report generation, and internationalization (EN/ID).
Road Information System
Road Information System

Live: View Website Code: GitHub

Overview

A road infrastructure management system for BP Kawasan Karimun. Manages road inventory, pavement condition assessment, and Treatment Trigger Index (TTI) calculations based on Indonesia's PKRMS Manual (SE 22/2022). Built as a Turborepo monorepo with type-safe APIs (oRPC), session-based auth (Better Auth), and serverless PostgreSQL (Neon).

Key Features

  • Road & Segment Management — Create roads with auto-generated segments (configurable interval and generation mode). Track pavement inventory, shoulders, drainage, and land use per segment.
  • Pavement Damage Assessment — Detailed damage forms for 5 pavement types (asphalt, concrete, block, gravel, unpaved) with type-specific parameters.
  • TTI Calculation — Automated Treatment Trigger Index computation with condition ratings (Good/Fair/Poor/Bad) at segment and road level.
  • PDF Reports — Client-side report generation with road condition summaries, segment analysis, and pavement statistics.
  • Role-Based Access — Three roles: Admin (user management), Operator (road data entry & reporting), Visitor (view published reports). No public sign-ups.
  • User Management — Ban/unban users, revoke sessions, manage passwords, assign roles.
  • Internationalization — English and Indonesian language support.
  • Dark/Light Theme — System preference detection with manual toggle.

Dashboard & Road Overview

The dashboard provides a comprehensive overview of all roads with key metrics including total length, section width, and surface type percentages (Asphalt, Concrete, Block, Gravel, Unpaved).

Dashboard Overview
Dashboard Overview

Road Management

Administrators and operators can manage the full lifecycle of road data, including creating, updating, and deleting roads. Each road supports auto-segment generation based on configurable intervals and generation modes.

Road Management
Road Management

Segment & Pavement Assessment

Each road is divided into segments. Operators perform detailed pavement condition assessments across 5 pavement types, each with type-specific damage parameters (e.g., asphalt: bleeding, disintegration, crack analysis, potholes, rutting, edge damage).

Segment Assessment
Segment Assessment

TTI Calculation & Reporting

TTI is automatically calculated based on weighted distress areas per segment. Roads are classified: Good (TTI < 25), Fair (25–50), Poor (50–75), Bad (TTI ≥ 75). PDF reports are generated client-side with road info, segment analysis, and condition statistics.

TTI Reports
TTI Reports

User Management

Admins can create accounts, assign roles (Admin/Operator/Visitor), ban/unban users, revoke sessions, and manage passwords. Authentication via Better Auth with session-based security.

User Management
User Management

Tech Stack

LayerTechnologies
FrontendNext.js 15, React 19, Tailwind CSS v4, shadcn/ui, React Hook Form, TanStack Query, Motion, Lucide
APIoRPC (type-safe RPC), Better Auth (session-based), Zod validation
DatabasePostgreSQL (Neon serverless), Drizzle ORM
InfrastructureTurborepo, pnpm, Vercel, GitHub Actions (CI/CD)
OtherjsPDF + html2canvas (PDF export)

Project Structure

├── apps/web/                  # Next.js frontend
│   └── src/
│       ├── app/(auth)/        # Sign-in page
│       ├── app/(dashboard)/   # Dashboard, roads, users, account
│       ├── components/        # UI components (shadcn/ui + custom)
│       ├── hooks/             # Auth & admin hooks
│       ├── i18n/              # Translations (EN/ID)
│       └── middleware.ts      # Route protection
├── packages/api/              # Backend API
│   └── src/modules/
│       ├── admin/             # User management
│       ├── auth/              # Authentication (Better Auth)
│       ├── road/              # Road CRUD + segment generation
│       ├── segment/           # Segment updates & pavement data
│       └── results/           # TTI calculation & reporting
└── packages/shared/           # Shared enums, schemas, types

Production Deployment

Deployed on Vercel (frontend + API) with Neon (serverless PostgreSQL). GitHub Actions handles migration checks on PRs and auto-runs migrations on merge to main.