Skip to content

Commit 0f6d590

Browse files
feat: initial version
1 parent fdecdec commit 0f6d590

14 files changed

Lines changed: 795 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: Build
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
steps:
20+
- uses: actions/checkout@v6
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v6
24+
with:
25+
node-version: '24'
26+
27+
- name: Install dependencies
28+
run: npm install
29+
30+
- name: Validate JSON files
31+
run: npm run validate
32+
33+
- name: Lint JavaScript files
34+
run: npm run lint
35+
36+
- name: Build indexes
37+
run: npm run build
38+
39+
- name: Upload dist artifacts
40+
uses: actions/upload-artifact@v6
41+
with:
42+
name: github-pages
43+
path: dist/
44+
if-no-files-found: error
45+
46+
deploy:
47+
needs: build
48+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
49+
runs-on: ubuntu-latest
50+
permissions:
51+
pages: write # to deploy to Pages
52+
id-token: write # to verify the deployment originates from an appropriate source
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
# JetBrains IDEs
22
.idea/
3+
4+
# Node.js
5+
node_modules/
6+
package-lock.json
7+
8+
# Build output
9+
dist/

README.md

Lines changed: 163 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,163 @@
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.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"id": "moonlight-android",
3+
"name": "Moonlight for Android",
4+
"tagline": "GameStream client for Android",
5+
"description": "Open source client for NVIDIA GameStream and Sunshine.",
6+
"category": "client",
7+
"platforms": ["android"],
8+
"icon": "https://raw.githubusercontent.com/moonlight-stream/moonlight-android/master/fastlane/metadata/android/en-US/images/icon.png",
9+
"screenshots": [
10+
"https://raw.githubusercontent.com/moonlight-stream/moonlight-android/master/fastlane/metadata/android/en-US/images/phoneScreenshots/1-pc.png",
11+
"https://raw.githubusercontent.com/moonlight-stream/moonlight-android/master/fastlane/metadata/android/en-US/images/phoneScreenshots/2-settings.png",
12+
"https://raw.githubusercontent.com/moonlight-stream/moonlight-android/master/fastlane/metadata/android/en-US/images/sevenInchScreenshots/1-pc.png",
13+
"https://raw.githubusercontent.com/moonlight-stream/moonlight-android/master/fastlane/metadata/android/en-US/images/sevenInchScreenshots/2-settings.png",
14+
"https://raw.githubusercontent.com/moonlight-stream/moonlight-android/master/fastlane/metadata/android/en-US/images/tenInchScreenshots/1-pc.png",
15+
"https://raw.githubusercontent.com/moonlight-stream/moonlight-android/master/fastlane/metadata/android/en-US/images/tenInchScreenshots/2-settings.png",
16+
"https://raw.githubusercontent.com/moonlight-stream/moonlight-android/master/fastlane/metadata/android/en-US/images/tvScreenshots/1-pc.png",
17+
"https://raw.githubusercontent.com/moonlight-stream/moonlight-android/master/fastlane/metadata/android/en-US/images/tvScreenshots/2-settings.png"
18+
],
19+
"links": {
20+
"website": "https://moonlight-stream.org/",
21+
"github": "https://github.com/moonlight-stream/moonlight-android",
22+
"download": "https://play.google.com/store/apps/details?id=com.limelight",
23+
"documentation": "https://github.com/moonlight-stream/moonlight-docs/wiki"
24+
},
25+
"tags": ["streaming", "android", "mobile", "gaming"],
26+
"featured": true,
27+
"compatibility": {
28+
"sunshine": ">=0.1.0"
29+
},
30+
"metadata": {
31+
"license": "GPL-3.0"
32+
}
33+
}

apps/moonlight/moonlight-qt.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"id": "moonlight-qt",
3+
"name": "Moonlight PC",
4+
"tagline": "GameStream client for PCs (Windows, Mac, Linux, and Steam Link)",
5+
"description": "Open source PC client for NVIDIA GameStream and Sunshine.",
6+
"category": "client",
7+
"platforms": ["windows", "macos", "linux"],
8+
"icon": "https://raw.githubusercontent.com/moonlight-stream/moonlight-qt/refs/heads/master/app/res/moonlight.svg",
9+
"links": {
10+
"website": "https://moonlight-stream.org/",
11+
"github": "https://github.com/moonlight-stream/moonlight-qt",
12+
"download": "https://github.com/moonlight-stream/moonlight-qt/releases/latest",
13+
"documentation": "https://github.com/moonlight-stream/moonlight-docs/wiki"
14+
},
15+
"tags": ["streaming", "gamestream", "client", "gaming"],
16+
"featured": true,
17+
"compatibility": {
18+
"sunshine": ">=0.1.0"
19+
},
20+
"metadata": {
21+
"license": "GPL-3.0"
22+
}
23+
}

eslint.config.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import js from "@eslint/js";
2+
3+
export default [
4+
js.configs.recommended,
5+
{
6+
languageOptions: {
7+
ecmaVersion: 2022,
8+
sourceType: "commonjs",
9+
globals: {
10+
console: "readonly",
11+
process: "readonly",
12+
__dirname: "readonly",
13+
require: "readonly",
14+
module: "readonly",
15+
exports: "readonly"
16+
}
17+
},
18+
rules: {
19+
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
20+
"no-console": "off",
21+
"prefer-const": "error",
22+
"no-var": "error",
23+
"eqeqeq": ["error", "always"],
24+
"curly": ["error", "all"],
25+
"brace-style": ["error", "1tbs"],
26+
"indent": ["error", 2],
27+
"quotes": ["error", "single", { "avoidEscape": true }],
28+
"semi": ["error", "always"],
29+
"comma-dangle": ["error", "always-multiline"],
30+
"no-trailing-spaces": "error",
31+
"eol-last": ["error", "always"]
32+
}
33+
},
34+
{
35+
files: ["scripts/**/*.cjs"],
36+
rules: {
37+
"no-process-exit": "off"
38+
}
39+
}
40+
];

package.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "@lizardbyte/app-directory",
3+
"version": "0.0.0",
4+
"description": "Universal app directory for LizardByte projects",
5+
"main": "dist/index.json",
6+
"type": "module",
7+
"scripts": {
8+
"validate": "run-s validate:*",
9+
"validate:apps": "ajv validate -s schemas/app.schema.json -d \"apps/**/*.json\" --all-errors --verbose --strict=false",
10+
"validate:projects": "ajv validate -s schemas/project.schema.json -d \"projects/**/project.json\" --all-errors --verbose --strict=false",
11+
"validate:categories": "ajv validate -s schemas/categories.schema.json -d \"projects/**/categories.json\" --all-errors --verbose --strict=false",
12+
"lint": "eslint scripts/**/*.cjs",
13+
"lint:fix": "eslint scripts/**/*.cjs --fix",
14+
"build": "node scripts/build-index.cjs",
15+
"build:all": "run-s validate lint build",
16+
"test": "run-s validate lint build",
17+
"clean": "node scripts/clean.cjs"
18+
},
19+
"repository": {
20+
"type": "git",
21+
"url": "git+https://github.com/LizardByte/app-directory.git"
22+
},
23+
"keywords": [
24+
"apps",
25+
"directory",
26+
"featured-apps",
27+
"lizardbyte"
28+
],
29+
"author": "LizardByte",
30+
"license": "MIT",
31+
"bugs": {
32+
"url": "https://github.com/LizardByte/app-directory/issues"
33+
},
34+
"homepage": "https://github.com/LizardByte/app-directory#readme",
35+
"devDependencies": {
36+
"@eslint/js": "9.39.2",
37+
"ajv-cli": "5.0.0",
38+
"ajv-formats": "3.0.1",
39+
"eslint": "9.39.2",
40+
"glob": "13.0.0",
41+
"npm-run-all": "4.1.5"
42+
},
43+
"engines": {
44+
"node": ">=20.0.0"
45+
}
46+
}

projects/sunshine/categories.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"categories": [
3+
{
4+
"id": "client",
5+
"name": "Streaming Clients",
6+
"description": "Applications to stream from your Sunshine host",
7+
"icon": "monitor-play"
8+
},
9+
{
10+
"id": "tool",
11+
"name": "Companion Tools",
12+
"description": "Utilities and tools that enhance your Sunshine experience",
13+
"icon": "wrench"
14+
}
15+
]
16+
}

0 commit comments

Comments
 (0)