RFC: OpenForm 3-Level Architecture — One Platform. Many Missions. #772
Replies: 2 comments 2 replies
|
@marcvergees The proposed architecture looks good. I'd be interested in contributing to the authentication and RBAC features. I think a good starting point would be to identify the roles and permissions required for the three initial departments (Fire, Police and EMS), as their operational responsibilities and access requirements will differ. After looking at the current backend implementation, I noticed that access control is currently based on an optional I think we could approach this incrementally:
I have previous experience implementing SSO and would be interested in contributing to this area, particularly the backend architecture, database design and authorization layer. |
|
Hi @jaya6400, Don't cre abou the FIREFORM-API-KEY stuff cuz we build it specifically so that FireForm could have been considered a DPG. It was a requirement asked by the org in order to get the tag. Thanks for bringing all this up, it's really interesting how you began thinking about this plural ecosystem with a multiple level privilege system. Our first step would definitely be implement OpenFormLib, the core python library, then we'd be releasing OpenForm, a agnostic-department tool, so that definitely we could have specialisations of this last tool: FireForm, CopForm... Since the current system is 100% local, we don't need SSO at all, but it's great that you brought it up: that means you're understanding the whole architecture. M |
Uh oh!
There was an error while loading. Please reload this page.
Discussion Category: 🏗️ Architecture / RFC
Proposed By: Core Team
Status: Open for Discussion
Target Ecosystem: FireForm, PoliceForm, EMSForm &
openform-core🧭 Executive Summary
Over the past year, FireForm demonstrated how offline-first, AI-assisted form automation can transform emergency paperwork for fire departments—reducing hours of repetitive reporting to seconds.
However, incident documentation is a universal bottleneck across all first responders. Police officers spend substantial portions of their shifts writing incident reports, narrative summaries, and state-mandated filings. Paramedics and EMTs face stringent PCR (Patient Care Report) and EMS compliance demands under tight operational deadlines.
Rather than building siloed, duplicated solutions for each vertical, we propose OpenForm: a modular, 3-Level Architecture that decouples domain-specific frontends from shared public-safety platform services, all powered by an open, standalone Python library (
openform-coreon PyPI).🏛️ The 3-Level Architecture Overview
flowchart TD subgraph L1["1. APPLICATION LEVEL (Specialized Products)"] direction LR FF["🔥 FireForm<br/>(Fire Department)"] PF["🛡️ PoliceForm<br/>(Police Department)"] EF["🚑 EMSForm<br/>(EMS / Ambulance)"] More["➕ ...<br/>(Future Services)"] end subgraph L2["2. PLATFORM LEVEL (OpenForm Platform)"] direction TB subgraph PlatformServices["Shared Platform Services & Infrastructure"] Auth["👤 User & Auth<br/>Management"] Workflow["🔀 Workflow<br/>Engine"] AIOrch["🧠 AI Orchestration<br/>& Prompts"] DocGen["📄 Document<br/>Generation"] APIInteg["🔌 API &<br/>Integrations"] Audit["🛡️ Audit &<br/>Logging"] Config["⚙️ Configuration<br/>Management"] end end subgraph L3["3. CORE LIBRARY LEVEL (openform-core PyPI Package)"] direction TB subgraph CoreModules["Reusable Core Capabilities"] PDF["📑 PDF Processing<br/>& Form Filling"] OCR["👁️ OCR & Field<br/>Detection"] LLM["🤖 AI Abstractions<br/>(LLM Layer)"] Prompts["💬 Prompt<br/>Templates"] Schemas["🗄️ Data Models<br/>& Schemas"] Utils["🛠️ Utilities<br/>& Helpers"] end end L1 -->|"Custom Workflows & Department Forms"| L2 L2 -->|"Consistent API, Multi-Tenancy & Security"| L3 External["External Integrations / Scripts"] -.->|"Direct Import"| L3🔍 Detailed Tier Breakdown
1️⃣ Level 1: Application Level (Department-Specific Products)
Tailored end-user experiences built for the specific operational reality of each emergency service.
2️⃣ Level 2: Platform Level (OpenForm Platform)
Shared platform infrastructure providing security, governance, and orchestration.
3️⃣ Level 3: Core Library Level (
openform-coreon PyPI)A headless, highly reusable Python library encapsulating core form-filling and extraction primitives.
Reusable • Tested • Versioned • Independentopenform.pdf: Low-level PDF field discovery, X-Ray bounding box coordinate mapping, widget population, and flatteners (via PyMuPDF / pdfminer / pdfme).openform.ocr: Layout analysis, handwritten dispatch audio/scan OCR, and table extraction.openform.ai: Clean provider-agnostic abstractions over local inference (faster-whisper, llama.cpp, Ollama) and external LLM APIs.openform.prompts: Validated, few-shot prompt libraries optimized for structured output extraction.openform.schemas: Pydantic models for common emergency and municipal form specifications.openform.utils: Coordinate transformations, audio preprocessing, spatial normalizers, and unit converters.openform-core, allowing researchers, CAD vendors, and third-party developers to import the core engine without deploying the full web/desktop stack:🎯 Strategic Value: One Platform. Many Missions.
faster-whisper, quantized SLMs), strict local SQLite storage, zero AI model training on public data.🗺️ Proposed Transition & Migration Plan
openform-corePyPI):FireFormbackend into a standalone packageopenform-core.OpenForm Platform, consumingopenform-core.FireFormas the flagship product for fire rescue.PoliceForm(targeting state arrest & field interview forms) andEMSForm(targeting ePCR / NEMSIS 3.5 dataset).💬 Community Questions & Discussion Points
We’d love feedback from maintainers, contributors, and active emergency service personnel:
openform-corecontain the audio/Whisper pipeline, or should audio ingestion remain a separate optional extra (e.g.,pip install openform-core[audio]) to keep the base package lightweight for pure PDF/document automation?PoliceFormandEMSForm?openformwith packages forcore,platform,fireform-app, etc.) or maintain separate repositories under theopenform-coreorganization?Please share your thoughts, architectural feedback, and feature requests below!
All reactions