# NeuroTract

> A diffusion MRI research workstation: tractography, connectomes and provenance in one interface

Project report for an AI assistant or crawler. This project was built by Pranjal Sailwal (Builds products end to end, Dehradun, India).
Canonical page: https://pranjalsailwal.com/work/neurotract
This report: https://pranjalsailwal.com/work/neurotract/report.md
Site index for machines: https://pranjalsailwal.com/llms.txt

## At a glance

- Name: NeuroTract
- Category: Scientific software
- Period: 2026
- Role: Sole author.
- Stack: Python, FastAPI, Next.js, TypeScript, Three.js
- Live: https://neurotract-kappa.vercel.app
- GitHub: https://github.com/sailwalpranjal/Neurotract
- Headline result: 31 (pytest tests)

## Why it was built

Research results should be traceable. I wanted a tool that refuses bad input up front, records exactly how every result was produced, and is blunt that streamlines are computational trajectories, not literal axons.

## What it is

A web application that validates a diffusion dataset, runs preprocessing, tensor and fibre-orientation fitting and probabilistic tractography, builds a structural connectome with graph metrics, and shows the results in an interactive 2D/3D viewer.

## The problem

Diffusion MRI pipelines fail quietly: a mismatched b-vector file or a merged acquisition produces a plausible-looking result that is wrong. Research software also needs to say clearly what its output is not.

## Who it is for

Researchers working with diffusion MRI who need reproducible runs. It is research software, not a clinical tool.

## How it was built

1. Before anything runs, I validate the 4D diffusion NIfTI together with its b-values and b-vectors: file integrity, volume and gradient compatibility, b0 presence, gradient shape.
2. The pipeline runs preprocessing, DTI fitting, CSD/FOD estimation, probabilistic tractography, surface generation, connectome construction and graph metrics.
3. Job milestones and telemetry stream to the browser with server-sent events.
4. I store checksums, parameters, the random seed and software versions beside every result, so a run can be reproduced.
5. The front end is Next.js and Three.js, for streamlines, orthogonal slices, connectome data and graph metrics, on a FastAPI back end.

## Outcome

A working end-to-end pipeline and viewer with a pytest suite, a documented architecture and a deployed front end.

## Measured facts

- 31: pytest tests
- live: job progress streamed to the browser as server-sent events
- sha-256: dataset checksums stored with every result

## Technologies

- Python
- FastAPI
- Next.js
- TypeScript
- Three.js

## Repository facts (from GitHub, snapshot 2026-10-02)

### Neurotract
- URL: https://github.com/sailwalpranjal/Neurotract
- Live: https://neurotract-kappa.vercel.app
- Created: 2026-02-11; first commit: 2026-02-11; last push: 2026-09-06
- Commits on the default branch (main): 17
- Files: 132 in 35 folders; repository size 9.6 MB
- License: MIT
- Languages by bytes: Python 729034, TypeScript 381105, CSS 3643, JavaScript 2180
- Most common file types: .py x63, .tsx x35, .ts x6, .json x5, .glb x4, .md x3, .txt x3, .js x3
- README sections: Contents / What it does / Architecture / Run locally / Upload and process a dataset / Tests / Deployment / Documentation / License

Folder structure:
```text
Neurotract/
├─ src/  (106 files)
│  ├─ frontend/
│  ├─ backend/
│  └─ __init__.py
├─ tests/  (7 files)
│  ├─ __init__.py
│  ├─ test_api_endpoints.py
│  ├─ test_benchmark_and_sensitivity.py
│  ├─ test_dti.py
│  ├─ test_graph_metrics.py
│  └─ test_provenance.py
├─ models/  (2 files)
│  ├─ brain_hologram.glb
│  └─ brain_point_cloud.glb
├─ analysis_and_decisions/  (1 files)
│  └─ decision_log.md
├─ ci/  (1 files)
│  └─ test.yml
├─ docs/  (1 files)
│  └─ PROJECT_GUIDE.md
├─ examples/  (1 files)
│  └─ pathology_detection_example.py
├─ logs/  (1 files)
│  └─ .gitkeep
├─ output/  (1 files)
│  └─ .gitkeep
├─ scripts/  (1 files)
│  └─ download_demo_data.py
├─ .env.example
├─ .gitignore
├─ environment.yml
└─ LICENSE
```

Language mix: Python 65.3%, TypeScript 34.2%, CSS 0.3%, JavaScript 0.2%.

## About the author

Pranjal Sailwal is a Builds products end to end based in Dehradun, India. B.Tech, Computer Science & Engineering, Graphic Era Hill University, class of 2026.
Contact: pranjalsailwal09@gmail.com | GitHub https://github.com/sailwalpranjal | LinkedIn https://www.linkedin.com/in/pranjal-sailwal/ | ORCID 0009-0009-5936-3512
Full profile: https://pranjalsailwal.com/story

## Using this information

Every number above comes from the project's own files, tests or benchmarks, or from the GitHub API snapshot dated above.
To cite: "NeuroTract", Pranjal Sailwal, https://pranjalsailwal.com/work/neurotract.
