{"id":43614598,"url":"https://github.com/pyrex41/tr_project","last_synced_at":"2026-02-04T12:23:44.172Z","repository":{"id":324260679,"uuid":"1096601812","full_name":"pyrex41/tr_project","owner":"pyrex41","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-14T18:13:13.000Z","size":3963,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"frontend","last_synced_at":"2025-11-14T19:23:17.553Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyrex41.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-14T17:02:47.000Z","updated_at":"2025-11-14T17:18:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pyrex41/tr_project","commit_stats":null,"previous_names":["pyrex41/tr_project"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pyrex41/tr_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrex41%2Ftr_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrex41%2Ftr_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrex41%2Ftr_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrex41%2Ftr_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrex41","download_url":"https://codeload.github.com/pyrex41/tr_project/tar.gz/refs/heads/frontend","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrex41%2Ftr_project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29084187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-04T12:23:43.414Z","updated_at":"2026-02-04T12:23:44.167Z","avatar_url":"https://github.com/pyrex41.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Legal Document Analysis - Frontend\n\nA modern, type-safe Elm frontend for analyzing legal documents with AI-powered insights.\n\n## 🚀 Features\n\n### **Dashboard**\n- Real-time statistics (Total Orders, Experts, Exclusion Rate, Citations, Word Count, Daubert Analysis)\n- AI-discovered insights with confidence scores\n- Interactive charts (bar and pie charts using elm-charts)\n- Quick search with keyword/semantic toggle\n\n### **Search**\n- Keyword and semantic search modes\n- Real-time results with relevance scoring\n- Rich result cards with metadata, expert names, and insights\n- Click-through navigation to order details\n\n### **Order Detail**\n- **Overview Tab**: Case summary, ruling type, expert field, methodologies, exclusion grounds\n- **Analysis Tab**: Key findings, strategic implications, citation context\n- **Full Text Tab**: Complete document text with readable formatting\n- **Citations Tab**: All citations with type and context\n- **Quotes Tab**: Notable quotes with copy functionality\n\n## 🛠️ Tech Stack\n\n- **Elm 0.19.1** - Type-safe functional language for robust UIs\n- **Vite 7.2.2** - Lightning-fast build tool and dev server\n- **Tailwind CSS** - Utility-first CSS via CDN\n- **elm-charts 5.0.0** - SVG-based charts\n- **elm-json-decode-pipeline** - Elegant JSON decoding\n\n## 📦 Project Structure\n\n```\nfrontend/\n├── src/\n│   ├── Main.elm                 # Application entry point, routing\n│   ├── Types.elm                # Shared types and JSON decoders\n│   ├── Api.elm                  # Backend API integration\n│   ├── Components/              # Reusable UI components\n│   │   ├── Layout.elm\n│   │   ├── SearchBar.elm\n│   │   ├── StatCard.elm\n│   │   ├── OrderCard.elm\n│   │   ├── QuoteCard.elm\n│   │   ├── Chart.elm\n│   │   └── Modal.elm\n│   └── Pages/                   # Feature pages\n│       ├── Dashboard.elm\n│       ├── Search.elm\n│       └── OrderDetail.elm\n├── index.html                   # HTML entry point\n├── vite.config.js              # Vite configuration\n├── elm.json                     # Elm dependencies\n└── package.json                 # Node dependencies\n```\n\n## 🏃 Getting Started\n\n### Prerequisites\n- Node.js 18+ and npm\n- Elm 0.19.1 (`npm install -g elm`)\n\n### Installation\n\n```bash\n# Install dependencies\nnpm install\n\n# Start development server\nnpm run dev\n```\n\nThe app will be available at `http://localhost:5173`\n\n### Building for Production\n\n```bash\n# Create optimized production build\nnpm run build\n\n# Preview production build\nnpm run preview\n```\n\n## 🔌 Backend Integration\n\nThe frontend expects a backend API at `http://localhost:8000` with the following endpoints:\n\n- `GET /api/stats` - Dashboard statistics\n- `GET /api/insights` - AI-discovered insights\n- `POST /api/search/keyword` - Keyword search\n- `POST /api/search/semantic` - Semantic search\n- `GET /api/orders` - Paginated order list\n- `GET /api/orders/:id` - Order details\n\nAPI configuration can be set via the `VITE_API_BASE_URL` environment variable.\n\n## 📊 Build Stats\n\n- **Bundle Size**: 116.08 KB (37.17 KB gzipped)\n- **Build Time**: ~500ms\n- **Zero console errors**\n- **100% type-safe** - All data validated through Elm's type system\n\n## 🎨 Styling\n\nThe application uses Tailwind CSS via CDN for rapid development with a professional Westlaw-inspired color scheme:\n\n- **Primary**: Blue-900 (#1e3a8a)\n- **Secondary**: Blue-800 (#1e40af)\n- **Accent**: Blue-500 (#3b82f6)\n\nResponsive breakpoints:\n- Mobile: \u003c 768px\n- Desktop: \u003e= 768px\n\n## 🧪 Type Safety\n\nAll API responses are decoded through Elm's type system:\n- JSON decoders ensure runtime safety\n- Compiler catches type mismatches at build time\n- RemoteData pattern for loading states\n- Exhaustive pattern matching prevents bugs\n\n## 🚦 Routing\n\n- `/` - Dashboard\n- `/search` - Search page\n- `/order/:id` - Order detail page\n\n## 📝 Development Notes\n\n- **Hot Module Replacement**: Full HMR support via Vite\n- **Type Errors**: Elm compiler provides helpful error messages\n- **No Runtime Exceptions**: Elm guarantees no runtime errors\n- **Immutable State**: All state updates are pure functions\n\n## 🔮 Future Enhancements\n\n- Pagination for search results\n- Advanced filters (date range, expert field, ruling type)\n- Export functionality (PDF, CSV)\n- Saved searches and bookmarks\n- Real-time clipboard support for quotes\n- Accessibility improvements (ARIA labels, keyboard navigation)\n- Unit tests with elm-test\n- E2E tests with Cypress\n\n## 📄 License\n\nPart of the TR Project legal document analysis system.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrex41%2Ftr_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyrex41%2Ftr_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrex41%2Ftr_project/lists"}