# Sweent App Templates — instructions for LLMs / coding agents You are scaffolding a Node.js/TypeScript app that must deploy on the Sweent self-hosted Gitea CI/CD platform. This file tells you which template to use and how to fetch it. Base URL: https://templates.cloud.sweent.net ## How the platform works (summary) - You put the app in a Gitea repo `Sweent/`. On every push to `main`, CI builds the Dockerfile, pushes the image to `gitea.cloud.sweent.net/sweent/`, and redeploys the container on the host. You do NOT write any deploy/registry/SSH logic — the template's `.gitea/workflows/deploy.yml` already has it; you only replace `__APP__` with the app name. - Hard rules for the app: ONE HTTP service on ONE port; honor `PORT`; listen on `0.0.0.0`; stateless container (it is recreated every deploy — keep state in an external DB); secrets come from environment variables set by the operator, never committed. See MASTER_TEMPLATE.md. ## Pick a template | Template | Use case | Container port | |----------|----------|----------------| | express-ts-api | Express + TypeScript REST/JSON API (backend only) | 8080 | | fastify-ts-api | Fastify + TypeScript API (backend only, higher throughput) | 8080 | | react-vite-static | React + TS single-page app, static, served by nginx | 80 | | sveltekit-node | SvelteKit app with SSR (adapter-node, runs a Node server) | 3000 | | express-react-fullstack | Express API + built React SPA in one container (API + UI together)| 8080 | Note the container port — you must report it to the operator (they run `add-app.sh ` during one-time onboarding). ## Download Whole bundle (all templates + MASTER_TEMPLATE.md): curl -fsSLO https://templates.cloud.sweent.net/bundle/js-templates.zip unzip js-templates.zip A single template, e.g. express-ts-api: curl -fsSLO https://templates.cloud.sweent.net/bundle/express-ts-api.zip unzip express-ts-api.zip Available single-template zips: https://templates.cloud.sweent.net/bundle/express-ts-api.zip https://templates.cloud.sweent.net/bundle/fastify-ts-api.zip https://templates.cloud.sweent.net/bundle/react-vite-static.zip https://templates.cloud.sweent.net/bundle/sveltekit-node.zip https://templates.cloud.sweent.net/bundle/express-react-fullstack.zip Full build contract (read this): https://templates.cloud.sweent.net/MASTER_TEMPLATE.md ## After downloading a template, you must 1. Replace every `__APP__` in `.gitea/workflows/deploy.yml` with the lowercase app name. 2. Build your feature on top of the template's source (keep the `/healthz` or `/api/health` endpoint and the `PORT`/`0.0.0.0` listen). 3. Do NOT add registry/login/SSH steps to the workflow, and do NOT change the image name away from `sweent/`. 4. Commit and push to `main` of `Sweent/`. Tell the operator the app name + container port so they can run the one-time onboarding; after that every push auto-deploys.