# BIDS Compliance Quick Reference
**For Developers & Contributors**
---
## ๐ฏ At a Glance
**What**: PRISM Studio now enforces BIDS compliance automatically
**Where**: `app/templates/projects.html` (UI) + `app/src/web/blueprints/projects.py` (Backend)
**How**: Form โ dataset_description.json โ CITATION.cff sync โ Form reload
**Why**: Ensures metadata consistency and BIDS-app compatibility
---
## ๐ Field Categories
### REQUIRED (โ ๏ธ Will fail validation if missing)
- โ `Name`: Dataset name (MUST be provided by user)
- โ `BIDSVersion`: Auto-set to "1.10.1" (no user input)
### RECOMMENDED (โ ๏ธ Will get auto-defaults)
- ๐ก `DatasetType`: Auto-set to "raw" if missing
- ๐ก `License`: Auto-set to "CC0" if missing (unless CITATION.cff exists)
- ๐ก `HEDVersion`: Only include if you use HED tags
- ๐ก `GeneratedBy`: API-only (preserved from existing)
- ๐ก `SourceDatasets`: API-only (preserved from existing)
### OPTIONAL (No auto-defaults)
- โช `Authors`: Array of {name, email}
- โช `Keywords`: Array of strings (โฅ3 recommended)
- โช `Acknowledgements`: Free text
- โช `HowToAcknowledge`: Free text
- โช `Funding`: Array of strings
- โช `EthicsApprovals`: Array of {name, reference}
- โช `ReferencesAndLinks`: Array of URLs
- โช `DatasetDOI`: DOI URI
- โช `DatasetLinks`: Array of URLs (API-only)
---
## ๐ CITATION.cff Precedence Rules
### If CITATION.cff EXISTS:
```
dataset_description.json will NOT contain:
โ Authors
โ HowToAcknowledge
โ License
โ ReferencesAndLinks
BUT will still contain:
โ Name
โ DatasetDOI
```
### If CITATION.cff NOT FOUND:
```
dataset_description.json will contain all fields:
โ Authors
โ License (defaults to CC0)
โ HowToAcknowledge
โ ReferencesAndLinks
```
**Why?**: Avoid duplication. BIDS spec says these fields belong in CITATION.cff when it exists.
---
## ๐ข Field Type Conversions
```text
// USER INPUT in form (string) โ STORAGE in JSON (array)
"psychology, neuroscience, BIDS" โ ["psychology", "neuroscience", "BIDS"]
"NSF #123, Other Grant" โ ["NSF #123", "Other Grant"]
// RELOAD from JSON (array) โ FORM DISPLAY (string)
["psychology", "neuroscience"] โ "psychology, neuroscience"
```
**Fields that convert**: Keywords, Funding, ReferencesAndLinks
**Fields that don't**: Name, License, DatasetType, DOI, etc. (stored as strings)
---
## ๐ ๏ธ Code Locations
### Frontend Form Fields (HTML)
**File**: `app/templates/projects.html`
```html
```
**Pattern**: `` or `