|
1 | | -# template-base |
2 | | -Base repository template for LizardByte. |
| 1 | +# LizardByte App Directory |
| 2 | + |
| 3 | +A centralized directory of featured applications, clients, tools, and integrations for LizardByte projects. |
| 4 | + |
| 5 | +## Repository Structure |
| 6 | + |
| 7 | +``` |
| 8 | +app-directory/ |
| 9 | +├── .github/workflows/ |
| 10 | +│ └── build.yml # Auto-build and deploy |
| 11 | +├── apps/ # App definitions |
| 12 | +│ ├── moonlight/ |
| 13 | +│ ├── tools/ |
| 14 | +│ └── integrations/ |
| 15 | +├── projects/ # Project configurations |
| 16 | +│ └── sunshine/ |
| 17 | +│ ├── project.json # Project config |
| 18 | +│ └── categories.json # Project categories |
| 19 | +├── schemas/ # JSON schemas |
| 20 | +│ ├── app.schema.json # App definition schema |
| 21 | +│ ├── categories.schema.json |
| 22 | +│ └── project.schema.json |
| 23 | +├── scripts/ |
| 24 | +│ ├── build-index.js |
| 25 | +│ └── clean.js |
| 26 | +├── dist/ # Generated (deployed to gh-pages) |
| 27 | +│ ├── index.json |
| 28 | +│ └── sunshine.json |
| 29 | +├── package.json |
| 30 | +└── README.md |
| 31 | +``` |
| 32 | + |
| 33 | +## Quick Start |
| 34 | + |
| 35 | +### Installation |
| 36 | + |
| 37 | +```bash |
| 38 | +npm install |
| 39 | +``` |
| 40 | + |
| 41 | +### Build Indexes |
| 42 | + |
| 43 | +```bash |
| 44 | +npm run build # Build all project indexes |
| 45 | +npm run validate # Validate all JSON files |
| 46 | +npm run lint # Lint JavaScript files |
| 47 | +npm run lint:fix # Auto-fix linting issues |
| 48 | +npm test # Validate + lint + build |
| 49 | +npm run clean # Remove dist directory |
| 50 | +``` |
| 51 | + |
| 52 | +## Usage |
| 53 | + |
| 54 | +### For Project Web UIs |
| 55 | + |
| 56 | +Each project has its own generated index file: |
| 57 | + |
| 58 | +```javascript |
| 59 | +// For Sunshine |
| 60 | +const response = await fetch('https://lizardbyte.github.io/app-directory/sunshine.json'); |
| 61 | +const data = await response.json(); |
| 62 | + |
| 63 | +// For master index (all apps) |
| 64 | +const response = await fetch('https://lizardbyte.github.io/app-directory/index.json'); |
| 65 | +const data = await response.json(); |
| 66 | +``` |
| 67 | + |
| 68 | +### Adding a New App |
| 69 | + |
| 70 | +1. Create a JSON file in the appropriate `apps/` subdirectory |
| 71 | +2. Follow the schema defined in `schemas/app.schema.json` |
| 72 | +3. Validate: `npm run validate` |
| 73 | +4. Submit a pull request |
| 74 | +5. Indexes will be automatically regenerated and deployed |
| 75 | + |
| 76 | +**Example**: See the Moonlight app definitions: |
| 77 | +- [`apps/moonlight/moonlight-qt.json`](apps/moonlight/moonlight-qt.json) |
| 78 | +- [`apps/moonlight/moonlight-android.json`](apps/moonlight/moonlight-android.json) |
| 79 | + |
| 80 | +## Schema Fields |
| 81 | + |
| 82 | +### Required Fields |
| 83 | +- `id`: Unique identifier (kebab-case) |
| 84 | +- `name`: Display name |
| 85 | +- `description`: Full description |
| 86 | +- `category`: Category ID (must match a category in your project's categories.json) |
| 87 | +- `platforms`: Array of supported platforms (windows, macos, linux, android, ios, web) |
| 88 | + |
| 89 | +### Optional Fields |
| 90 | +- `tagline`: Short one-liner |
| 91 | +- `icon`: URL to app icon (512x512 PNG recommended) |
| 92 | +- `screenshots`: Array of screenshot URLs |
| 93 | +- `links`: Object with `website`, `github`, `download`, `documentation` URLs |
| 94 | +- `tags`: Array of searchable keywords |
| 95 | +- `featured`: Boolean to highlight the app |
| 96 | +- `compatibility`: Version requirements for host projects |
| 97 | +- `metadata`: Author, license, updated timestamp |
| 98 | + |
| 99 | +## Adding a New Project |
| 100 | + |
| 101 | +1. Create a project directory: `projects/{project-name}/` |
| 102 | +2. Create project configuration: `projects/{project-name}/project.json` |
| 103 | +3. Create project-specific categories: `projects/{project-name}/categories.json` |
| 104 | + |
| 105 | +**Example**: See the Sunshine project configuration: |
| 106 | +- [`projects/sunshine/project.json`](projects/sunshine/project.json) - Project configuration |
| 107 | +- [`projects/sunshine/categories.json`](projects/sunshine/categories.json) - Category definitions |
| 108 | + |
| 109 | +## Automation & Deployment |
| 110 | + |
| 111 | +GitHub Actions automatically: |
| 112 | +- ✓ Validates all JSON files against schemas (apps, projects, categories) |
| 113 | +- ✓ Lints JavaScript files with ESLint |
| 114 | +- ✓ Builds project-specific indexes in `dist/` directory |
| 115 | +- ✓ Deploys to GitHub Pages (`gh-pages` branch) |
| 116 | +- ✓ Runs on every push and pull request |
| 117 | + |
| 118 | +### npm Scripts |
| 119 | + |
| 120 | +```bash |
| 121 | +npm run validate # Validate all JSON files |
| 122 | +npm run validate:apps # Validate app definitions |
| 123 | +npm run validate:projects # Validate project configs |
| 124 | +npm run validate:categories # Validate category files |
| 125 | +npm run lint # Lint JavaScript files |
| 126 | +npm run lint:fix # Auto-fix linting issues |
| 127 | +npm run build # Build all indexes |
| 128 | +npm run build:all # Validate + lint + build |
| 129 | +npm test # Same as build:all |
| 130 | +npm run clean # Remove dist/ directory |
| 131 | +``` |
| 132 | + |
| 133 | +## CDN & Access |
| 134 | + |
| 135 | +The built indexes are deployed to GitHub Pages and accessible via: |
| 136 | + |
| 137 | +### GitHub Pages (Recommended) |
| 138 | +``` |
| 139 | +https://lizardbyte.github.io/app-directory/{project}.json |
| 140 | +https://lizardbyte.github.io/app-directory/index.json |
| 141 | +``` |
| 142 | + |
| 143 | +### jsDelivr CDN (Faster, Global) |
| 144 | +``` |
| 145 | +https://cdn.jsdelivr.net/gh/LizardByte/app-directory@gh-pages/{project}.json |
| 146 | +``` |
| 147 | + |
| 148 | +### Raw GitHub (Slower) |
| 149 | +``` |
| 150 | +https://raw.githubusercontent.com/LizardByte/app-directory/gh-pages/{project}.json |
| 151 | +``` |
| 152 | + |
| 153 | +## Contributing |
| 154 | + |
| 155 | +1. Fork the repository |
| 156 | +2. Add your app JSON file |
| 157 | +3. Ensure it validates against the schema |
| 158 | +4. Submit a pull request |
| 159 | +5. Maintainers will review and merge |
| 160 | + |
| 161 | +## License |
| 162 | + |
| 163 | +Apps listed in this directory retain their original licenses. This directory structure and metadata is MIT licensed. |
0 commit comments