Spaces:
Running
Download appflow.md from Samad14/bio-nexus-api: direct link, hf CLI and curl.
- Browser
- Download file 5.93 kB
-
https://huggingface.co/spaces/Samad14/bio-nexus-api/resolve/main/appflow.md
- Command line
-
hf download hf://spaces/Samad14/bio-nexus-api/appflow.md
-
curl -L -o appflow.md https://huggingface.co/spaces/Samad14/bio-nexus-api/resolve/main/appflow.md
appflow.md β BioFlow AI Application Flow
1. Two Tracks β Both shipped
- Prototype Track (Days 1β18): one golden path β Sequence In β BLAST β AI-interpreted report. β
- Full Build Track: additional operations, pipeline chaining, learning section, projects. β
2. Sitemap (Current)
/ Landing (DNA-helix hero, bento features, pipeline route)
/analyze Tool catalog β operation cards (all active)
/analyze/[tool] Individual tools: blast, alignment, pairwise, compare, docking, domains, function, interactions, md, pathway, phylo, primers, sequencing, structure, uniprot, admet
/wizard Pipeline wizard (8-step: BLAST β UniProt β MSA β Phylo β Domains β Pathway β AlphaFold β AI)
/jobs Job history (guest + authed)
/jobs/[jobId] Processing β Results (shareable, persistent)
/results/[jobId] Unified results page
/report/[jobId] PDF/JSON report export
/learn Documentation (10+ topic pages + glossary)
/settings Profile, guestβaccount upgrade, API key management, tutorial replay
/auth/* Sign-up / sign-in (triggered from guest banner)
3. Screen-by-Screen
3.1 Landing (/)
- Hero with a live "typewriter" sequence animation (see design.md Β§6).
- Single CTA: Analyze a Sequence β
/analyze. No login wall.
3.2 Wizard Step 1 β Choose Operation (/analyze)
- Grid of operation cards. All cards active: BLAST, Pairwise, MSA, Phylo, Domains, Pathway, Structure, Docking, MD, ADMET, Function, Interactions, Primers, Sequencing, UniProt.
- State:
selectedOperation: 'blast' | 'pairwise' | ... | null
3.3 Wizard Step 2 β Provide Input (/analyze/blast)
- Two tabs:
- Paste Sequence β textarea, client-side FASTA validation, auto-detects nucleotide vs. protein (composition heuristic).
- Fetch by Accession β text input β backend calls NCBI
efetchβ returns sequence + metadata for the user to confirm before proceeding.
- Database/program auto-suggested from detected type (
blastp/nrfor protein,blastn/ntfor nucleotide), with an Advanced disclosure for manual override. - State:
inputMode,rawInput,detectedType,advancedParams
3.4 Wizard Step 3 β Confirm & Run
- Plain-English summary card: "We'll run a blastp search of your 142-aa protein against the nr database."
- Run Analysis β
POST /jobs(status:queued) β redirect to/jobs/[id].
3.5 Job Page β Processing State (/jobs/[id])
- Polls
GET /jobs/{id}every 3s. - Step states:
queuedβsubmitted_to_ncbiβpolling_ncbiβparsingβinterpretingβcomplete|failed. - Each state has friendly copy + expectation-setting: "Usually 30sβ3min depending on NCBI load."
- This page is the persistence guarantee: closing the tab and returning to the same URL later shows the saved result β no "session expired" dead end.
- Guest banner: "This result is saved for 24 hours. Create a free account to keep it forever."
3.6 Job Page β Results State
- AI Summary (always visible, top) β 2β3 sentence plain-English overview.
- Top Hits Table β accession, description, % identity, E-value, bit score; rows expandable.
- Visual Score Bar β top 10 hits, color-coded by confidence band (design.md Β§2.4).
- Alignment View β monospace, matched regions highlighted, for the top hit.
- "What does this mean?" expandables next to E-value / bit score / % identity β contextual instruction, not a separate manual.
- Export β "Copy as report" now; PDF export in Phase 1.
3.7 Guest β Account Conversion
- Triggered from the banner (3.5/3.6) or "Save to Dashboard."
- Implementation: Supabase anonymous auth (already active from first visit) β upgrade via
linkIdentitywhen the user adds email/password. Sameuser_id, zero data migration. - Post-conversion: redirect back to the same
/jobs/[id], banner disappears permanently.
3.8 Dashboard (/dashboard)
- Job cards: operation type, input snippet, status, date β click through to
/jobs/[id]. - Empty state: "Run your first analysis" β
/analyze.
4. Job Lifecycle (drives 3.5 + 3.8)
| Step status | User-facing label | Typical duration |
|---|---|---|
queued |
"Queued" | < 1s |
submitted_to_ncbi |
"Submitted to NCBI BLAST" | instant |
polling_ncbi |
"NCBI is searching β this can take a minute" | 30sβ5min |
parsing |
"Reading results" | < 5s |
interpreting |
"Writing your explanation" | 5β15s |
complete |
results render | β |
failed |
error state + retry button | β |
5. Full Build Additions (originally "not in prototype") β β All shipped
- Operation catalog expands: UniProt annotation, PDB structure + Mol* 3D viewer, pairwise alignment, Clustal Omega MSA, Reactome/WikiPathways lookup β β plus docking, MD, ADMET, function, interactions, primers, sequencing
- Pipeline chaining: Wizard builds a step sequence (BLAST β UniProt β MSA β Phylo β Domains β Pathway β AlphaFold β AI), each step a
job_stepsrow linked viaparent_job_idβ (pipeline v2 engine) /learndocumentation section (generated from the same explanation content used in Β§3.6.5 β write once, reuse) β- Onboarding tutorial (first-run modal series) β
- "Projects" β group related jobs π (jobs/dashboard shipped; grouping not yet)
/settingsβ (profile, guestβaccount, API keys, tutorial replay)