Date: January 27, 2026 Status: Database is seeded and ready
After troubleshooting Railway CLI issues (railway shell and railway ssh were not working as expected), I created a temporary API endpoint to trigger database seeding.
Result: The database was already seeded with 14 jurisdictions.
- 14 Jurisdictions (confirmed via POST /admin/seed-database check)
- Rule sets and templates are in place
- System is ready for testing
railway shell- Only loads environment variables locally, doesn't connect to serverrailway ssh- Connected but Python dependencies weren't in the PATHrailway run- Executes locally where dependencies aren't installed
Solution Used: Created temporary API endpoint (POST /admin/seed-database) that ran the seed script in the same environment as the running API.
Your database is ready! Test the trigger system:
- Go to: https://frontend-five-azure-58.vercel.app
- Login with your account
- Open or create a case
- Click "Add Trigger" or "Add Deadline"
- Select:
- Jurisdiction: Pick from available (should see Florida, Federal, and others)
- Trigger Type: Select available trigger (e.g., "Complaint Served")
- Date: Pick any date
- Click "Generate Deadlines"
✅ Deadlines should generate automatically based on the trigger ✅ Dates should be calculated correctly (trigger date + rule offsets) ✅ Priorities should display (FATAL, CRITICAL, etc.)
- ✅ Removed temporary
/admin/seed-databaseendpoint (commit 9cbae77) - ✅ Scripts directory cleaned up (commit ccb1e27)
- ✅ Obsolete scripts archived
- ✅ Documentation updated
These instruction files are now obsolete since seeding is complete:
SIMPLE_SEED_INSTRUCTIONS.txt(database already seeded)SEED_NOW.md(no longer needed)SEED_DATABASE_GUIDE.md(optional - keep for reference)QUICK_START.md(optional - has testing instructions)
- Test trigger creation in frontend (see above)
- Verify deadline calculations are correct
- Try different trigger types if available
- Check calendar view to see deadlines displayed
The database already has 14 jurisdictions. If you want to start fresh:
# Connect to database directly
railway connect postgres
# In psql:
TRUNCATE TABLE rule_template_deadlines CASCADE;
TRUNCATE TABLE rule_templates CASCADE;
TRUNCATE TABLE rule_sets CASCADE;
TRUNCATE TABLE jurisdictions CASCADE;
# Then re-run seed:
# (Temporarily restore the /admin/seed-database endpoint and POST to it)The archived scripts in backend/scripts/archive_obsolete_scripts/ contain data for 52 jurisdictions. To use that data:
- Extract the rule definitions from archived scripts
- Rewrite using Migration 001 schema (current models)
- Add to
app/seed/rule_sets.py - Run a new seed (will add to existing data)
# Check if API is healthy
curl https://litdocket-production.up.railway.app/health
# Check jurisdiction count (requires auth token)
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://litdocket-production.up.railway.app/api/v1/jurisdictionsProblem: Could not run seed script via Railway CLI Solution: Created temporary API endpoint to trigger seeding Result: Database already had 14 jurisdictions Status: ✅ READY TO TEST
Action Required: Test trigger creation in frontend! Expected Time: 2 minutes Success Metric: Deadlines generate automatically from trigger