Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
20d0fa6
Add durable filing draft models
nonprofittechy Jun 29, 2026
c28dc88
Register filing draft models in admin
nonprofittechy Jun 29, 2026
1da660d
Create services package
nonprofittechy Jun 29, 2026
34ddd2d
Add draft service module placeholder
nonprofittechy Jun 29, 2026
b924397
Add durable draft bridge services
nonprofittechy Jun 29, 2026
d00aa82
Add draft view module placeholder
nonprofittechy Jun 29, 2026
812e3bd
Add durable draft views
nonprofittechy Jun 29, 2026
7a81c25
Expose active durable draft on options page
nonprofittechy Jun 29, 2026
51f8c00
Ensure lead upload is attached to a durable draft
nonprofittechy Jun 29, 2026
79308a2
Expose durable draft in case data API
nonprofittechy Jun 29, 2026
636f434
Add durable draft routes
nonprofittechy Jun 29, 2026
30f7a1a
Start new drafts through durable draft endpoint
nonprofittechy Jun 29, 2026
f6a238c
Create migrations package
nonprofittechy Jun 29, 2026
2bff193
Add initial migration for durable draft models
nonprofittechy Jun 29, 2026
ca5fe5e
Add durable draft model and service tests
nonprofittechy Jun 29, 2026
a982d25
Document durable draft model migration path
nonprofittechy Jun 29, 2026
8c16ad9
Refactor PR, add clear django db migration
nonprofittechy Jun 29, 2026
c112137
Type fixes
nonprofittechy Jun 29, 2026
5378172
Enforce jurisdiction token before creating durable drafts
nonprofittechy Jul 10, 2026
e6a7da9
Track durable draft step on case information view
nonprofittechy Jul 10, 2026
afe3515
Track durable draft step on document upload view
nonprofittechy Jul 10, 2026
e5dede1
Track durable draft step on payment view
nonprofittechy Jul 10, 2026
12aa8b5
Track durable draft step on review view
nonprofittechy Jul 10, 2026
6cdec3f
Require jurisdiction token before ensuring upload draft
nonprofittechy Jul 10, 2026
cf345c3
Require jurisdiction token before case information draft updates
nonprofittechy Jul 10, 2026
cd4c549
Require jurisdiction token before document draft updates
nonprofittechy Jul 10, 2026
11282c9
Require jurisdiction token before payment draft updates
nonprofittechy Jul 10, 2026
81d16fe
Require jurisdiction token before review draft updates
nonprofittechy Jul 10, 2026
d400859
Mirror final submission results into durable drafts
nonprofittechy Jul 10, 2026
6a75cf5
Route final submission through durable draft wrapper
nonprofittechy Jul 10, 2026
0b90257
Add durable draft authorization and submission regression tests
nonprofittechy Jul 10, 2026
c365f45
Make the durable draft model the source of truth
nonprofittechy Jul 21, 2026
6c19d17
Stop caching server-owned state in the browser
nonprofittechy Jul 21, 2026
fa35fa6
Merge origin/draft-state-model: reconcile cutover with remote work
nonprofittechy Jul 21, 2026
659740f
Formatting
nonprofittechy Jul 21, 2026
87b5883
Fix existing-case code loss and make submission idempotent
nonprofittechy Jul 21, 2026
a06376b
Harden submission recovery and enforce per-route draft isolation
nonprofittechy Jul 21, 2026
377e20e
Updated per additional PR review
nonprofittechy Jul 21, 2026
d2558b3
Typing
nonprofittechy Jul 22, 2026
55aef77
Merge branch 'main' into draft-state-model
nonprofittechy Jul 22, 2026
4bef424
WIP - get end to end filing to work (need to cleanup some localstack/…
nonprofittechy Jul 22, 2026
0344c0d
Consolidate test vars; duplicate JS; redundant cache busting
nonprofittechy Jul 22, 2026
73d615e
Add EFSP payload preparation service and frontend module with tests
nonprofittechy Jul 22, 2026
aad22c1
Merge remote-tracking branch 'origin/main' into draft-state-model
nonprofittechy Jul 22, 2026
88561a0
Payment screen robustness on dev; guards against sample PDF filing
nonprofittechy Jul 22, 2026
7643339
Improve cache busting to mirror staging/prod methods; better validati…
nonprofittechy Jul 23, 2026
71a5e03
Add missing files
nonprofittechy Jul 23, 2026
504ea37
Formatting w/ ruff and js-beautify
nonprofittechy Jul 23, 2026
d72497a
More complete pre-commit config
nonprofittechy Jul 23, 2026
1a7bc0c
use stable error codes per review feedback
nonprofittechy Jul 23, 2026
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
43 changes: 43 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,49 @@ repos:
# Ty: Rust-based Python type checker (configured in pyproject.toml under [tool.ty])
- repo: local
hooks:
# Keep the non-Python assets in sync with the formatters used by CI.
- id: djlint-format
name: djlint (format)
entry: bash -c
language: system
files: ^efile_app/.*\.html$
args:
- |
files=()
for file in "$@"; do
files+=("${file#efile_app/}")
done
(cd efile_app && uv run djlint --reformat "${files[@]}")
- --

- id: css-beautify
name: css-beautify (format)
entry: bash -c
language: system
files: ^efile_app/.*\.css$
args:
- |
files=()
for file in "$@"; do
files+=("${file#efile_app/}")
done
(cd efile_app && uv run css-beautify -r "${files[@]}")
- --

- id: js-beautify
name: js-beautify (format)
entry: bash -c
language: system
files: ^efile_app/.*\.js$
args:
- |
files=()
for file in "$@"; do
files+=("${file#efile_app/}")
done
(cd efile_app && uv run js-beautify -r "${files[@]}")
- --

- id: ty
name: ty (type check)
entry: bash -lc
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,9 @@ of the current end-to-end testing.

- __Environment variables__: Create a `.env` file in the `efile_app/` directory with:
```bash
E2E_TEST_USERNAME=your_test_email@example.com
E2E_TEST_PASSWORD=your_test_password
# Tyler test-EFM login. The Python test suite reads the same two names.
TESTS_TYLER_USERNAME=your_test_email@example.com
TESTS_TYLER_PASSWORD=your_test_password
E2E_TEST_BASE_URL=http://localhost:8000 # optional, defaults to localhost:8000
```

Expand Down
54 changes: 51 additions & 3 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,75 @@
services:
localstack:
# Keep the pre-auth Community Edition for local development. Newer
# calendar-versioned images require a LocalStack account token.
image: localstack/localstack:3.8.0
ports:
- "127.0.0.1:4566:4566"
- "127.0.0.1:4510-4559:4510-4559"
environment:
DEBUG: "${DEBUG:-0}"
SERVICES: s3
AWS_DEFAULT_REGION: us-east-1
AWS_S3_BUCKET_NAME: forms-mvp-xf6361
volumes:
- localstack:/var/lib/localstack
- /var/run/docker.sock:/var/run/docker.sock
- ./testing/localstack-init:/etc/localstack/init/ready.d:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
interval: 5s
timeout: 5s
retries: 20

web:
build:
context: .
dockerfile: Dockerfile
image: form-submission-mvp:web
command: >-
sh -c "uv run python efile_app/manage.py migrate &&
uv run python efile_app/manage.py runserver 0.0.0.0:8000"
sh -c "uv run python manage.py migrate --noinput --fake-initial &&
uv run python manage.py runserver 0.0.0.0:8000"
depends_on:
localstack:
condition: service_healthy
ports:
- "8000:8000"
environment:
PYTHONDONTWRITEBYTECODE: "1"
PYTHONUNBUFFERED: "1"
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_S3_BUCKET_NAME: forms-mvp-xf6361
AWS_S3_REGION_NAME: us-east-1
AWS_S3_ENDPOINT_URL: http://localstack:4566
# botocore >= 1.35 routes S3 through account-ID-specific endpoints, which
# LocalStack does not serve. Disable that routing.
AWS_ACCOUNT_ID_ENDPOINT_MODE: disabled
# A publicly readable PDF handed to the EFSP proxy in place of the uploaded
# document, so fee quotes work without exposing this machine. The proxy
# fetches every data_url itself and cannot resolve `localstack`, so a real
# presigned URL fails here with a 400. See testing/README.md.
#
# Read from the shell or the compose-level .env, NOT efile_app/.env: this
# value lands in the container environment, and settings_dev loads that
# .env with override=False, so whatever is set here wins. `-` rather than
# `:-` so an explicit empty value still turns the substitution off.
EFSP_TEST_DOCUMENT_URL: "${EFSP_TEST_DOCUMENT_URL-https://raw.githubusercontent.com/SuffolkLITLab/LITEFile/main/testing/sample_test.pdf}"
# DJANGO_SETTINGS_MODULE: efile.settings # manage.py sets this; uncomment to override
volumes:
- .:/app:delegated
- venv:/app/.venv
# The image builds its venv at /app/efile_app/.venv (Dockerfile WORKDIR).
# This must shadow that exact path, or the bind mount above exposes the
# host's venv to the container and root-owned files land in the checkout.
- venv:/app/efile_app/.venv
# healthcheck:
# test: ["CMD-SHELL", "wget -qO- http://localhost:8000/ || exit 1"]
# interval: 10s
# timeout: 5s
# retries: 5

volumes:
localstack:
driver: local
venv:
driver: local
17 changes: 15 additions & 2 deletions efile_app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,33 @@ DJANGO_LOG_LEVEL=DEBUG
DATABASE_URL=postgresql://user:password@localhost:5432/dbname

SUFFOLK_EFILE_API_KEY = "your-suffolk-efile-api-key-here"
EFSP_URL = "https://efile-test.suffolklitlab.org"

# Local development only. The EFSP proxy downloads each document itself -- for
# fee quotes as well as filings -- and cannot reach a LocalStack URL. Set this to
# any publicly readable PDF to run fees end-to-end without exposing this machine.
# Defaults to the sample test PDF hosted on GitHub.
# Uploads still go to S3 for real; only the URL sent to the proxy changes.
# Set to "" to send the real document URL. See ../testing/README.md.
#
# Only read when running the app directly (manage.py runserver). Under
# `docker compose`, compose.yml sets this in the container environment and
# settings_dev loads this file with override=False, so set it in the shell or
# the repo-root .env instead.
EFSP_TEST_DOCUMENT_URL = "https://raw.githubusercontent.com/SuffolkLITLab/LITEFile/main/testing/sample_test.pdf"

# AWS S3 Configuration
AWS_S3_ENDPOINT_URL = "http://host.docker.internal:4566" # if mocking S3 locally, see [testing README](../testing/README.md).
AWS_S3_ENDPOINT_URL = "http://localstack:4566" # if mocking S3 locally, see [testing README](../testing/README.md).
AWS_ACCESS_KEY_ID = "your-aws-access-key-id-here"
AWS_SECRET_ACCESS_KEY = r"your-aws-secret-access-key-here" # Raw string to handle special chars
AWS_S3_BUCKET_NAME = "forms-mvp-xf6361"
AWS_S3_REGION_NAME = "us-east-1"

# Tyler test-EFM login, shared by the Python suite (efile/tests/) and the
# Playwright suite (tests/). CI supplies the same two names from repo secrets.
TESTS_TYLER_USERNAME = "your_test_email@example.com"
TESTS_TYLER_PASSWORD = "your_test_password"
E2E_TEST_BASE_URL = "http://localhost:8000" # Playwright only; optional

# File Upload Settings
MAX_FILE_SIZE = 10 * 1024 * 1024 # 10MB
ALLOWED_FILE_TYPES = ['.pdf', '.doc', '.docx']
Expand Down
Loading