Skip to content

Commit 5ae086c

Browse files
committed
Merge vision brief.
Fix remaining hardcoded EFSP urls.
1 parent e89a807 commit 5ae086c

12 files changed

Lines changed: 488 additions & 20 deletions

File tree

‎docs/vision-eval-20250827.md‎

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Status Check vs Vision
2+
Based on the current codebase, here’s where things stand relative to your MVP vision.
3+
4+
## What’s in place
5+
6+
- __EFSP integration basics__
7+
- Auth/tokens in `efile/api/auth_views.py` (login/logout, Tyler token, Suffolk eFile auth).
8+
- Filing CRUD in `efile/api/filing_views.py` (list/create/update/delete via Suffolk endpoints).
9+
- Case lookup, payment accounts, profiles present in `auth_views.py` and related API views.
10+
11+
- __Expert mode form flow__
12+
- Expert form with cascading dropdowns/validation: `efile/views/expert_form.py`.
13+
- Config-driven sections: `efile/api/config_views.py` delegates to `CaseFormAPIViews` for jurisdiction-aware JSON.
14+
15+
- __YAML config system and merging__
16+
- Loader: `efile/utils/config_loader.py`.
17+
- Files: `efile/static/config/` and `efile/static/config/states/`.
18+
- Docs: `efile/static/config/README.md`.
19+
20+
- __Uploads and mapping to EFSP__
21+
- `efile/views/upload.py` implements `create_filing()` (maps session → Suffolk payload) and `upload_documents()` (S3 → Suffolk document registration), plus mock/simple upload utilities.
22+
23+
## Gaps vs Vision
24+
25+
- __Filing Flow runner (recipe-driven)__: No generalized sequence/branch/validate engine or persisted recipes for curated flows.
26+
- __Form Blocks abstraction and UI__: No explicit Form Block schema/type library and reusable UI components.
27+
- __Guided Interview__: No dedicated runner/UI for linear/branching flows with instructions/progress.
28+
- __Mapping layer formalization__: Current logic in `transform_case_data_to_filing_payload()`; needs declarative, testable mapping per recipe.
29+
- __Review & Submit__: Missing human-readable review step before submission.
30+
- __Error surfaces__: No normalization/triage with actionable guidance/retries.
31+
- __Configuration management UX__: No admin UI for non-technical authoring/editing of Blocks/Flows.
32+
- __Tests__: Limited tests for flow engine, YAML court overrides, and EFSP interactions.
33+
34+
## Recommended Next Steps (MVP-targeted)
35+
36+
1. __Introduce a Filing Flow “recipe” format (JSON/YAML)__
37+
- Minimal schema: metadata (`id`, `title`, `jurisdiction`), steps (Form Blocks), branching (`next_if`, `next_else`), validation, mapping.
38+
- Store in `efile/static/flows/{jurisdiction}/...` (DB later).
39+
40+
2. __Form Blocks library__
41+
- Block types: `text`, `textarea`, `number`, `radio`, `dropdown`, `party_selector`, `file_upload`, `date`, `checkbox`.
42+
- Reuse/standardize with `efile/static/config/base-case-types.yaml` and `states/*.yaml` for both expert and guided flows.
43+
44+
3. __Flow runner backend__
45+
- Module `efile/flow/runner.py`: load recipe, evaluate conditions, session storage, validations.
46+
- API `efile/api/flow_views.py`:
47+
- `GET /api/flows/{flow_id}` (metadata + first step)
48+
- `POST /api/flows/{flow_id}/steps/{step_id}` (submit answers → next step)
49+
- `GET /api/flows/{flow_id}/review` (summary)
50+
- `POST /api/flows/{flow_id}/submit` (create filing + documents)
51+
52+
4. __Guided Interview UI__
53+
- Single-page shell: progress, step title, instructions, renderer, Next/Back, validations, save-to-session.
54+
- Reuse `efile/static/js/*` patterns and JSON from `config_views.py`; add lightweight `flow.js` if needed.
55+
56+
5. __Mapping layer__
57+
- Move to `efile/flow/mapping.py`; recipe-aware mappings.
58+
- `transform(flow_answers, case_context) -> filing_payload`; add unit tests (name change, eviction basic).
59+
60+
6. __Review & Submit__
61+
- `GET /api/flows/{id}/review` returns a structured summary for UI.
62+
- Submit reuses `create_filing()` and document uploads when referenced by answers.
63+
64+
7. __Error handling__
65+
- Central EFSP error normalizer: categorize (auth/validation/upstream), guidance, retry suggestions.
66+
- Integrate in `upload.py` and `filing_views.py`.
67+
68+
8. __Tests__
69+
- Flow runner branching/validation; config merging for courts (e.g., `cook:cd1` vs `cook:chd1` per `efile/static/config/README.md`); mapping integration tests.
70+
71+
## Concrete Implementation Plan
72+
73+
- __Backend__
74+
- Create `efile/flow/`: `schemas.py` (dataclasses/Pydantic for Block/Step/Recipe), `runner.py`, `mapping.py`, (optional) `models.py` for persistence.
75+
- API: `efile/api/flow_views.py`. Wire URLs/permissions. Store answers in session first; DB later.
76+
77+
- __Frontend__
78+
- Add `efile/static/js/flow-runner.js`: fetch recipe/step, render, post, navigate. Reuse CSS in `efile/static/css/`.
79+
80+
- __Leverage existing pieces__
81+
- Reuse dropdown endpoints and party types via `config_views.py` and Suffolk codes.
82+
- Reuse S3 patterns from `upload.py`.
83+
84+
## Open Questions
85+
86+
- Recipes YAML (human-friendly) or JSON (browser-native)? Suggest YAML in repo + compile to JSON at runtime.
87+
- Attachments: embed file-upload blocks in steps now or upload at review step?
88+
- Initial guided flow: Illinois Name Change (best documented today)?
89+
90+
## Proposed Short Milestones
91+
92+
- __M1 (day 1-2)__: Schemas + runner skeleton (load/next/back), session storage, minimal API.
93+
- __M2 (day 3-4)__: Mapping layer + Review & Submit, integrate with `create_filing()`.
94+
- __M3 (day 5)__: Guided Interview UI MVP with 1 flow (Name Change).
95+
- __M4 (day 6)__: Tests (runner, mapping, config merging) + error normalization.
96+
97+
## Current TODOs
98+
99+
- Audit existing EFSP endpoints and config system, document gaps vs vision (in progress)
100+
- Design Form Blocks schema
101+
- Implement Filing Flow runner backend
102+
- Build Guided Interview UI
103+
- Implement mapping layer
104+
- Add Review & Submit step
105+
- Improve error handling
106+
- Add attachments support
107+
- Expand tests

‎docs/vision-eval-20250902.md‎

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# Vision Evaluation - September 2, 2025
2+
3+
## Executive Summary
4+
5+
The current Form Submission MVP demonstrates solid progress toward the vision goals, with core infrastructure in place and key user flows implemented. The app successfully implements EFSP integration, session-based data management, and a working filing flow for Illinois Adult Name Change cases. However, several vision components remain incomplete or need refinement.
6+
7+
**Overall Assessment: 70% Complete**
8+
9+
## Vision Goal Analysis
10+
11+
### ✅ **Achieved Goals**
12+
13+
#### EFSP REST API Integration
14+
- **Status**: ✅ Complete
15+
- **Implementation**: Full integration with Suffolk's EFSP API for authentication, options discovery, and filing submission
16+
- **Evidence**: Comprehensive API views in `efile/api/` directory, auth handling, dropdown population from live API data
17+
18+
#### Session Data Management
19+
- **Status**: ✅ Complete
20+
- **Implementation**: Robust session-based data storage with structured case data, party information, and file uploads
21+
- **Evidence**: Session API endpoints, data persistence across flow steps, temporary file storage
22+
23+
#### Basic Auth/Session
24+
- **Status**: ✅ Complete
25+
- **Implementation**: Django-based authentication with user registration, login/logout, and session management
26+
- **Evidence**: User registration forms, login views, session-based auth tokens
27+
28+
#### Local Deploy via Docker/Compose
29+
- **Status**: ✅ Complete
30+
- **Implementation**: Full Docker setup with compose configuration
31+
- **Evidence**: `Dockerfile`, `compose.yml`, and environment-specific settings
32+
33+
#### CI with Ruff/Ty/Pytest
34+
- **Status**: ✅ Complete
35+
- **Implementation**: GitHub Actions workflow with type checking, linting, and testing
36+
- **Evidence**: `.github/workflows/ci.yml`, pyproject.toml configuration
37+
38+
#### Illinois Adult Name Change Support
39+
- **Status**: ✅ Complete
40+
- **Implementation**: Dedicated case type configuration and form handling for Cook County Adult Name Change
41+
- **Evidence**: Case type config in `case_type_config.yml`, specialized form validation
42+
43+
### 🔄 **Partially Implemented**
44+
45+
#### Form Blocks Architecture
46+
- **Status**: 🔄 Partial (40%)
47+
- **Current State**: Basic form components exist but not as reusable, configurable blocks
48+
- **Gap**: Forms are hardcoded rather than built from composable Form Block components
49+
- **Next Steps**: Refactor forms to use configurable Form Block system
50+
51+
#### Filing Flow Runner
52+
- **Status**: 🔄 Partial (60%)
53+
- **Current State**: Linear flow exists (login → options → expert form → upload → review → submit)
54+
- **Gap**: No configuration-driven flow system; flows are hardcoded in views
55+
- **Next Steps**: Implement YAML-based Filing Flow configuration system
56+
57+
#### Review & Submit Step
58+
- **Status**: 🔄 Partial (70%)
59+
- **Current State**: Review page exists with case data summary
60+
- **Gap**: Summary could be more human-readable; needs better formatting
61+
- **Next Steps**: Enhance review page with clearer data presentation
62+
63+
#### Mapping Layer
64+
- **Status**: 🔄 Partial (50%)
65+
- **Current State**: Basic field mapping exists in forms and API calls
66+
- **Gap**: No centralized, configurable mapping system
67+
- **Next Steps**: Create declarative mapping configuration system
68+
69+
### ❌ **Missing Components**
70+
71+
#### Configuration-Driven Form Blocks
72+
- **Status**: ❌ Not Implemented
73+
- **Vision**: Small set of validated input blocks (text, select, date, address) with basic theming
74+
- **Current State**: Hardcoded Django forms
75+
- **Impact**: Non-technical users cannot configure workflows without code changes
76+
77+
#### Self-Service Filing Flow Configuration
78+
- **Status**: ❌ Not Implemented
79+
- **Vision**: Non-technical users can create/edit Filing Flows without code
80+
- **Current State**: All flows are hardcoded in Python/templates
81+
- **Impact**: Major blocker for vision goal of self-service configuration
82+
83+
#### Multiple Case Type Support
84+
- **Status**: ❌ Limited
85+
- **Vision**: Proof of feasibility for at least 2 other case types beyond Adult Name Change
86+
- **Current State**: Only Adult Name Change fully implemented
87+
- **Impact**: Cannot demonstrate system flexibility
88+
89+
#### Guided Interview Experience
90+
- **Status**: ❌ Not Implemented
91+
- **Vision**: Plain-language labels, helper text, step-by-step guidance
92+
- **Current State**: Expert form is technical and overwhelming
93+
- **Impact**: Poor user experience for self-represented litigants
94+
95+
## User Experience Assessment
96+
97+
### Current User Journey
98+
1. **Registration/Login**: ✅ Working, clean interface
99+
2. **Options Selection**: ✅ Functional but technical (expert mode only)
100+
3. **Case Details**: ✅ Working but complex form
101+
4. **Document Upload**: ✅ Functional with S3 integration
102+
5. **Review**: ✅ Basic summary provided
103+
6. **Submission**: ✅ EFSP integration working
104+
105+
### UX Gaps vs Vision
106+
- **Clarity**: Current interface is expert-focused, not beginner-friendly
107+
- **Guidance**: Lacks step-by-step guidance and plain-language instructions
108+
- **Progressive Disclosure**: Shows all options at once rather than guided flow
109+
- **Error Handling**: Basic validation exists but could be more user-friendly
110+
111+
## Technical Architecture Assessment
112+
113+
### Strengths
114+
- **Solid Foundation**: Django app with proper structure and separation of concerns
115+
- **API Integration**: Robust EFSP API integration with proper error handling
116+
- **Session Management**: Effective session-based data persistence
117+
- **Configuration Start**: Beginning of configuration system with YAML files
118+
- **Testing Infrastructure**: CI/CD pipeline with proper tooling
119+
120+
### Areas for Improvement
121+
- **Form Block Architecture**: Need composable, reusable form components
122+
- **Configuration System**: Expand YAML-based configuration for full Filing Flows
123+
- **Error Handling**: Enhance user-facing error messages and recovery flows
124+
- **UI Components**: Move toward more modular, themeable UI components
125+
126+
## Success Metrics Progress
127+
128+
### Time-to-Submit (Target: 15 minutes)
129+
- **Current**: Estimated 20-25 minutes for technical users
130+
- **Gap**: Expert form complexity adds time; needs guided flow
131+
132+
### First-Pass Acceptance (Target: ≥80%)
133+
- **Current**: Unknown (needs testing)
134+
- **Blocker**: Limited real-world testing data
135+
136+
### Self-Service Configuration (Target: Non-technical user can edit flows)
137+
- **Current**: 0% - All configuration requires code changes
138+
- **Critical Gap**: No visual or YAML-based flow configuration
139+
140+
### Fast Onboarding (Target: Quick Docker setup)
141+
- **Current**: ✅ Achieved - Docker compose setup works well
142+
143+
## Priority Recommendations
144+
145+
### High Priority (Core Vision Blockers)
146+
1. **Implement Form Block Architecture**: Create reusable, configurable form components
147+
2. **Build Filing Flow Configuration System**: YAML-based flow definitions
148+
3. **Create Guided Interview Mode**: User-friendly alternative to expert form
149+
4. **Add 2 More Case Types**: Demonstrate system flexibility
150+
151+
### Medium Priority (UX Improvements)
152+
1. **Enhance Error Handling**: Better user-facing error messages
153+
2. **Improve Review Page**: More readable data summary
154+
3. **Add Helper Text System**: Step-by-step guidance and instructions
155+
156+
### Low Priority (Polish)
157+
1. **UI Theming**: Consistent, professional styling
158+
2. **Performance Optimization**: Caching and response time improvements
159+
3. **Advanced Validation**: Cross-field and business rule validation
160+
161+
## Conclusion
162+
163+
The current MVP has established a solid technical foundation with working EFSP integration and basic filing capabilities. The core infrastructure supports the vision's goals, but the user experience and configuration flexibility need significant development to achieve the vision of self-service, guided filing flows.
164+
165+
The most critical gap is the lack of configurable Form Blocks and Filing Flows, which prevents non-technical users from creating or modifying workflows. Addressing this gap should be the top priority for the next development phase.
166+
167+
**Recommended Next Phase Focus**: Transform the current expert-mode system into a configurable, guided interview system that non-technical users can customize and self-represented litigants can easily navigate.

0 commit comments

Comments
 (0)