Website for docket on Eliza v. MAD
Find a file
friday-bot 041fb91182 Add unique visitor total and CSV export to document access
Surfaces distinct visitors for the selected range as a headline figure, and
lets the current view be exported for use in filings without retyping.

Unique visitors are counted across the range as a whole rather than summed
per document, so one person pulling five filings counts once. Where visitor
IPs were never recorded the CSV leaves the cell blank instead of writing 0,
which would otherwise read as "nobody downloaded this".
2026-07-30 13:49:10 -06:00
.vscode Update memory bank now. 2025-10-01 21:37:41 -06:00
app Add unique visitor total and CSV export to document access 2026-07-30 13:49:10 -06:00
bootstrap Add TrustProxies middleware to fix HTTPS detection behind Caddy 2025-12-17 22:00:12 -07:00
cline_docs Update memory bank: DNS switchover complete, email notifications enabled, iPad fix deployed 2025-12-19 22:38:36 -07:00
config v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
database Add document access statistics to admin dashboard 2026-07-30 13:14:01 -06:00
docker Increase file upload limit to 500MB for large court documents 2025-12-18 10:00:04 -07:00
public v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
resources Add unique visitor total and CSV export to document access 2026-07-30 13:49:10 -06:00
routes Add unique visitor total and CSV export to document access 2026-07-30 13:49:10 -06:00
storage Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
tests v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
.dockerignore Fix .dockerignore to include .env file in Docker build 2025-12-17 20:45:39 -07:00
.editorconfig v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
.env Update Gmail app password for email notifications 2026-01-11 09:53:00 -07:00
.env.example v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
.gitattributes v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
.gitignore Add .env file to repository for deployment 2025-12-17 20:38:07 -07:00
artisan v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
Caddyfile Final v1.0 commit before v2.0 Laravel migration 2025-12-17 15:06:43 -07:00
Caddyfile.remote Fix mobile/tablet PDF viewer - enable viewing in all orientations with scrolling 2025-12-18 08:32:59 -07:00
check_v1_data.js Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
composer.json v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
DATA_COMPARISON_REPORT.md Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
DEPLOYMENT.md Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
DEPLOYMENT_EMAIL_TESTING.md Change email notifications to manual trigger 2025-12-18 10:38:07 -07:00
DNS_SWITCHOVER_INSTRUCTIONS.md Add comprehensive DNS switchover instructions for v2.0 deployment 2025-12-19 22:10:21 -07:00
docker-compose.yml Change port from 8080 to 806 to match v1 configuration 2025-12-19 22:09:32 -07:00
Dockerfile Fix nginx parent directory permissions 2025-12-18 10:52:23 -07:00
fix_sequences.php Add PostgreSQL sequence fix script 2025-12-18 10:31:54 -07:00
package.json v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
parse_sql_to_seeder.py Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
parse_sql_to_seeder_v2.py Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
PHASE3_COMPLETION_INSTRUCTIONS.md Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
phpunit.xml v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
postcss.config.js v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
README.md Increase file upload limit to 500MB for large court documents 2025-12-18 10:00:04 -07:00
seeder_data.txt Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
seeder_data_full.txt Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
tailwind.config.js v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
tsconfig.json v2.0: Laravel + Inertia + Vue foundation complete 2025-12-17 15:44:26 -07:00
update_seeder.py Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
update_seeder_v2.py Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00
vite.config.js Phase 4: Production deployment configuration 2025-12-17 19:12:32 -07:00

MAD Lawsuit Court Docket Website

A public-facing website for displaying court documents and filings for the lawsuit: Elizabeth Kragh v. Montana Association of the Deaf.

Live Site: https://v2.mad-lawsuit.org
Admin Dashboard: https://v2.mad-lawsuit.org/admin/login

📋 Project Overview

This website provides public access to court documents from an ongoing lawsuit in Montana state court. Since the Montana court system requires a licensed attorney electronic account for access, this platform ensures transparency by making all case filings, motions, exhibits, and court decisions publicly accessible.

Purpose

  • Public Transparency: Makes court proceedings accessible to anyone interested
  • Document Organization: Centralized, chronological display of all case filings
  • Real-time Updates: Email subscription system for case updates
  • Professional Presentation: Clean interface with document summaries and metadata

Target Audience

  • General public following the case
  • Legal community (attorneys, paralegals, law students)
  • Disability rights advocacy groups
  • Media and journalists
  • Researchers studying the case

🛠️ Technology Stack

Backend

  • Framework: Laravel 12.43.1
  • Language: PHP 8.3.28
  • Database: PostgreSQL 16
  • ORM: Eloquent
  • Authentication: Laravel Sanctum + Session

Frontend

  • Framework: Vue 3 with TypeScript
  • Routing: Inertia.js (SSR-like experience)
  • Styling: Tailwind CSS 3.x
  • Build Tool: Vite 7.x
  • Components: Vue Single File Components (SFC)

Infrastructure

  • Containerization: Docker with Alpine Linux
  • Web Server: nginx 1.28.0
  • PHP: PHP-FPM 8.3.28
  • Reverse Proxy: Caddy (with automatic SSL)
  • Deployment: Production server at 10.4.0.205

Features

Public Website

  • Court Docket Display: Chronological list of all court filings
  • Document Viewer:
    • Desktop: Modal PDF viewer with download option
    • Mobile: Opens PDFs in new tab (optimized for iOS Safari)
  • Email Subscriptions: Users can subscribe for case updates
  • Responsive Design: Optimized for desktop, tablet, and mobile
  • Case Information: Status, last updated date, and case details

Admin Dashboard

  • Authentication: Secure session-based login
  • Docket Entry Management: Full CRUD operations
    • Create new entries with date, title, and summary
    • Edit existing entries
    • Delete entries (cascades to associated documents)
    • View entry details
  • Document Management:
    • Upload PDF documents (500MB max)
    • UUID-based file naming for security
    • Multiple documents per docket entry
    • Delete documents
  • Subscriber Management:
    • View all subscribers (paginated, 50 per page)
    • Deactivate subscribers
    • Statistics dashboard (total, active, inactive)
  • Dashboard Statistics: Quick overview of entries, documents, and subscribers

🚀 Getting Started

Prerequisites

  • PHP 8.3+
  • Composer
  • Node.js 18+ and npm
  • PostgreSQL 16+
  • Docker (for production deployment)

Local Development Setup

  1. Clone the repository

    git clone https://gitea.sigd.net/chaulmark/mad-lawsuit.git
    cd mad-lawsuit
    
  2. Install PHP dependencies

    composer install
    
  3. Install JavaScript dependencies

    npm install
    
  4. Configure environment

    cp .env.example .env
    php artisan key:generate
    
  5. Configure database Edit .env with your PostgreSQL credentials:

    DB_CONNECTION=pgsql
    DB_HOST=127.0.0.1
    DB_PORT=5432
    DB_DATABASE=mad_lawsuit
    DB_USERNAME=your_username
    DB_PASSWORD=your_password
    
  6. Run migrations

    php artisan migrate
    
  7. Seed admin user

    php artisan db:seed --class=AdminSeeder
    
  8. Create storage symlink

    php artisan storage:link
    
  9. Start development servers

    # Terminal 1: Laravel development server
    php artisan serve
    
    # Terminal 2: Vite development server
    npm run dev
    
  10. Access the application

Production Deployment

See DEPLOYMENT.md for detailed production deployment instructions using Docker.

📁 Project Structure

├── app/
│   ├── Http/
│   │   ├── Controllers/
│   │   │   ├── Admin/          # Admin dashboard controllers
│   │   │   ├── HomeController.php
│   │   │   └── SubscriptionController.php
│   │   └── Middleware/
│   │       └── AdminAuth.php   # Admin authentication middleware
│   └── Models/
│       ├── AdminUser.php
│       ├── DocketEntry.php
│       ├── Document.php
│       └── Subscription.php
├── database/
│   ├── migrations/             # Database schema
│   └── seeders/
│       ├── AdminSeeder.php
│       └── V1DataMigrationSeeder.php
├── resources/
│   ├── js/
│   │   ├── Components/
│   │   │   └── PDFViewer.vue   # PDF modal viewer
│   │   ├── Pages/
│   │   │   ├── Home.vue        # Public homepage
│   │   │   └── Admin/          # Admin dashboard pages
│   │   └── app.ts
│   └── css/
│       └── app.css
├── routes/
│   └── web.php                 # Application routes
├── docker/                     # Docker configuration
├── cline_docs/                 # Project documentation
└── storage/
    └── app/
        └── public/
            └── documents/      # Uploaded PDF files

🔐 Security

  • Admin Authentication: Session-based authentication separate from Laravel Breeze
  • File Security: UUID-based file naming prevents direct access guessing
  • CSRF Protection: Laravel's built-in CSRF protection on all forms
  • SQL Injection: Eloquent ORM prevents SQL injection
  • XSS Protection: Vue.js automatic escaping
  • HTTPS: Automatic SSL via Caddy in production

📊 Database Schema

Tables

  • docket_entries: Court filings with date, title, summary, notes
  • documents: PDF files linked to docket entries
  • subscriptions: Email subscribers with active/inactive status
  • admin_users: Admin authentication

Relationships

  • One docket entry has many documents
  • Documents cascade delete when entry is deleted
  • Subscriptions are soft-deleted (is_active flag)

🧪 Testing

# Run PHP tests
php artisan test

# Run with coverage
php artisan test --coverage

📝 API Endpoints

Public Routes

  • GET / - Homepage with docket entries
  • POST /api/subscribe - Email subscription
  • GET /api/documents/{id}/download - Download PDF

Admin Routes (requires authentication)

  • GET /admin/login - Admin login page
  • POST /admin/login - Process login
  • POST /admin/logout - Logout
  • GET /admin/dashboard - Admin dashboard
  • Resource routes for:
    • /admin/docket-entries - Docket entry management
    • /admin/documents - Document management
    • /admin/subscribers - Subscriber management

🐛 Known Issues & Solutions

Mobile PDF Viewing

  • Issue: iOS Safari renders PDFs in iframes as single-page images
  • Solution: On screens < 768px, PDFs open in a new tab instead of modal viewer

Admin Subscribers Page

  • Fixed: Changed pagination from ->through() to ->items() to properly pass array to Vue

🤝 Contributing

This is a private project for a specific lawsuit. For questions or issues, contact the repository owner.

📄 License

Proprietary - All rights reserved.

👥 Credits

  • Development: Built with Laravel, Vue.js, and Inertia.js
  • Design: DeafGain LLC (http://deafgain.org)
  • Hosting: Self-hosted on dedicated infrastructure

📞 Support

For technical issues or questions:


Version: 2.0
Last Updated: December 2025
Status: Production Ready