How sarverott/p-jol-roll works
P_JOL_ROLL gathers Polish legal publications and related Sejm and court data, preserves raw files and tables, verifies and transforms them, then exposes the resulting law through readers, search, an API, a website, and MCP tools. The main data path is gathering → checksum sealing → compilation and text conversion → reading and search; users enter through several interfaces. The README also documents resource synchronization and durable, approval-based daily runs. Edges are limited to README statements and source-index references; unsampled wiring is not inferred.
Main entry points: routes.ts HTTP API · store.ts Resource store · seal.ts Checksum sealing · compile.ts Table compilation
Components 23
Collection and processing
- Data gathering
src/core/methods/gather.ts - Source handlers
src/core/apihandlers - Checksum sealing
src/core/methods/seal.ts - Table compilation
src/core/methods/compile.ts - Text conversion
src/core/parsing/text.ts
Law data services
- Resource store
src/core/resources/store.ts - Remote resource cache
src/core/reading/remote.ts - Dataset reader
src/core/reading/dataset.ts - Law library and maps
src/core/reading/library.ts - Debate records
src/core/reading/debates.ts - Meaning search
src/core/reading/embeddings.ts - Full-text search
src/core/search/typesense.ts
Reader interfaces
- HTTP API
src/openapi/routes.ts - Browser viewer
src/gui/index.vue - MCP tools
src/mcp/server.ts - Desktop app
src/desktop/main.js
Operations and analysis
- Daily workflows
src/workflows/flows/daily.ts - Legal analysis assistant
src/mastermind/main.ts - Act analysis and rulings
src/almanac/main.ts - Resource synchronization
src/core/resources/hub.ts
Other components
- Operator
- AI agent
- Government sources
Connections 26
- Operator → Data gathering: starts gathering
README.md - Government sources → Data gathering: provides publications
README.md - Data gathering → Source handlers: fetches records
- Operator → Checksum sealing: starts processing
README.md - Checksum sealing → Table compilation: precedes compilation
README.md - Table compilation → Text conversion: precedes conversion
README.md - Checksum sealing → Resource store: stores records
- Table compilation → Resource store: stores tables
- Text conversion → Resource store: stores markdown
- Remote resource cache → Resource store: caches files
src/core/reading/remote.ts - Dataset reader → Resource store: reads local data
src/core/reading/dataset.ts - Dataset reader → Remote resource cache: fetches missing data
src/core/reading/dataset.ts - Law library and maps → Remote resource cache: loads remote data
src/core/reading/library.ts - Law library and maps → Resource store: reads resources
src/core/reading/library.ts - AI agent → MCP tools: requests law tools
src/mcp/server.ts - HTTP API → Dataset reader: serves dataset routes
src/openapi/routes.ts - HTTP API → Law library and maps: serves map routes
src/openapi/routes.ts - HTTP API → Debate records: serves debate routes
src/openapi/routes.ts - HTTP API → Full-text search: serves search routes
src/openapi/routes.ts - HTTP API → Meaning search: serves meaning search
- Browser viewer → HTTP API: browses through
- Desktop app → HTTP API: starts local API
src/desktop/main.js - Operator → Daily workflows: approves daily runs
README.md - Operator → Resource synchronization: syncs resources
README.md - Operator → Legal analysis assistant: asks legal questions
- Operator → Act analysis and rulings: reviews acts