ORB API is the serverless backend platform for the Origin Realms Beyond ecosystem. It provides API endpoints, integration services, and a small informational website designed for deployment on Vercel.
- Svelte 5 and SvelteKit 2 application
- Vercel serverless deployment
POST /api/issuesGitHub issue proxy- Octokit-based GitHub integration
- Strict TypeScript with reusable types
- Validation-first request handling
- Centralized server logging
- Typed private environment configuration
- Extensible rate-limiting interface
- Dark, minimal API-focused website
- Contributor-friendly documentation
Screenshots can be added after deployment:
- Homepage:
docs/assets/homepage.png - API error page:
docs/assets/not-found.png
Routes receive HTTP requests and return standardized JSON responses. Business logic lives in services. Validators sanitize and validate input before services call external providers.
Current flow:
src/routes/api/issues/+server.tsreceivesPOST /api/issues.- The route checks rate limiting and parses JSON.
GitHubIssueServicevalidates input and formats the issue.- Octokit creates the issue in the configured GitHub repository.
- The API returns
{ "success": true }or{ "success": false, "error": "message" }.
Install Bun 1.3 or newer, then install dependencies:
bun installbun run devOpen the local URL printed by Vite.
Create .env from .env.example:
GITHUB_TOKEN=
GITHUB_OWNER=
GITHUB_REPOSITORY=These variables are private server variables. Never expose them in client code.
POST /api/issues
Content-Type: application/json{
"title": "Issue title",
"body": "Issue description",
"reporter": "Application Name",
"version": "1.0.0"
}Success:
{
"success": true
}Error:
{
"success": false,
"error": "title is required"
}bun run check
bun run lint
bun run buildDeploy to Vercel and configure the required environment variables in the Vercel project settings.
The project uses @sveltejs/adapter-vercel and includes vercel.json.
Contributors should follow the service-oriented structure:
- Add shared types.
- Add validators.
- Add services.
- Keep routes thin.
- Add or update documentation.
- Run check, lint, and build before opening a pull request.
The codebase is intended to be readable for both experienced developers and beginners.