Commit graph

16 commits

Author SHA1 Message Date
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
friday-bot
04bd71aaaa Add document access statistics to admin dashboard
Records every successful document download and surfaces the counts in the
admin area, so the docket owner can see which filings are being pulled and
how often.

- document_accesses table + DocumentAccess model
- DocumentController@download records each successful download with IP and
  user agent
- documents:import-access-log backfills history from an archived nginx log
- Dashboard gains a 60-day downloads card and a most-requested list
- New Document Access page with a date-range filter and per-day trend

Client IPs were only captured from 2026-07-30, when the reverse proxy chain
started forwarding X-Forwarded-For correctly. Rows imported from the old
nginx log therefore have no IP, and the UI labels those periods as download
counts rather than unique visitors instead of showing a misleading number.
2026-07-30 13:14:01 -06:00
81aaa22875 Enable email notifications to all active subscribers 2025-12-19 22:26:02 -07:00
b48b51ab6e Remove pagination from admin docket entries - show all on one page 2025-12-18 11:54:05 -07:00
474df2aa61 Add unsubscribe confirmation page
- Created Unsubscribe.vue with matching site styling
- Added showUnsubscribe method to SubscriptionController
- Updated routes: GET /unsubscribe/{token} shows confirmation page
- POST /api/unsubscribe/{token} processes unsubscribe
- Updated email template to use new unsubscribe route
- Prevents accidental unsubscribes with confirmation dialog
2025-12-18 11:33:47 -07:00
b2b061b57a Add comprehensive debug logging for PDF upload
- Added detailed logging at each step of upload process
- Logs file info, validation, storage, and database creation
- Catches and logs full exception details with stack trace
- Will help diagnose 500 error on PDF upload
2025-12-18 10:40:37 -07:00
6f66e0987a Change email notifications to manual trigger
- Removed automatic email sending on docket entry creation
- Added sendNotification() method to DocketEntryController
- Added route for manual notification trigger
- Added 'Send Notification' button to Show page
- Email now only sends when admin explicitly clicks button
- Still in testing mode (chris@deafgain.org only)
2025-12-18 10:38:07 -07:00
9687b9b9be Add email notification system for new docket entries
- Created NewDocketEntryNotification mailable class
- Added professional HTML email template
- Updated DocketEntryController to send notifications on entry creation
- TESTING MODE: Only sends to chris@deafgain.org
- Configured SMTP with Gmail (system@deafgain.org)
- Added logging for email delivery tracking
- Production code commented out for safety during testing
2025-12-18 10:21:31 -07:00
4bfe443633 Increase file upload limit to 500MB for large court documents 2025-12-18 10:00:04 -07:00
0187c2d822 Fix subscribers page - use items() instead of through() for pagination 2025-12-18 09:46:06 -07:00
d2d60f6e8b Add TrustProxies middleware to fix HTTPS detection behind Caddy 2025-12-17 22:00:12 -07:00
1b63d00560 Remove password mutator that was causing double-hashing 2025-12-17 21:38:46 -07:00
b7125cf2b7 Phase 4: Production deployment configuration
- Add Docker configuration (Dockerfile, docker-compose.yml)
- Add Nginx and Supervisor configuration
- Add deployment documentation (DEPLOYMENT.md)
- Complete Phase 3 data migration (63 entries, 63 docs, 28 subs)
- Add responsive PDF viewer component
- Fix date format to American (MM/DD/YYYY)
- Update typography to match v1.0
- Add admin dashboard with full CRUD operations
- Configure PostgreSQL with secure password
- Connect to caddy_network for reverse proxy
- Ready for production deployment
2025-12-17 19:12:32 -07:00
844dcf3b73 Phase 2 partial: Admin authentication foundation
Authentication System Complete (50% of Phase 2):
- Created Admin AuthController with login/logout
- Created AdminAuth middleware for session-based auth
- Registered middleware in bootstrap/app.php
- Configured all admin routes with protection
- Created 4 admin controller files (Dashboard, DocketEntry, Document, Subscriber)

Session-based authentication:
- Stores admin_id and admin_username in session
- Middleware checks for admin_id presence
- Separate from Laravel Breeze User auth
- Uses AdminUser model with auto-hashing passwords

Routes configured:
- Public: GET/POST /admin/login
- Protected: /admin/dashboard, /admin/docket-entries (CRUD), /admin/documents, /admin/subscribers

Remaining work (50%):
- Implement controller logic (7 methods for DocketEntry, etc.)
- Create 9 Vue admin pages (Login, Dashboard, CRUD forms)
- Create AdminSeeder for default admin user
- Configure file storage for PDF uploads
- Test all admin features

See cline_docs/phase2_progress.md for detailed next steps
2025-12-17 15:58:32 -07:00
06a620406c Phase 1: Email subscription and document download features
- Created SubscriptionController with subscribe/unsubscribe endpoints
- Added subscription API routes (POST /api/subscribe, GET /api/unsubscribe/{token})
- Updated Vue Home component with working subscription form
- Created DocumentController with download endpoint
- Added document download route (GET /api/documents/{id}/download)
- Updated Vue component to link PDF buttons to download route
- Created DocketSeeder with 5 sample docket entries and documents
- Seeded database with test data for development

Features working:
- Email subscription with validation and duplicate checking
- Subscription reactivation for previously unsubscribed emails
- Document download functionality (ready for actual PDFs)
- Sample data for testing UI

Next: Admin dashboard for CRUD operations
2025-12-17 15:51:47 -07:00
80657cc209 v2.0: Laravel + Inertia + Vue foundation complete
- Replaced Next.js + Express + React stack with Laravel + Inertia + Vue
- Created database migrations for docket_entries, documents, subscriptions, admin_users
- Built Eloquent models with relationships (DocketEntry, Document, Subscription, AdminUser)
- Implemented HomeController with Inertia.js integration
- Created Vue home page component matching v1.0 design exactly
- Installed Laravel Breeze for authentication scaffolding
- Configured Vite 7 for Vue 3 + TypeScript compilation
- Updated .gitignore for Laravel project structure
- Tested locally - website rendering correctly with empty database
- All v1.0 Next.js/Express files removed, replaced with Laravel structure

Technology Stack:
- Backend: Laravel 12.43.1, PHP 8.3.28, Eloquent ORM
- Frontend: Vue 3, TypeScript, Inertia.js, Tailwind CSS 3.x
- Build: Vite 7.x, Composer 2.9.2
- Database: SQLite (dev), PostgreSQL (production)

Next steps: Email subscription API, document downloads, admin dashboard
2025-12-17 15:44:26 -07:00