Download index.html from caustino/adhd: direct link, hf CLI and curl.
- Browser
- Download file 27.5 kB
-
https://huggingface.co/spaces/caustino/adhd/resolve/main/index.html
- Command line
-
hf download hf://spaces/caustino/adhd/index.html
-
curl -L -o index.html https://huggingface.co/spaces/caustino/adhd/resolve/main/index.html
27.5 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>TLMEM SNP Database Architecture & Interactive Mindmap</title> | |
| <style> | |
| :root { | |
| --bg-primary: #0d1117; | |
| --bg-secondary: #161b22; | |
| --bg-tertiary: #21262d; | |
| --border-color: #30363d; | |
| --text-main: #c9d1d9; | |
| --text-heading: #f0f6fc; | |
| --text-muted: #8b949e; | |
| --accent-blue: #58a6ff; | |
| --accent-green: #3fb950; | |
| --accent-purple: #bc8cff; | |
| --accent-orange: #d29922; | |
| --accent-red: #f85149; | |
| --code-bg: #050505; | |
| --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; | |
| --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; | |
| } | |
| * { box-sizing: border-box; margin: 0; padding: 0; } | |
| body { | |
| background-color: var(--bg-primary); | |
| color: var(--text-main); | |
| font-family: var(--font-sans); | |
| line-height: 1.6; | |
| padding: 20px; | |
| } | |
| /* Header & Layout */ | |
| header { | |
| background-color: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| border-radius: 6px; | |
| padding: 24px; | |
| margin-bottom: 24px; | |
| box-shadow: 0 4px 12px rgba(0,0,0,0.3); | |
| } | |
| h1 { color: var(--text-heading); font-size: 1.8rem; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; } | |
| .badge { | |
| font-size: 0.75rem; | |
| padding: 2px 8px; | |
| border-radius: 12px; | |
| background: var(--accent-purple); | |
| color: #000; | |
| font-weight: bold; | |
| } | |
| p.subtitle { color: var(--text-muted); font-size: 0.95rem; } | |
| /* Navigation / Tabs */ | |
| .nav-bar { | |
| display: flex; | |
| gap: 8px; | |
| margin-bottom: 24px; | |
| border-bottom: 1px solid var(--border-color); | |
| padding-bottom: 8px; | |
| } | |
| .nav-btn { | |
| background: var(--bg-secondary); | |
| color: var(--text-muted); | |
| border: 1px solid var(--border-color); | |
| padding: 8px 16px; | |
| border-radius: 6px; | |
| cursor: pointer; | |
| font-weight: 600; | |
| transition: all 0.2s ease; | |
| } | |
| .nav-btn:hover { background: var(--bg-tertiary); color: var(--text-heading); } | |
| .nav-btn.active { background: var(--accent-blue); color: #000; border-color: var(--accent-blue); } | |
| .tab-content { display: none; } | |
| .tab-content.active { display: block; } | |
| /* Cards & Containers */ | |
| .card { | |
| background-color: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| border-radius: 6px; | |
| padding: 20px; | |
| margin-bottom: 20px; | |
| } | |
| .card h2 { color: var(--accent-blue); font-size: 1.3rem; margin-bottom: 12px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; } | |
| /* Interactive ASCII Mindmap Styling */ | |
| .mindmap-container { | |
| background-color: var(--code-bg); | |
| border: 1px solid var(--border-color); | |
| border-radius: 6px; | |
| padding: 20px; | |
| font-family: var(--font-mono); | |
| font-size: 0.85rem; | |
| overflow-x: auto; | |
| white-space: pre; | |
| color: #33ff57; | |
| line-height: 1.4; | |
| box-shadow: inset 0 0 10px rgba(0,0,0,0.8); | |
| } | |
| /* Accordion Components */ | |
| .accordion { | |
| border: 1px solid var(--border-color); | |
| border-radius: 6px; | |
| margin-bottom: 12px; | |
| overflow: hidden; | |
| } | |
| .accordion-header { | |
| background-color: var(--bg-tertiary); | |
| padding: 12px 16px; | |
| cursor: pointer; | |
| font-weight: bold; | |
| color: var(--text-heading); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| user-select: none; | |
| } | |
| .accordion-header:hover { background-color: var(--border-color); } | |
| .accordion-content { | |
| padding: 16px; | |
| background-color: var(--bg-secondary); | |
| display: none; | |
| border-top: 1px solid var(--border-color); | |
| } | |
| .accordion-content.open { display: block; } | |
| /* Tables */ | |
| table { | |
| width: 100%; | |
| border-collapse: collapse; | |
| margin: 12px 0; | |
| font-size: 0.9rem; | |
| } | |
| th, td { | |
| border: 1px solid var(--border-color); | |
| padding: 10px 12px; | |
| text-align: left; | |
| } | |
| th { background-color: var(--bg-tertiary); color: var(--accent-blue); } | |
| tr:nth-child(even) { background-color: rgba(255,255,255,0.02); } | |
| /* Code Blocks */ | |
| pre code { | |
| background-color: var(--code-bg); | |
| border: 1px solid var(--border-color); | |
| border-radius: 4px; | |
| display: block; | |
| padding: 12px; | |
| font-family: var(--font-mono); | |
| font-size: 0.85rem; | |
| color: #e6edf3; | |
| overflow-x: auto; | |
| } | |
| /* Tags & Status Indicators */ | |
| .tag { | |
| display: inline-block; | |
| padding: 2px 6px; | |
| border-radius: 4px; | |
| font-size: 0.75rem; | |
| font-family: var(--font-mono); | |
| font-weight: bold; | |
| margin-right: 4px; | |
| } | |
| .tag-tier1 { background: rgba(248,81,73,0.2); color: var(--accent-red); border: 1px solid var(--accent-red); } | |
| .tag-tier2 { background: rgba(210,153,34,0.2); color: var(--accent-orange); border: 1px solid var(--accent-orange); } | |
| .tag-tier3 { background: rgba(88,166,255,0.2); color: var(--accent-blue); border: 1px solid var(--accent-blue); } | |
| .tag-tier4 { background: rgba(63,185,80,0.2); color: var(--accent-green); border: 1px solid var(--accent-green); } | |
| /* Responsive adjustments */ | |
| @media (max-width: 768px) { | |
| .nav-bar { flex-direction: column; } | |
| body { padding: 10px; } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <header> | |
| <h1>TLMEM SNP Database & Platform Architecture <span class="badge">v1.0-PQC</span></h1> | |
| <p class="subtitle">Government Education 504/LEA Platform & Gov-LLM Integration Framework</p> | |
| </header> | |
| <nav class="nav-bar"> | |
| <button class="nav-btn active" onclick="switchTab('mindmap')">ASCII Structural Mindmap</button> | |
| <button class="nav-btn" onclick="switchTab('todo')">Expanded Technical TODO</button> | |
| <button class="nav-btn" onclick="switchTab('snp-catalog')">Tier 1–4 SNP Catalog</button> | |
| <button class="nav-btn" onclick="switchTab('legal-mapping')">Legal Claim Cascades</button> | |
| <button class="nav-btn" onclick="switchTab('schema')">Database Schema & Security</button> | |
| </nav> | |
| <!-- TAB 1: ASCII MINDMAP --> | |
| <div id="mindmap" class="tab-content active"> | |
| <div class="card"> | |
| <h2>Complete Architectural Mindmap</h2> | |
| <p style="margin-bottom: 12px; color: var(--text-muted);">Comprehensive structural representation of the TLMEM system, data pipelines, security enclave, and legal generation engines.</p> | |
| <div class="mindmap-container"> | |
| ======================================================================================================================== | |
| TLMEM SNP DATABASE & GOV-LLM INTEGRATION ENGINE | |
| ======================================================================================================================== | |
| │ | |
| ┌─────────────────────────────────────────────┼─────────────────────────────────────────────┐ | |
| ▼ ▼ ▼ | |
| ┌─────────────────────────┐ ┌─────────────────────────┐ ┌─────────────────────────┐ | |
| │ Phase 0: Architecture │ │ Phase 1: Ingestion │ │ Phase 2: Security Pod │ | |
| └────────┬────────────────┘ └────────┬────────────────┘ └────────┬────────────────┘ | |
| │ │ │ | |
| ├─► Core Tiering Framework ├─► Public Catalogs ├─► GINA / HIPAA Isolation | |
| │ ├─► Tier 1: Synaptic/Dopamine │ ├─► dbSNP / ClinVar │ ├─► Physical Segregation | |
| │ ├─► Tier 2: Demontis 2023 GWAS │ ├─► PGC ADHD Meta-Analysis │ └─► FERPA Bridge Decoupling | |
| │ ├─► Tier 3: Psychometrics │ └─► PsychENCODE eQTL │ | |
| │ └─► Tier 4: Polygenic Scores │ ├─► NIST PQC Enclave | |
| │ ├─► Variant Prioritization │ ├─► ML-KEM (Kyber) | |
| ├─► Legal Trigger Mapping │ ├─► COMT, BDNF, SLC6A2 │ └─► ML-DSA (Dilithium) | |
| │ ├─► Medically Determinable (MDI) │ ├─► DAT1, DRD4, SNAP25 │ | |
| │ ├─► Rebuttal of Willfulness │ └─► ST3GAL3, MEF2C, SORCS3 │ └─► Immutable DAG Audit | |
| │ └─► 504 / § 1983 / SSA RFC │ ├─► SHA3-512 Ledger | |
| │ └─► Quality Control (QC) └─► Microsecond Timestamps | |
| └─► Target Capacity ├─► HWE Filtering (p > 1e-6) | |
| └─► 5k - 50k SNP Reference Library └─► LD Pruning (r² < 0.1) | |
| │ | |
| ┌─────────────────────────────────────────────┼─────────────────────────────────────────────┐ | |
| ▼ ▼ ▼ | |
| ┌─────────────────────────┐ ┌─────────────────────────┐ ┌─────────────────────────┐ | |
| │ Phase 3: ETL Pipeline │ │ Phase 4: Engine Modules │ │ Phase 5 & 6: Deployment │ | |
| └────────┬────────────────┘ └────────┬────────────────┘ └────────┬────────────────┘ | |
| │ │ │ | |
| ├─► VCF / Microarray Parsing ├─► 504 Accommodation Engine ├─► Validation & Testing | |
| │ └─► ANNOVAR / VEP Annotation │ ├─► Accommodation Rules Matrix │ ├─► PQC Unit Tests | |
| │ │ └─► Time Multipliers (1.5x-2.0x) │ └─► Penetration Testing | |
| ├─► Psychometric Screener Cross-Check │ │ | |
| │ ├─► WCST Perseveration Matching ├─► Gov-LLM Brief Generator └─► Continuous Maintenance | |
| │ └─► IVA-CPT Inattention Flag │ ├─► § 1983 Counts I-III ├─► Quarterly GWAS Ingestion | |
| │ │ ├─► Monell / Bad-Faith Claims └─► Public Ref Release | |
| └─► ADHD-PRS Calculator Engine │ └─► SSA RFC Form 4734-BK | |
| └─► Ancestry PC Residualization │ | |
| └─► Cascade Visualizer | |
| └─► Gene ➔ Circuit ➔ Claim | |
| ======================================================================================================================== | |
| </div> | |
| </div> | |
| </div> | |
| <!-- TAB 2: EXPANDED TODO --> | |
| <div id="todo" class="tab-content"> | |
| <div class="card"> | |
| <h2>Technical TODO & Implementation Roadmap</h2> | |
| <div class="accordion"> | |
| <div class="accordion-header" onclick="toggleAccordion(this)"> | |
| Phase 0: Planning & Scope Definition (Weeks 1–2) | |
| <span>▼</span> | |
| </div> | |
| <div class="accordion-content open"> | |
| <ul> | |
| <li><strong>Task 0.1:</strong> Finalize multi-tier taxonomy for genetic variants based on evidence strength.</li> | |
| <li><strong>Task 0.2:</strong> Establish legal mapping rules linking neurobiological phenotypes to statutory standards (§ 504, ADA Title II, 42 U.S.C. § 1983, SSA RFC).</li> | |
| <li><strong>Task 0.3:</strong> Draft System Security Plan (SSP) for GINA/HIPAA enclave isolation from school FERPA databases.</li> | |
| <li><strong>Task 0.4:</strong> Define NIST Post-Quantum Cryptography (PQC) integration targets for tokenization and signing.</li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="accordion"> | |
| <div class="accordion-header" onclick="toggleAccordion(this)"> | |
| Phase 1: Data Sourcing, Curation & Quality Control (Weeks 3–6) | |
| <span>▼</span> | |
| </div> | |
| <div class="accordion-content"> | |
| <ul> | |
| <li><strong>Task 1.1:</strong> Ingest dbSNP, ClinVar, GWAS Catalog, and PGC ADHD summary statistics (Demontis et al. 2023).</li> | |
| <li><strong>Task 1.2:</strong> Extract tissue-specific eQTL data from PsychENCODE and GTEx (Focus: DLPFC, ACC, Striatum).</li> | |
| <li><strong>Task 1.3:</strong> Perform LD pruning ($r^2 < 0.1$) and Hardy-Weinberg equilibrium filtering ($p > 10^{-6}$).</li> | |
| <li><strong>Task 1.4:</strong> Curate functional impairment tags and link each variant to specific psychometric battery deficits.</li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="accordion"> | |
| <div class="accordion-header" onclick="toggleAccordion(this)"> | |
| Phase 2: Database Schema & PQC Vault Engineering (Weeks 7–8) | |
| <span>▼</span> | |
| </div> | |
| <div class="accordion-content"> | |
| <ul> | |
| <li><strong>Task 2.1:</strong> Implement Drizzle ORM schema for PostgreSQL / TiDB (`snpReferenceLibrary`, `studentGeneticVault`).</li> | |
| <li><strong>Task 2.2:</strong> Integrate NIST ML-KEM (Kyber) for secure key encapsulation during genetic data transit.</li> | |
| <li><strong>Task 2.3:</strong> Integrate NIST ML-DSA (Dilithium) for signing all database access actions and consent records.</li> | |
| <li><strong>Task 2.4:</strong> Deploy immutable DAG audit logging ledger using SHA3-512 hashes.</li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="accordion"> | |
| <div class="accordion-header" onclick="toggleAccordion(this)"> | |
| Phase 3: Automated Ingestion Pipeline & PRS Calculator (Weeks 9–11) | |
| <span>▼</span> | |
| </div> | |
| <div class="accordion-content"> | |
| <ul> | |
| <li><strong>Task 3.1:</strong> Build automated ETL pipeline to process VCF and 23andMe microarray formats using VEP annotation.</li> | |
| <li><strong>Task 3.2:</strong> Develop ADHD Polygenic Risk Score (ADHD-PRS) computation engine with ancestry PC residualization.</li> | |
| <li><strong>Task 3.3:</strong> Create automated cross-validation module aligning genetic calls with ASRS v1.1 and CADI screeners.</li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="accordion"> | |
| <div class="accordion-header" onclick="toggleAccordion(this)"> | |
| Phase 4: Platform Engine & Gov-LLM Brief Integration (Weeks 12–14) | |
| <span>▼</span> | |
| </div> | |
| <div class="accordion-content"> | |
| <ul> | |
| <li><strong>Task 4.1:</strong> Implement 504 Plan Accommodation Generator mapping specific genotypes to classroom modifications.</li> | |
| <li><strong>Task 4.2:</strong> Build TLMEM Cascade engine converting genomic entries into multi-tiered evidence statements.</li> | |
| <li><strong>Task 4.3:</strong> Integrate Gov-LLM automated brief generator to draft legal motions under 42 U.S.C. § 1983 and SSA Appeals.</li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="accordion"> | |
| <div class="accordion-header" onclick="toggleAccordion(this)"> | |
| Phase 5 & 6: Testing, Compliance & Continuous Maintenance (Weeks 15–16+) | |
| <span>▼</span> | |
| </div> | |
| <div class="accordion-content"> | |
| <ul> | |
| <li><strong>Task 5.1:</strong> Execute penetration testing against GINA enclave and verify zero-knowledge property of token map.</li> | |
| <li><strong>Task 5.2:</strong> Perform clinical validation by benchmarking model prediction against objective WCST/IVA-CPT datasets.</li> | |
| <li><strong>Task 6.1:</strong> Establish quarterly automated ingestion of new GWAS Catalog updates and eQTL datasets.</li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- TAB 3: SNP CATALOG --> | |
| <div id="snp-catalog" class="tab-content"> | |
| <div class="card"> | |
| <h2>Curated Multi-Tier SNP Catalog</h2> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Tier</th> | |
| <th>Gene / RSID</th> | |
| <th>Allele / Genotype</th> | |
| <th>Molecular & Neurocircuit Effect</th> | |
| <th>Psychometric Impact</th> | |
| <th>Statutory Legal Claim</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td><span class="tag tag-tier1">Tier 1</span></td> | |
| <td><strong>COMT</strong><br>rs4680</td> | |
| <td>Val158Met<br>(Val/Val)</td> | |
| <td>40% increase in dopamine degradation; DLPFC hypoactivation under high stress.</td> | |
| <td>High WCST perseverative errors; N-Back degradation.</td> | |
| <td>Rebuts "willfulness"; triggers 1.5–2.0× extended test time under § 504.</td> | |
| </tr> | |
| <tr> | |
| <td><span class="tag tag-tier1">Tier 1</span></td> | |
| <td><strong>BDNF</strong><br>rs6265</td> | |
| <td>Val66Met<br>(Met/Met)</td> | |
| <td>Attenuated activity-dependent neurotrophin secretion; reduced hippocampal plasticity.</td> | |
| <td>Verbal memory consolidation failure; learning acquisition decay.</td> | |
| <td>Mandates procedural checklists, non-punitive error correction, multi-day chunking.</td> | |
| </tr> | |
| <tr> | |
| <td><span class="tag tag-tier1">Tier 1</span></td> | |
| <td><strong>SLC6A2</strong><br>rs28386840</td> | |
| <td>Promoter Variant<br>(A-Allele)</td> | |
| <td>Altered norepinephrine reuptake in LC projections to prefrontal and cingulate cortex.</td> | |
| <td>IVA-CPT sustained attention decay; high omission errors.</td> | |
| <td>Establishes MDI under SSA RFC; mandates movement breaks and sensory reduction.</td> | |
| </tr> | |
| <tr> | |
| <td><span class="tag tag-tier1">Tier 1</span></td> | |
| <td><strong>SLC6A3</strong><br>rs27072</td> | |
| <td>3'-UTR VNTR<br>(10R/10R)</td> | |
| <td>Elevated striatal dopamine transporter expression; rapid synaptic clearance.</td> | |
| <td>High commission errors (impulsivity); SST inhibition failure.</td> | |
| <td>Rebuts disciplinary suspensions; mandates Positive Behavior Support Plans (PBSP).</td> | |
| </tr> | |
| <tr> | |
| <td><span class="tag tag-tier2">Tier 2</span></td> | |
| <td><strong>ST3GAL3</strong><br>rs4987117</td> | |
| <td>Intronic Variant<br>(G-Allele)</td> | |
| <td>GWAS significant (Demontis 2023); regulates brain ganglioside sialylation.</td> | |
| <td>Global processing speed impairment on Symbol Search.</td> | |
| <td>Supports broader neurodevelopmental MDI finding in SSA disability claims.</td> | |
| </tr> | |
| <tr> | |
| <td><span class="tag tag-tier2">Tier 2</span></td> | |
| <td><strong>MEF2C</strong><br>rs1906252</td> | |
| <td>Upstream Intergenic<br>(T-Allele)</td> | |
| <td>Disrupts activity-dependent synaptic pruning during prefrontal development.</td> | |
| <td>Executive dysfunction across spatial working memory tasks.</td> | |
| <td>Supports § 1983 Monell claim establishing systemic lack of accommodations.</td> | |
| </tr> | |
| <tr> | |
| <td><span class="tag tag-tier3">Tier 3</span></td> | |
| <td><strong>SNAP25</strong><br>rs362990</td> | |
| <td>3'-UTR Variant<br>(A-Allele)</td> | |
| <td>Altered SNARE complex assembly and presynaptic exocytosis kinetics.</td> | |
| <td>Elevated Stroop interference effect; cognitive overload.</td> | |
| <td>Triggers single-concept presentation accommodations and oral exam exemptions.</td> | |
| </tr> | |
| <tr> | |
| <td><span class="tag tag-tier4">Tier 4</span></td> | |
| <td><strong>ADRA2A</strong><br>rs1800544</td> | |
| <td>Promoter Variant<br>(C-Allele)</td> | |
| <td>Protective variant; enhances alpha-2A adrenoceptor postsynaptic signaling.</td> | |
| <td>Buffering against stress-induced executive collapse.</td> | |
| <td>Used in PRS calculations to establish overall resilience and modifier indices.</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- TAB 4: LEGAL MAPPING --> | |
| <div id="legal-mapping" class="tab-content"> | |
| <div class="card"> | |
| <h2>TLMEM Evidence Cascade & Legal Claim Engine</h2> | |
| <p style="margin-bottom: 16px;">The platform translates raw genomic calls into structured legal arguments across multiple statutory frameworks.</p> | |
| <div class="accordion"> | |
| <div class="accordion-header" onclick="toggleAccordion(this)"> | |
| 1. Rebuttal of Willfulness & Disciplinary Defenses | |
| <span>▼</span> | |
| </div> | |
| <div class="accordion-content open"> | |
| <p><strong>Mechanistic Chain:</strong> <code>DAT1 (10R/10R)</code> + <code>COMT (Val/Val)</code> ➔ Rapid striatal/cortical dopamine clearance ➔ Severe impulse control and executive transition failure ➔ Behavioral outburst during sustained stress.</p> | |
| <p><strong>Legal Effect:</strong> Refutes allegations of intentional insubordination or "willful defiance" under LEA disciplinary proceedings. Converts disciplinary action into a mandatory manifestation determination review under IDEA / Section 504.</p> | |
| </div> | |
| </div> | |
| <div class="accordion"> | |
| <div class="accordion-header" onclick="toggleAccordion(this)"> | |
| 2. Establishment of Medically Determinable Impairment (MDI) for SSA RFC | |
| <span>▼</span> | |
| </div> | |
| <div class="accordion-content"> | |
| <p><strong>Mechanistic Chain:</strong> <code>ADHD-PRS (>95th Percentile)</code> + <code>BDNF (Met/Met)</code> ➔ Objective synaptic consolidation deficit ➔ High failure rate on standardized auditory memory batteries.</p> | |
| <p><strong>Legal Effect:</strong> Satisfies the statutory requirement for an MDI under 20 CFR § 404.1521, establishing objective biological evidence beyond self-reported symptoms on SSA Form 4734-BK.</p> | |
| </div> | |
| </div> | |
| <div class="accordion"> | |
| <div class="accordion-header" onclick="toggleAccordion(this)"> | |
| 3. Civil Rights Litigation (42 U.S.C. § 1983 & Monell Liability) | |
| <span>▼</span> | |
| </div> | |
| <div class="accordion-content"> | |
| <p><strong>Mechanistic Chain:</strong> Documented Tier 1 SNP profile ➔ Refusal of LEA to provide standard executive accommodations ➔ Direct causal link to academic/functional failure.</p> | |
| <p><strong>Legal Effect:</strong> Establishes deliberate indifference under § 1983 Count I–III and supports <em>Monell</em> claims against educational authorities for systemic failure to accommodate known neurobiological impairments.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- TAB 5: SCHEMA & SECURITY --> | |
| <div id="schema" class="tab-content"> | |
| <div class="card"> | |
| <h2>Database Schema & Cryptographic Enclave Definition</h2> | |
| <p style="margin-bottom: 12px;">Drizzle ORM TypeScript definition incorporating NIST ML-KEM and ML-DSA post-quantum protections.</p> | |
| <pre><code>import { pgTable, serial, text, varchar, integer, doublePrecision, boolean, timestamp, primaryKey, index } from 'drizzle-orm/pg-core'; | |
| // Reference Library Table (Public/Non-PII) | |
| export const snpReferenceLibrary = pgTable('snp_reference_library', { | |
| rsid: varchar('rsid', { length: 32 }).primaryKey(), | |
| geneSymbol: varchar('gene_symbol', { length: 32 }).notNull(), | |
| tierLevel: integer('tier_level').notNull(), | |
| pathwayCategory: text('pathway_category').notNull(), | |
| psychometricImpact: text('psychometric_impact').notNull(), | |
| statutoryClaimMapping: text('statutory_claim_mapping').notNull(), | |
| }); | |
| // Cryptographically Segregated Student Vault (GINA/HIPAA Enclave) | |
| export const studentGeneticVault = pgTable('student_genetic_vault', { | |
| genomicToken: varchar('genomic_token', { length: 64 }).primaryKey(), // SHA3-256 Pseudonym | |
| encryptedStudentRef: text('encrypted_student_ref').notNull(), // AES-256-GCM Ciphertext | |
| pqcKyberPublicKey: text('pqc_kyber_public_key').notNull(), // NIST ML-KEM Key | |
| pqcDilithiumSignature: text('pqc_dilithium_signature').notNull(), // NIST ML-DSA Signature | |
| consentActive: boolean('consent_active').notNull().default(false), | |
| createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(), | |
| }); | |
| // Immutable Audit Log Ledger (DAG Structure) | |
| export const immutableAuditLog = pgTable('immutable_audit_log', { | |
| logId: serial('log_id').primaryKey(), | |
| nodeHash: varchar('node_hash', { length: 128 }).notNull().unique(), // SHA3-512 Hash | |
| parentHash: varchar('parent_hash', { length: 128 }).notNull(), // Ancestor Hash | |
| actionType: varchar('action_type', { length: 64 }).notNull(), | |
| timestampMs: integer('timestamp_ms').notNull(), | |
| });</code></pre> | |
| </div> | |
| </div> | |
| <script> | |
| function switchTab(tabId) { | |
| document.querySelectorAll('.tab-content').forEach(el => el.classList.remove('active')); | |
| document.querySelectorAll('.nav-btn').forEach(el => el.classList.remove('active')); | |
| document.getElementById(tabId).classList.add('active'); | |
| event.target.classList.add('active'); | |
| } | |
| function toggleAccordion(header) { | |
| const content = header.nextElementSibling; | |
| content.classList.toggle('open'); | |
| const span = header.querySelector('span'); | |
| if (span) { | |
| span.textContent = content.classList.contains('open') ? '▲' : '▼'; | |
| } | |
| } | |
| </script> | |
| </body> | |
| </html> |