https://github.com/ohcnetwork/care_apps_registry
https://github.com/ohcnetwork/care_apps_registry
Last synced: about 10 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/ohcnetwork/care_apps_registry
- Owner: ohcnetwork
- Created: 2026-04-12T07:35:04.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-21T14:35:49.000Z (21 days ago)
- Last Synced: 2026-05-23T06:42:38.891Z (19 days ago)
- Language: JavaScript
- Size: 92.8 KB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CARE AppStore
This directory is a temporary, extraction-friendly App Store repository for CARE plugins.
The App Store is served as static JSON. CARE points to the root index file through `REACT_APP_STORE_INDEX_URL` and uses that index to show featured apps and browse apps by category or developer.
## How It Works
- Every published app is defined by one canonical JSON file in `apps/`.
- Contributors open a pull request that adds or updates exactly those app definition files.
- Generated indexes are written to the AppStore root and browse directories:
- `index.json` for featured apps, categories, and developers
- `categories/*.json` for category browse pages
- `developers/*.json` for developer browse pages
- CARE uses the generated indexes for discovery and fetches the canonical app JSON when an installation flow starts.
## Directory Layout
```text
AppStore/
apps/ Canonical app definition JSON files
categories/ Generated category browse indexes
developers/ Generated developer browse indexes
schema/ JSON schema for app definitions
scripts/ Generator and validation scripts
index.json Generated root index referenced by CARE
```
## Contributor Flow
1. Add or update a JSON file in `apps/`.
2. Keep the file aligned with `schema/app.schema.json`.
3. Commit your changes — the pre-commit hook runs `npm run appstore:generate` automatically and stages the updated indexes before the commit is finalised.
4. Open a pull request.
> **Note:** The pre-commit hook is powered by [Husky](https://typicode.github.io/husky). Run `npm install` once after cloning to activate it.
On pull requests, CI validates that the indexes are up to date. On merge, GitHub Actions regenerate the indexes and commit them back if they changed.
## App Definition Contract
Each app definition contains:
- app metadata: slug, name, description, featured flag
- developer metadata: slug, name, optional URL/description
- category memberships: one or more category objects
- base config: `url`, `name`, and `plug` for the frontend plug
- source metadata: repository and optional app base URL metadata
- one or more standard configurations: config overlays plus mandatory/default/optional/custom environment groups
- one or more standard configurations: config overlays, an optional dedicated app base URL field, plus mandatory/default/optional/custom environment groups
- one raw setup template: fallback configuration for manual editing
- optional health check metadata: API URL and expected success status for pre-enable verification
Environment fields default into `meta.config.`. A setup-level `appBaseUrl` field is treated specially: CARE computes `meta.url` as `${appBaseUrl}/assets/remoteEntry.js` instead of storing `appBaseUrl` as an environment value. Environment fields can still override any target path such as `meta.url` explicitly when needed. Health checks can interpolate environment values using placeholders like `{{apiBaseUrl}}`.
## Local Preview
Indexes are regenerated automatically on every commit via the pre-commit hook. To regenerate them manually:
```bash
npm run appstore:generate
```
Serve the directory locally:
```bash
npm run serve
```
Example root index URL for CARE:
```bash
REACT_APP_STORE_INDEX_URL=http://localhost:3000/index.json
```
## Extraction Later
This directory intentionally avoids assumptions about the surrounding repository. It can be moved into a separate GitHub repository later and served unchanged from GitHub Pages or any other static host.