Court E-Filing
CaseSolo's court e-filing launch layer validates filing packages against priority jurisdiction profiles, stores filing state in case metadata, and links e-filing actions to case activity.
This is not a substitute for local court rules or attorney review. The launch validator catches technical package issues before provider submission; court-specific credentials and certified provider configuration are still required for live submission.
Runtime Surfaces
src/lib/integrations/court-bridge.tscontains the provider bridge, priority rule profiles, jurisdiction inference, and package validation.src/app/api/cases/[caseId]/efiling/route.tsexposes the case-scoped e-filing workflow.src/app/(dashboard)/cases/[caseId]/efiling/page.tsxshows filing packages, validation evidence, provider-review status, fees, service recipients, and stamped-copy status.
Supported Actions
GET /api/cases/:caseId/efilingreturns normalizedfilings, page-compatibleitems, priorityjurisdictions, and filing stats.POST action=add_filingorcreatestores a draft package and rule validation evidence.POST action=validate_rulesreruns validation and persists the latest result.POST action=submitblocks invalid packages and routes valid packages to the configured court provider. If credentials are missing, the package moves topending_reviewinstead of faking a court submission.POST action=acceptstores stamped-copy URL/document metadata and creates case activity.POST action=reject,return_doc,pay_fee,waive_fee,serve_recipient,delete, andresubmitpreserve existing dashboard workflows.
Priority Rule Profiles
Built-in technical profiles currently cover:
- Texas State Courts: eFileTexas / eFile & Serve Texas,
https://efileandservetx.zendesk.com/hc/en-us/articles/12623900877965 - California Appellate Courts: California Courts electronic appellate document guide,
https://www.courts.ca.gov/documents/DCA-Guide-To-Electronic-Appellate-Documents.pdf - New York State Courts / NYSCEF: NYSCEF technical requirements,
https://nycourts.gov/courts/ad1/E-Filing/TechnicalRequirementsEfiling.pdf - U.S. Court of Appeals for the Ninth Circuit CM/ECF: Ninth Circuit CM/ECF FAQ,
https://www.ca9.uscourts.gov/efiling/faqs/filingservice/ - Florida Courts E-Filing Portal:
https://www.myflcourtaccess.com/
Firm overrides can be supplied in Firm.settings.courtEfilingRuleProfiles. Provider credentials are configured separately in Firm.settings.courtJurisdictions.
Validation Model
Validation checks:
- Filing type and court name presence.
- Required court case number for profiles that need one.
- At least one filing document.
- Allowed MIME type, currently PDF for priority launch profiles.
- Per-document and envelope size limits.
- Electronic service recipient email presence.
- Searchable/unlocked PDF review warning where required.
Validation results are persisted on each filing as ruleValidation so support, QA, and attorneys can inspect the exact source profile and issue list used when a filing package was prepared or submitted.
Activity And Audit Trail
The route creates case activity records for:
- Filing package creation:
court_efiling.created - Live provider submission:
court_efiling.submitted - Provider configuration gap after validation:
court_efiling.provider_review_required - Court acceptance and stamped-copy capture:
court_efiling.accepted - Rejection:
court_efiling.rejected
All metadata writes use case.updateMany({ where: { id, firmId } }) to keep mutation scope tenant-safe.
Verification
Targeted coverage:
src/__tests__/lib/court-bridge.test.tssrc/__tests__/api/case-efiling-live.test.ts
Recommended local gates:
npm run test:run -- court-bridge case-efiling-live
npx eslint src/lib/integrations/court-bridge.ts 'src/app/api/cases/[caseId]/efiling/route.ts' 'src/app/(dashboard)/cases/[caseId]/efiling/page.tsx' src/__tests__/lib/court-bridge.test.ts src/__tests__/api/case-efiling-live.test.ts
npm run typecheck