Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
infra - Skill - OpenSmartRoute
Skillv1.0.0
infra
AWS & DevOps Standards - **Reverse Proxy**: Nginx uses **subdomain-based** routing via two `server` blocks (do NOT use path-prefix `/api/*` — a short code beginning with "api" would collide): - `serve
Instruction file imported from ImWaynnee/url-shortener (.github/instructions/infra.instructions.md). Copyright stays with the author.
AWS & DevOps Standards
Reverse Proxy: Nginx uses subdomain-based routing via two server blocks (do NOT use path-prefix /api/* — a short code beginning with "api" would collide):
server_name api.domain.com -> proxy_pass NestJS (Port 3000) — handles all API calls (e.g. POST /urls/shorten)
NestJS global prefix: Do NOT set a global /api prefix in main.ts. The subdomain already provides API context. Routes are /urls/shorten, not /api/urls/shorten.
CORS: In NestJS main.ts, only allow the specific frontend production domain or localhost:7777.
Environment:
Database connection string must use the RDS endpoint in production.
Use PM2 to manage the NestJS process on EC2.
Frontend Deployment: The React app is deployed to Cloudflare Pages. Set VITE_API_BASE_URL as an environment variable in the Cloudflare Pages dashboard pointing to the EC2 backend domain.
CORS Origins: Explicitly list the Cloudflare Pages production URL and http://localhost:7777. No wildcards permitted.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
yaml
targets:
- https://api.opensmartroute.ai/api/v1/registry/imwaynnee-url-shortener-infra-instructions/manifest # or paste the manifest below
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
{
"ocm": "1",
"id": "imwaynnee-url-shortener-infra-instructions",
"kind": "skill",
"name": "infra",
"description": "AWS & DevOps Standards - **Reverse Proxy**: Nginx uses **subdomain-based** routing via two `server` blocks (do NOT use path-prefix `/api/*` — a short code beginning with \"api\" would collide): - `server_name api.domain.com` -> proxy_pass NestJS (Port 3000) — handles all API calls (e.g. `POST /urls/shorten`) - `server_name s.domain.com` -> proxy_pass NestJS (Port 3000) — handles all redirect calls (`GET /:shortUrl`) - **NestJS global prefix**: Do NOT set a global `/api` prefix in `main.ts`. The subdomain already provides API context. Routes are `/urls/shorten`, not `/api/urls/shorten`. - **CORS**: In NestJS `main.ts`, only allow the specific frontend production domain or `localhost:7777`. - **Environment**: - Database connection string must use the RDS endpoint in production. - Use `PM2` to manage the NestJS process on EC2. - **Frontend Deployment**: The React app is deployed to Cloudflare Pages. Set `VITE_API_BASE_URL` as an environment variable in the Cloudflare Pages dashboard pointing to the EC2 backend dom",
"publisher": "ImWaynnee",
"version": "1.0.0",
"capabilities": {
"domains": [
"coding",
"data_analysis"
],
"tags": [
"skill-md",
"github-instructions"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"AWS & DevOps Standards - **Reverse Proxy**: Nginx uses **subdomain-based** routing via two `server` blocks (do NOT use path-prefix `/api/*` — a short code beginning with \"api\" would collide): - `server_name api.domain.com` -> proxy_pass NestJS (Port 3000) — handles all API calls (e.g. `POST /urls/shorten`) - `server_name s.domain.com` -> proxy_pass NestJS (Port 3000) — handles all redirect calls (`GET /:shortUrl`) - **NestJS global prefix**: Do NOT set a global `/api` prefix in `main.ts`. The subdomain already provides API context. Routes are `/urls/shorten`, not `/api/urls/shorten`. - **CORS**: In NestJS `main.ts`, only allow the specific frontend production domain or `localhost:7777`. - **Environment**: - Database connection string must use the RDS endpoint in production. - Use `PM2` to manage the NestJS process on EC2. - **Frontend Deployment**: The React app is deployed to Cloudflare Pages. Set `VITE_API_BASE_URL` as an environment variable in the Cloudflare Pages dashboard pointing to the EC2 backend dom"
],
"primary": false,
"metadata": {
"source": {
"provider": "github-instructions",
"repository": "https://github.com/ImWaynnee/url-shortener",
"path": ".github/instructions/infra.instructions.md",
"ref": "93ae6957da9ac6185362ad441966bc82762c4f9c",
"url": "https://github.com/ImWaynnee/url-shortener/blob/93ae6957da9ac6185362ad441966bc82762c4f9c/.github/instructions/infra.instructions.md",
"key": "ImWaynnee/url-shortener/.github/instructions/infra.instructions.md"
},
"applies_to": "infra/**/*, docker-compose.yml, **/main.ts"
},
"instructions": "# AWS & DevOps Standards\n- **Reverse Proxy**: Nginx uses **subdomain-based** routing via two `server` blocks (do NOT use path-prefix `/api/*` — a short code beginning with \"api\" would collide):\n - `server_name api.domain.com` -> proxy_pass NestJS (Port 3000) — handles all API calls (e.g. `POST /urls/shorten`)\n - `server_name s.domain.com` -> proxy_pass NestJS (Port 3000) — handles all redirect calls (`GET /:shortUrl`)\n- **NestJS global prefix**: Do NOT set a global `/api` prefix in `main.ts`. The subdomain already provides API context. Routes are `/urls/shorten`, not `/api/urls/shorten`.",
"cost": {
"context_tokens": 293
}
}
Fetch it by URL: GET /api/v1/registry/imwaynnee-url-shortener-infra-instructions/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.