Open-source DPR 523 compliance form builder for CRM archaeology
Project description
Acta 523
Free, open-source DPR 523 compliance form builder for Cultural Resource Management (CRM) archaeology.
Generate print-ready, SHPO-compliant California DPR 523 form packages — including Primary Records, Archaeological Site Records, Building/Structure/Object Records, Continuation Sheets, Photograph Records, Artifact Catalogs, and Location Maps — as a single multi-page PDF.
No cloud dependency, no subscription fees, no vendor lock-in. Your data never leaves your machine.
Quick Start
Prerequisites
- Python 3.13+
- Node.js 22+
Install & Run
git clone https://gitlab.com/mabodu/acta-523.git
cd acta-523
# Install Python dependencies
pip install reportlab pymupdf pyhanko pillow
# Install Node.js dependencies
npm install
# Start development server (Electron + Vite)
npm run dev
Generate a PDF via CLI
echo '{"resource_name":"CA-TEST-001","description":"Site description here...","recorder":"Dr. Jane Smith","date_recorded":"2026-06-03"}' \
| python3 src/crm_form_builder/cli.py --output output.pdf
Sign a PDF with a PAdES digital signature
echo '{...}' | python3 src/crm_form_builder/cli.py \
--output signed.pdf \
--sign --cert my_certificate.pem
Run tests
python3 -m pytest tests/ -v
Features
DPR 523 Form Suite
All 11 standard California OHP form types:
| Form | Name | Tab |
|---|---|---|
| 523A | Primary Record | ✅ |
| 523B | Building, Structure, Object | ✅ |
| 523C | Archaeological Site Record | ✅ |
| 523D | District Record | ✅ |
| 523E | Linear Feature Record | ✅ |
| 523F | Milling Station Record | ✅ |
| 523G | Rock Art Record | ✅ |
| 523H | Artifact Record (catalog) | ✅ |
| 523I | Photograph Record | ✅ |
| 523J | Location Map | ✅ |
| 523K | Sketch Map | ✅ |
PDF Generation Engine
- Auto-flow continuation sheets — long descriptions automatically overflow from the 523A Primary Record onto 523L Continuation Sheets via ReportLab's
autoNextPageTemplate. No manual page-break management. - Official form backgrounds — vector rendering of official OHP PDFs at 300 DPI via PyMuPDF. Not rasterised — pixel-perfect fidelity.
- Precise field coordinates — every field position extracted from the official PDF via automated analysis. Form fields render at their exact locations on the OHP template.
- Photo grid builder — 2-up layout with embedded images, caption blocks, auto-numbering.
- Artifact catalog — variable-row table with header repetition across pages.
- PAdES digital signatures — sign output PDFs with X.509 certificates for SHPO acceptance (requires pyHanko).
Desktop Application (Electron + React)
- Cross-platform — runs on Windows, macOS, and Linux.
- Offline-first — all data stored locally. No internet connection required.
- Project save/load — full form state saved to
.crmprojJSON files. - Photo import with EXIF extraction — date taken, GPS coordinates, camera make/model auto-populated on import.
- Interactive Location Map — USGS National Map topographic tile layer with draggable marker.
Tech Stack
| Layer | Technology |
|---|---|
| Desktop framework | Electron (stable, proven cross-platform deployment) |
| Frontend | React 19 + TypeScript + Vite |
| PDF generation | ReportLab 4.x with autoNextPageTemplate |
| Background rendering | PyMuPDF (vector, 300 DPI) |
| State management | Zustand |
| Project files | .crmproj JSON |
| Digital signatures | pyHanko (PAdES-Baseline, PKCS#11) |
| Map tiles | Leaflet + USGS National Map (public domain) |
| Code signing | OV certificate (standard cert authority) |
Architecture
┌──────────────┐
│ React UI │
│ (11 tabs) │
└──────┬───────┘
│ IPC (contextBridge)
┌──────▼───────┐
│ Electron │
│ Main Process│
└──────┬───────┘
│ spawn (stdin/stdout JSON)
┌──────▼───────┐
│ Python │
│ Sidecar │
│ (ReportLab) │
└──────┬───────┘
│ PDF bytes
┌──────▼───────┐
│ OHP-compliant│
│ PDF Package │
└──────────────┘
Dual-Pipeline PDF Generation
The PDF engine uses two parallel rendering strategies:
- Text pipeline — auto-flowing paragraphs via
autoNextPageTemplate. When the description field overflows the 523A page boundary, ReportLab automatically transitions to the 523L Continuation Sheet template. The continuation template references itself, so descriptions of any length are handled seamlessly. - Structured content pipeline — photo grids and artifact tables use explicit
NextPageTemplate+PageBreakfor precise layout control. These are never mixed with the auto-flow mechanism.
Research
This project was built following 12 deep-research prompts that generated 14 research reports covering:
- DPR 523 form field-by-field analysis
- Western US SHPO landscape (CA, NV, AZ, OR, WA, CO, NM, TX)
- PDF generation strategies (AcroFields vs procedural vs hybrid)
- CHRIS and Smithsonian Trinomial systems
- Wildnote and competitor feature analysis
- Section 106 / NHPA integration
- Electron vs Tauri framework comparison
- Cross-domain continuation-sheet patterns (legal, VDP, CSS Paged Media, LaTeX/pdfoverlay, Typst)
- ReportLab
autoNextPageTemplatedeep dive
See docs/research-papers/ and docs/research-prompts/ for the full corpus.
Development
# Code quality
python3 -m pytest tests/ -v
# Alignment verification
python3 scripts/verify_alignment.py \
--generated test_output/my_form.pdf \
--reference assets/forms/dpr_523a_2013.pdf
# Coordinate extraction (when updating form templates)
python3 scripts/extract_precise_coords.py assets/forms/dpr_523a_2013.pdf
# Build for distribution
npm run build:vite # Frontend only
pyinstaller pyinstaller.spec # Python sidecar
npm run dist # Full desktop package
License
MIT — see LICENSE. The official DPR 523 form templates are public domain works of the State of California.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file acta_523-0.1.2.tar.gz.
File metadata
- Download URL: acta_523-0.1.2.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8a41b66b40de1ad0889158177fd5dc69e3c060ee233f891f430ab449769102b
|
|
| MD5 |
01670d6cc9601e11be6fe9cfe0b151a7
|
|
| BLAKE2b-256 |
69fcbfe27417d01eda76f89c549c2b3301efc05aa7712ced74c1940c5ea21686
|
Provenance
The following attestation bundles were made for acta_523-0.1.2.tar.gz:
Publisher:
release.yml on mabo-du/acta-523
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acta_523-0.1.2.tar.gz -
Subject digest:
b8a41b66b40de1ad0889158177fd5dc69e3c060ee233f891f430ab449769102b - Sigstore transparency entry: 1783941708
- Sigstore integration time:
-
Permalink:
mabo-du/acta-523@e0f5f673e3849fa81dc29b1d9fcd63070ce78b6e -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/mabo-du
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0f5f673e3849fa81dc29b1d9fcd63070ce78b6e -
Trigger Event:
push
-
Statement type:
File details
Details for the file acta_523-0.1.2-py3-none-any.whl.
File metadata
- Download URL: acta_523-0.1.2-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b3c76f8869146453c37c9ea4f741532fa7c64010a8831fbc50b8601f1c1b9be
|
|
| MD5 |
11a1553bb0584ef110044855a58ba790
|
|
| BLAKE2b-256 |
2ab9176f57e4964bde081b42d47906d4a5570a2842feb6801b7492c578db7e1f
|
Provenance
The following attestation bundles were made for acta_523-0.1.2-py3-none-any.whl:
Publisher:
release.yml on mabo-du/acta-523
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acta_523-0.1.2-py3-none-any.whl -
Subject digest:
0b3c76f8869146453c37c9ea4f741532fa7c64010a8831fbc50b8601f1c1b9be - Sigstore transparency entry: 1783941796
- Sigstore integration time:
-
Permalink:
mabo-du/acta-523@e0f5f673e3849fa81dc29b1d9fcd63070ce78b6e -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/mabo-du
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0f5f673e3849fa81dc29b1d9fcd63070ce78b6e -
Trigger Event:
push
-
Statement type: