Resource Hub
Resources
Search the design library by name or tag, then click to load the content. Manifest: data/repository.json, files under files/.
- Storage
- Manifest: data/repository.json
Files: files/<file>
(deployed in the same directory; manifest and files map 1:1) - Access
- fetch the manifest → filter and search in memory
load source files on demand via the file field
falls back to the embedded manifest when opened via file:// - Permission
- public-read · no auth
public resources listed in the manifest only
intranet / archived material is not listed
Developer reference (TanqiRepo API)
The page UI is driven by the module below; business code can call the same API directly.
Input · TanqiRepo.search(params)
| Param | Type | Description |
|---|---|---|
query | string | Fuzzy match on name / description / ID, case-insensitive; empty string = no filter |
tags | string[] | Tag array; items must contain all tags (AND); empty array = no filter |
limit | number | Max items returned; 0 or omitted = no limit (total is always the filtered count) |
Return value
{ status: 'ok' | 'empty' | 'error',
items: [...], // matched items ([] when empty)
total: 3, // filtered total
source: 'remote' | 'inline', // remote = repository.json loaded; inline = file:// fallback to embedded manifest
message: 'Search complete — 3 matches' }
Load one resource · TanqiRepo.load(id)
// success (file readable)
{ status:'ok', item:{...}, content:'full file text', message:'Loaded (files/xxx.txt)' }
// resource not found
{ status:'error', item:null, content:null, message:'Not found: R999 is not in the current manifest' }
// file missing / unreadable -> degrade to the manifest summary if present, otherwise error
{ status:'error', item:{...}, content:null, message:'Load failed: file … missing or unreadable' }
Permission limits
① Scope: only items listed in repository.json; anything else returns “not found”;
② Read-only: all APIs are read-only, no write or delete;
③ Binary limit: psd / ai / stp / zip types return metadata and preview only, not file content;
④ Deployment note: currently a public read-only front end; once a real user system is added, add server-side auth for the manifest and files, and move “intranet archive” items out of the public manifest.