# akbar3776/gwas-platform-magang-pkl architecture

> Architecture diagram of the GitHub repository akbar3776/gwas-platform-magang-pkl, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/akbar3776/gwas-platform-magang-pkl
- Repository: https://github.com/akbar3776/gwas-platform-magang-pkl

## Overview

This is a full-stack GWAS analysis platform. Researchers upload genotype, phenotype and reference data, inspect and validate inputs, launch an asynchronous 10-phase workflow, then review association results and downstream annotations, visualizations and exports. The graph separates the web client, API/workspace, analysis pipeline and post-GWAS capabilities. README documents the broad scientific stages; sampled source confirms key route-to-orchestrator wiring and task dependencies, but not every stage’s runtime calls.

Main entry points: [`backend/app/tasks/pipeline_orchestrator.py`](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/pipeline_orchestrator.py) (Pipeline orchestrator), [`frontend/src/App.jsx`](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/App.jsx) (Web application), [`backend/app/main.py`](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/main.py) (REST API), [`backend/app/api/routes/jobs.py`](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/api/routes/jobs.py) (Job and result routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Researcher interface"]
  node_webapp["Web application<br/>[App.jsx]"]
  node_auth_ui["Account access<br/>[AuthContext.jsx]"]
  node_upload_ui["Upload workspace<br/>[GwasUploadPage.jsx]"]
  node_job_ui["Job tracking<br/>[JobStatusPage.jsx]"]
  node_results_ui["Results dashboard<br/>[ResultsPage.jsx]"]
end

subgraph group_api["API and workspace"]
  node_api_service["REST API<br/>[main.py]"]
  node_auth_route["Authentication routes<br/>[auth.py]"]
  node_upload_route["Upload routes<br/>[upload.py]"]
  node_pipeline_route["Pipeline endpoint<br/>[pipeline.py]"]
  node_jobs_route["Job and result routes<br/>[jobs.py]"]
  node_data_store[("Platform database<br/>[models.py]")]
end

subgraph group_pipeline["GWAS workflow"]
  node_orchestrator["Pipeline orchestrator"]
  node_inspection["Input inspection"]
  node_normalization["VCF normalization"]
  node_quality["Quality control<br/>[qc_tasks.py]"]
  node_imputation["Genotype imputation"]
  node_structure["Population structure<br/>[structure_tasks.py]"]
  node_gwas["Association analysis<br/>[gemma_tasks.py]"]
  node_multilocus["Multi-locus analysis"]
end

subgraph group_postgwas["Results and interpretation"]
  node_postgwas_tasks["Post-GWAS processing<br/>[postgwas_tasks.py]"]
  node_annotation["Gene annotation"]
  node_go_enrichment["GO enrichment"]
  node_primer["Primer and KASP<br/>[primer_service.py]"]
end

node_researcher(("Researcher"))
node_external_tools{{"Bioinformatics tools"}}

node_researcher -->|"uses"| node_webapp
node_webapp -->|"routes through"| node_auth_ui
node_webapp -->|"routes to"| node_upload_ui
node_webapp -->|"routes to"| node_job_ui
node_webapp -->|"routes to"| node_results_ui
node_webapp -.->|"exchanges requests"| node_api_service
node_api_service -->|"registers"| node_auth_route
node_api_service -->|"registers"| node_upload_route
node_api_service -->|"registers"| node_pipeline_route
node_api_service -->|"registers"| node_jobs_route
node_auth_route -->|"reads and writes"| node_data_store
node_pipeline_route -->|"reads and writes"| node_data_store
node_pipeline_route -->|"starts workflow"| node_orchestrator
node_orchestrator -->|"dispatches"| node_inspection
node_orchestrator -->|"dispatches"| node_normalization
node_orchestrator -->|"dispatches"| node_quality
node_orchestrator -->|"dispatches"| node_imputation
node_orchestrator -->|"dispatches"| node_structure
node_orchestrator -->|"dispatches"| node_gwas
node_orchestrator -->|"dispatches"| node_multilocus
node_orchestrator -->|"dispatches"| node_postgwas_tasks
node_orchestrator -->|"dispatches"| node_annotation
node_annotation -->|"uses"| node_go_enrichment
node_annotation -->|"uses"| node_primer
node_normalization -.->|"invokes"| node_external_tools
node_quality -.->|"invokes"| node_external_tools
node_imputation -.->|"invokes"| node_external_tools
node_gwas -.->|"invokes"| node_external_tools
node_jobs_route -.->|"reads job state"| node_data_store
node_job_ui -.->|"checks status"| node_jobs_route
node_results_ui -.->|"retrieves results"| node_jobs_route

click node_webapp "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/context/AuthContext.jsx"
click node_upload_ui "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/pages/GwasUploadPage.jsx"
click node_job_ui "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/pages/JobStatusPage.jsx"
click node_results_ui "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/pages/ResultsPage.jsx"
click node_api_service "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/main.py"
click node_auth_route "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/api/routes/auth.py"
click node_upload_route "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/api/routes/upload.py"
click node_pipeline_route "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/api/routes/pipeline.py"
click node_jobs_route "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/api/routes/jobs.py"
click node_data_store "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/db/engine/models.py"
click node_orchestrator "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/pipeline_orchestrator.py"
click node_inspection "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/inspection_tasks.py"
click node_normalization "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/normalization_tasks.py"
click node_quality "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/qc_tasks.py"
click node_imputation "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/imputation_tasks.py"
click node_structure "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/structure_tasks.py"
click node_gwas "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/gemma_tasks.py"
click node_multilocus "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/multilocus_tasks.py"
click node_postgwas_tasks "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/postgwas_tasks.py"
click node_annotation "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/annotation_tasks.py"
click node_go_enrichment "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/services/go_enrichment_service.py"
click node_primer "https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/services/primer_service.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_auth_ui,node_upload_ui,node_job_ui,node_results_ui toneBlue
class node_api_service,node_auth_route,node_upload_route,node_pipeline_route,node_jobs_route,node_data_store toneAmber
class node_orchestrator,node_inspection,node_normalization,node_quality,node_imputation,node_structure,node_gwas,node_multilocus toneMint
class node_postgwas_tasks,node_annotation,node_go_enrichment,node_primer toneRose
class node_researcher,node_external_tools toneIndigo
```

## Components

### Researcher interface

- [Web application](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Account access](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Upload workspace](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/pages/GwasUploadPage.jsx): `frontend/src/pages/GwasUploadPage.jsx`
- [Job tracking](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/pages/JobStatusPage.jsx): `frontend/src/pages/JobStatusPage.jsx`
- [Results dashboard](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/frontend/src/pages/ResultsPage.jsx): `frontend/src/pages/ResultsPage.jsx`

### API and workspace

- [REST API](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication routes](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/api/routes/auth.py): `backend/app/api/routes/auth.py`
- [Upload routes](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/api/routes/upload.py): `backend/app/api/routes/upload.py`
- [Pipeline endpoint](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/api/routes/pipeline.py): `backend/app/api/routes/pipeline.py`
- [Job and result routes](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/api/routes/jobs.py): `backend/app/api/routes/jobs.py`
- [Platform database](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/db/engine/models.py): `backend/app/db/engine/models.py`

### GWAS workflow

- [Pipeline orchestrator](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/pipeline_orchestrator.py): `backend/app/tasks/pipeline_orchestrator.py`
- [Input inspection](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/inspection_tasks.py): `backend/app/tasks/inspection_tasks.py`
- [VCF normalization](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/normalization_tasks.py): `backend/app/tasks/normalization_tasks.py`
- [Quality control](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/qc_tasks.py): `backend/app/tasks/qc_tasks.py`
- [Genotype imputation](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/imputation_tasks.py): `backend/app/tasks/imputation_tasks.py`
- [Population structure](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/structure_tasks.py): `backend/app/tasks/structure_tasks.py`
- [Association analysis](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/gemma_tasks.py): `backend/app/tasks/gemma_tasks.py`
- [Multi-locus analysis](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/multilocus_tasks.py): `backend/app/tasks/multilocus_tasks.py`

### Results and interpretation

- [Post-GWAS processing](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/postgwas_tasks.py): `backend/app/tasks/postgwas_tasks.py`
- [Gene annotation](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/tasks/annotation_tasks.py): `backend/app/tasks/annotation_tasks.py`
- [GO enrichment](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/services/go_enrichment_service.py): `backend/app/services/go_enrichment_service.py`
- [Primer and KASP](https://github.com/akbar3776/gwas-platform-magang-pkl/blob/main/backend/app/services/primer_service.py): `backend/app/services/primer_service.py`

### Other components

- **Researcher**
- **Bioinformatics tools**

## Connections

- Researcher → Web application: uses (evidence: `README.md`)
- Web application → Account access: routes through (evidence: `frontend/src/App.jsx`)
- Web application → Upload workspace: routes to (evidence: `frontend/src/App.jsx`)
- Web application → Job tracking: routes to (evidence: `frontend/src/App.jsx`)
- Web application → Results dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Web application → REST API: exchanges requests (evidence: `README.md`)
- REST API → Authentication routes: registers (evidence: `backend/app/main.py`)
- REST API → Upload routes: registers (evidence: `backend/app/main.py`)
- REST API → Pipeline endpoint: registers (evidence: `backend/app/main.py`)
- REST API → Job and result routes: registers (evidence: `backend/app/main.py`)
- Authentication routes → Platform database: reads and writes (evidence: `backend/app/api/routes/auth.py`)
- Pipeline endpoint → Platform database: reads and writes (evidence: `backend/app/api/routes/pipeline.py`)
- Pipeline endpoint → Pipeline orchestrator: starts workflow (evidence: `backend/app/api/routes/pipeline.py`)
- Pipeline orchestrator → Input inspection: dispatches (evidence: `backend/app/tasks/pipeline_orchestrator.py`)
- Pipeline orchestrator → VCF normalization: dispatches (evidence: `backend/app/tasks/pipeline_orchestrator.py`)
- Pipeline orchestrator → Quality control: dispatches (evidence: `backend/app/tasks/pipeline_orchestrator.py`)
- Pipeline orchestrator → Genotype imputation: dispatches (evidence: `backend/app/tasks/pipeline_orchestrator.py`)
- Pipeline orchestrator → Population structure: dispatches (evidence: `backend/app/tasks/pipeline_orchestrator.py`)
- Pipeline orchestrator → Association analysis: dispatches (evidence: `backend/app/tasks/pipeline_orchestrator.py`)
- Pipeline orchestrator → Multi-locus analysis: dispatches (evidence: `backend/app/tasks/pipeline_orchestrator.py`)
- Pipeline orchestrator → Post-GWAS processing: dispatches (evidence: `backend/app/tasks/pipeline_orchestrator.py`)
- Pipeline orchestrator → Gene annotation: dispatches (evidence: `backend/app/tasks/pipeline_orchestrator.py`)
- Gene annotation → GO enrichment: uses (evidence: `backend/app/tasks/annotation_tasks.py`)
- Gene annotation → Primer and KASP: uses (evidence: `backend/app/tasks/annotation_tasks.py`)
- VCF normalization → Bioinformatics tools: invokes
- Quality control → Bioinformatics tools: invokes
- Genotype imputation → Bioinformatics tools: invokes
- Association analysis → Bioinformatics tools: invokes
- Job and result routes → Platform database: reads job state
- Job tracking → Job and result routes: checks status
- Results dashboard → Job and result routes: retrieves results
