{"id":31542067,"url":"https://github.com/userenigmatic/aml-case-desk","last_synced_at":"2026-05-06T02:34:12.924Z","repository":{"id":316291390,"uuid":"1062188070","full_name":"userenigmatic/aml-case-desk","owner":"userenigmatic","description":"AML case-management app (SQL Server ---- Python ------ Streamlit): triage, case actions, QA sampling, audit hash-chain, SAR exports.","archived":false,"fork":false,"pushed_at":"2025-09-23T18:06:03.000Z","size":251,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-04T11:39:51.835Z","etag":null,"topics":["anti-money-laundering","audit-trail","case-management","compliance","data-engineering","fintech","python","qa","sql-server","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/userenigmatic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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-09-22T23:42:09.000Z","updated_at":"2025-09-23T18:06:06.000Z","dependencies_parsed_at":"2025-09-23T20:11:35.843Z","dependency_job_id":"54855d81-9164-4cef-b662-560c15dbac8d","html_url":"https://github.com/userenigmatic/aml-case-desk","commit_stats":null,"previous_names":["userenigmatic/aml-case-desk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/userenigmatic/aml-case-desk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/userenigmatic%2Faml-case-desk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/userenigmatic%2Faml-case-desk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/userenigmatic%2Faml-case-desk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/userenigmatic%2Faml-case-desk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/userenigmatic","download_url":"https://codeload.github.com/userenigmatic/aml-case-desk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/userenigmatic%2Faml-case-desk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32676344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"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":["anti-money-laundering","audit-trail","case-management","compliance","data-engineering","fintech","python","qa","sql-server","streamlit"],"created_at":"2025-10-04T11:29:55.861Z","updated_at":"2026-05-06T02:34:12.919Z","avatar_url":"https://github.com/userenigmatic.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AML Case Desk: Mini Case-Management App - SQL Server \u0026 Streamlit - \n\nA compact, realistic AML case desk to demonstrate queues, case actions, QA sampling, audit exports, and SAR summaries. Built for interview-readiness and quick demos.\n\n## Features\n- Triage view with filters (owner, risk, search, include closed)\n- Case page with summary + full timeline (immutable, hash-chained)\n- Actions: assign owner, add note, set disposition (SAR/No SAR/Escalate)\n- QA tab: deterministic 10% sample of closed cases, record pass/fail\n- Exports: per-case Audit CSV + SAR summary (Markdown)\n- Synthetic dataset (users, cases, events) seeded via Faker → CSV → SQL Server\n\n---\n\n## Architecture \n\nStreamlit UI (triage | case | qa | exports)\n↕ pyodbc\nSQL Server (DB: aml_cases; tables: users, cases, case_events)\n↘ exports (CSV/MD)\nFilesystem (audit.csv, case_*.md)\n\n\n**Audit integrity**: every `case_events` row stores `event_hash = sha256(prev_hash || case_id || ts || user || action || notes || meta)`. Changing any event breaks the chain.\n\n**QA sampling**: deterministic rule `ABS(CHECKSUM(case_id)) % 10 = 0` selects ~10% of closed cases for review.\n\n---\n\n## Data Model -SQL Server-\n\n- `users(user_id PK, name, role CHECK IN ('Analyst','QA','Manager'), active BIT)`\n- `cases(case_id PK, ..., status CHECK IN ('New','In Review','Closed'), owner FK→users, disposition CHECK IN ('','No SAR','SAR','Escalate'), qa_* fields)`\n- `case_events(event_id PK, case_id FK→cases, ts, user, action, notes, meta, prev_hash, event_hash)`\n- Indices: `cases(status)`, `cases(owner)`, `case_events(case_id, ts)`\n\n---\n\n## Quickstart \n\n### 0) Prerequisites\n- Python 3.11+\n- SQL Server (local ok) + SSMS\n- ODBC Driver 17 for SQL Server (Windows usually already installed)\n- `pip install -r requirements.txt`\n\n### 1) Create the database\nOpen SSMS and run:\n```sql\nCREATE DATABASE aml_cases;\nGO\nUSE aml_cases;\nGO\n-- create the three tables; use your schema script (as built in the notebook)\n-- if you don't have it handy, import the CSVs with the SSMS Import Wizard and fix types,\n-- or create the tables and use BULK INSERT (recommended).\n\n2) Seed data -CSV -- SQL Server-\n\nUse SSMS Import Wizard or BULK INSERT (recommended to keep schema constraints):\n\nBULK INSERT users\nFROM 'C:\\\\Temp\\\\users.csv'\nWITH (FIRSTROW=2, FIELDTERMINATOR=',', ROWTERMINATOR='0x0a', CODEPAGE='65001');\n\nBULK INSERT cases\nFROM 'C:\\\\Temp\\\\cases.csv'\nWITH (FIRSTROW=2, FIELDTERMINATOR=',', ROWTERMINATOR='0x0a', CODEPAGE='65001');\n\nBULK INSERT case_events\nFROM 'C:\\\\Temp\\\\case_events.csv'\nWITH (FIRSTROW=2, FIELDTERMINATOR=',', ROWTERMINATOR='0x0a', CODEPAGE='65001');\n\n3) Configure \u0026 run the app\n\nOpen app/streamlit_app.py and confirm the connection string:\n\nServer=localhost\\\\SQLEXPRESS; Database=aml_cases; Trusted_Connection=yes;\nRun:\n\n# mac/linux\n./run.sh\n# windows powershell\n./run.ps1\n\n\nYour browser opens at http://localhost:8501.\n\nHow to use the app\nTriage\n\nFilter by owner, risk, search; toggle “include closed”; control row limit.\n\nCopy a case_id and jump to Case.\n\nCase\n\nEnter case_id. See summary + timeline.\n\nActions:\n\nAssign owner → emits assign event\n\nAdd note → emits note event\n\nSet disposition (No SAR/SAR/Escalate) → updates status + emits disposition event\n\nQA\n\nDeterministic 10% sample of Closed cases awaiting QA.\n\nRecord pass/fail with notes → emits qa_pass or qa_fail event.\n\nExports\n\nAudit CSV: full event trail with hash chain.\n\nSAR Summary (MD): one-pager with header, notes, QA outcome.\n\nScreenshots / GIF\n\nscreenshot\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuserenigmatic%2Faml-case-desk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuserenigmatic%2Faml-case-desk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuserenigmatic%2Faml-case-desk/lists"}