Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.DS_Store

# Python
.venv/
**/.venv/
__pycache__/
**/__pycache__/
*.py[cod]

# Local databases
*.db

# Environment files
.env
.env.*
!.env.example
!.env.local.example

# Node
node_modules/
**/node_modules/
.next/
**/.next/

# TypeScript build cache
*.tsbuildinfo
71 changes: 71 additions & 0 deletions use-cases/ary0912/submittal-register-transmittal-builder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Submittal Register & Transmittal Packet Builder

A SuperDocs build for construction project engineers and document controllers to manage submittal requirements, review submitted product information against specifications, and create transmittal packets.

Built for the SuperDocs Round 2 assigned build: **Submittal Register and Transmittal Packet Builder.**

## What It Does

- Manages the submittal register
- Compares submitted product information against specification requirements
- Produces MATCH / DEVIATION findings with supporting evidence
- Supports human reviewer decisions
- Creates transmittal packets
- Uses SuperDocs for document editing, approval, and export
- Tracks submittal status and overdue items

## Workflow

```text
Specification Sections
Submittal Register
Submittal Received
Product vs Specification Comparison
MATCH / DEVIATION Findings
Human Review
Transmittal Packet
SuperDocs Edit
Human Approval
Final Export
```

## SuperDocs Features Used

- Document upload
- Document editing / chat instructions
- Proposed edit workflow
- Human approval
- Document export

## How to Run

See the setup instructions in the `frontend/` and `backend/` directories.

Use environment-variable placeholders for local credentials, for example:

```env
SUPERDOCS_API_KEY=your-key-here
```

Never commit real API keys, tokens, passwords, or other secrets.

## Demo

Demo video / live deployment: **To be added**

## Screenshot

![Submittal Register & Transmittal Packet Builder](screenshot.png)

## Credit

Built by **Aryan Lodha** for the SuperDocs Round 2 task.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.postgres import (
PostgresSaver,
)

from app.agents.workflow import build_graph
from app.core.config import settings


def _checkpointer_database_url(database_url: str) -> str:
"""Convert a SQLAlchemy PostgreSQL URL to a psycopg connection URL."""

return database_url.replace(
"postgresql+psycopg://",
"postgresql://",
1,
)


# ============================================================
# LANGGRAPH PERSISTENT CHECKPOINTER
# ============================================================

try:
if settings.database_url and settings.database_url.startswith("postgresql"):
_checkpointer_context = PostgresSaver.from_conn_string(
_checkpointer_database_url(settings.database_url)
)
checkpointer = _checkpointer_context.__enter__()
checkpointer.setup()
else:
checkpointer = MemorySaver()
except Exception:
checkpointer = MemorySaver()


# ============================================================
# COMPILE THE GRAPH WITH PERSISTENCE
# ============================================================

workflow = build_graph(
checkpointer=checkpointer
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
from typing import Any, TypedDict


class SubmittalState(TypedDict, total=False):

# --------------------------------------------------------
# Identifiers
# --------------------------------------------------------

project_id: str
submittal_id: str
specification_section: str
scenario: str

# --------------------------------------------------------
# Documents
# --------------------------------------------------------

specification: dict
submission: dict

# --------------------------------------------------------
# AI comparison findings
# --------------------------------------------------------

findings: list[dict]

# --------------------------------------------------------
# Human review
# --------------------------------------------------------

review_status: str
human_review: dict[str, Any]

# --------------------------------------------------------
# Downstream workflow
# --------------------------------------------------------

transmittal_id: str
current_stage: str

# --------------------------------------------------------
# Telemetry & Cost Reporting
# --------------------------------------------------------

stage_durations: dict[str, float]
operations_count: int
error: str | None

# --------------------------------------------------------
# Workflow control
# --------------------------------------------------------

retry_count: int
escalated: bool
skipped_review: bool
Loading