Learn how itemdeck loads and manages collection data.
A data source is a location from which itemdeck fetches collection data. Sources provide:
- Card item data (titles, images, metadata)
- Category definitions
- Collection configuration
- Optional theme files
Pre-configured in the application:
| Type | Description | Use Case |
|---|---|---|
| Demo | Sample collection | Testing, demonstration |
| Default | Bundled with app | Offline fallback |
Public GitHub repositories:
| Feature | Support |
|---|---|
| Public repos | Full support |
| Private repos | Not supported |
| Branch selection | Supported |
| Subdirectory paths | Supported |
Direct JSON URLs:
| Requirement | Details |
|---|---|
| Format | Valid JSON |
| CORS | Must allow cross-origin requests |
| HTTPS | Required for security |
1. Source Selection
└── User selects or app defaults to a source
2. URL Resolution
└── Convert source reference to fetch URL
└── GitHub URLs → raw.githubusercontent.com
3. Data Fetching
└── HTTP GET request
└── Handle errors, timeouts
4. Validation
└── JSON parsing
└── Schema validation
└── Required fields check
5. Data Processing
└── Join items with categories
└── Resolve image URLs
└── Apply collection settings
6. Display
└── Cards rendered in grid
└── Settings applied
Itemdeck caches data for performance:
| Cache Type | Storage | Purpose |
|---|---|---|
| Collection data | Memory | Current session |
| Images | IndexedDB | Offline access |
| Settings | localStorage | Persistence |
With image caching enabled:
- Collections load from cache when offline
- Images display from local storage
- Edits persist locally
{
"items": [/* card data */],
"categories": [/* category definitions */],
"meta": {/* collection metadata */}
}Required:
id: Unique identifiertitle: Display name
Optional:
image: URL to card imagesummary: Short descriptionverdict: Detailed textyear: Associated yearlinks: External URLsmetadata: Custom fields
id: Unique identifiertitle: Full nameshortTitle: Abbreviated namelogoUrl: Category iconcolour: Display colour
Collection-level configuration:
name: Collection titledescription: Collection summaryversion: Data versionschema: Schema type identifierdisplay: Theme/display preferencessettings: Forced and default settings
- Open Settings > Collections
- Click "Add Source"
- Enter URL and optional name
- Save and load
Click any source in the list to switch. The new collection loads immediately.
- Select source in list
- Click "Remove"
- Confirm deletion
Note: Removing a source doesn't delete local edits.
| Input Format | Output Format |
|---|---|
github.com/user/repo |
raw.githubusercontent.com/user/repo/main/collection.json |
github.com/user/repo/tree/branch |
raw.githubusercontent.com/user/repo/branch/collection.json |
github.com/user/repo/blob/main/data.json |
raw.githubusercontent.com/user/repo/main/data.json |
Images can be:
| Type | Resolution |
|---|---|
| Absolute | Used directly |
| Relative | Resolved against collection base URL |
| Data URL | Used directly |
By default, only trusted sources are permitted:
| Source | Trust Level | Reason |
|---|---|---|
| GitHub | Trusted | Major platform, consistent format |
| localhost | Trusted | Development use |
| Custom | Configurable | Per-deployment |
- HTTPS required for remote sources
- JSON-only content (no executable code)
- Images validated before display
- No arbitrary script execution
Users control image caching per-source:
| Preference | Behaviour |
|---|---|
| Always | Cache without asking |
| Ask | Prompt on first load |
| Never | Don't cache images |
| Error | Cause | Resolution |
|---|---|---|
| Network error | No connection | Check internet, try again |
| 404 Not Found | Wrong URL | Verify repository/file exists |
| Invalid JSON | Malformed data | Validate JSON syntax |
| Schema error | Missing fields | Check required fields |
| CORS error | Server restriction | Use GitHub or configure server |
- Retry with exponential backoff
- Fall back to cached data
- Display user-friendly messages
- Offer alternative actions
| Strategy | Benefit |
|---|---|
| Lazy loading | Images load on scroll |
| Data caching | Faster subsequent loads |
| Image caching | Offline availability |
| Virtualisation | Handle large collections |
For collections with 500+ items:
- Virtual scrolling renders only visible cards
- Pagination option available
- Search/filter to narrow view
- Adding Remote Source - Source setup guide
- Creating Collection - Data format guide
- Your First Collection - Getting started