How tenkamylove/sistem-pencarian-pasal works
P3H Kemenkum Kalsel is a web application for finding statutory articles and supporting regional-draft harmonization. Users search indexed regulations by text, sector, and jurisdiction, inspect legal-status details and source-document links, and staff manage meeting schedules; administrators also manage accounts. A regulation-ingestion workflow accepts a URL, extracts regulation and article data, and stores it for search. The graph follows the sampled server, search, schedule, authentication, database, crawler, and recrawl code; account-management and ingestion routes are represented from documented capabilities and tree paths where their route implementations were not sampled.
Main entry points: src/index.ts Hono server · db/index.ts Application database · search.tsx Search routes · auth.ts Session and roles
Components 16
Web application
- Hono server
src/index.ts - Shared layout
src/views/layout.tsx - Application database
src/db/index.ts
Identity and access
- Login routes
src/routes/auth.tsx - Session and roles
src/middleware/auth.ts - Account management
src/routes/admin.tsx
Regulation search
- Search routes
src/routes/search.tsx - Search interface
src/views/search.tsx - Add regulation routes
src/routes/tambah-peraturan.tsx - Regulation entry form
src/views/tambah-peraturan.tsx - URL crawler
src/scraper/urlCrawler.ts - Link health check
src/scraper/recrawl.ts
Harmonization operations
- Schedule routes
src/routes/jadwal.tsx - Schedule interface
src/views/jadwal.tsx
Other components
- Public and staff
- Legal document portals
Connections 27
- Public and staff → Hono server: send requests
- Hono server → Login routes: dispatches
- Hono server → Search routes: dispatches
- Hono server → Schedule routes: dispatches
- Hono server → Account management: dispatches
- Hono server → Add regulation routes: dispatches
- Hono server → Link health check: runs cron check
- Login routes → Session and roles: reads and sets sessions
- Login routes → Application database: reads accounts
- Account management → Session and roles: checks roles
- Account management → Application database: manages accounts
- Search routes → Session and roles: allows guests
- Search routes → Application database: queries regulations
- Search routes → Search interface: renders results
- Search interface → Search routes: requests filtered results
- Search interface → Shared layout: uses shell
- Schedule routes → Session and roles: requires staff
- Schedule routes → Application database: reads and writes schedules
- Schedule routes → Schedule interface: renders schedules
- Schedule interface → Shared layout: uses shell
- Add regulation routes → Session and roles: checks access
- Add regulation routes → Regulation entry form: renders form
- Regulation entry form → Shared layout: uses shell
- Add regulation routes → URL crawler: submits URL
- URL crawler → Legal document portals: fetches pages
- URL crawler → Application database: stores regulations and articles
- Link health check → Application database: checks and updates links