A comprehensive file management system for Val Town that handles different file types including HTTP, cron, email, JSON, and more with collaborative editing capabilities.
├── config.json # Configuration file with URLs and file type definitions
├── zons # Main gallery view showing all zons (HTTP)
├── zon # Individual zon view with file listings (HTTP)
├── file # File editor interface with TypeScript support (HTTP)
├── sync # Background sync service for YJS collaboration (Cron)
└── README.md # This file
The system uses /config.json for configuration:
{ "urls": { "zons": "https://zons.val.run", // Main gallery URL "zon": "https://zon.val.run", // Individual zon view URL "files": "https://svc.val.run" // File editor URL }, "editor": { "yjs": { "room": "@vals", // YJS collaboration room "url": "wss://hp.cfapps.us10-001.hana.ondemand.com" // YJS WebSocket URL } }, "fileTypes": { // File type definitions with icons, colors, templates, etc. } }
http) - Web endpoints and APIscron) - Scheduled tasksemail) - Email handlersjson) - Configuration and data filests) - General TypeScript filesjs) - JavaScript filesmd) - Documentation filesGET / - Main gallery showing all zonsGET / - Redirects to main galleryGET /{zon-name} - View files in specific zonGET /{zon-name}/files - API endpoint returning JSON list of filesGET / - Redirects to main gallery (configurable)GET /{zon-name}/{file-name} - Edit specific file with ts-editorGET /{zon-name}/{file-name}/raw - Get raw file content as JSONPOST /{zon-name}/{file-name} - Save file changesThe system integrates with:
config.jsonfileTypes configuration