Copilot instructions
.github/copilot-instructions.mdCopilot instructions
Quality
100/100
Scores the file, not the repository.Length
804 words
20 headings · 6 code blocksRepository
90k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# Copilot Instructions for Uptime Kuma23Warning: Only maintainers of Uptime Kuma can use this instructions, for other contributors, must read AGENTS.md and CLAUDE.md to avoid to get banned because of AI slop.45## Copilot's Goals/Tasks67- Check spelling8- Do not show "Pull Request Overview"9- You do not have to reply if there are no issues1011## Repository Overview1213**Uptime Kuma** is a self-hosted monitoring tool for HTTP(s), TCP, DNS, Docker, etc. Built with Vue 3 (frontend) and Node.js/Express (backend), using Socket.IO for real-time communication.1415- **Languages**: JavaScript, Vue 3, TypeScript (limited), HTML, CSS/SCSS16- **Backend**: Node.js >= 20.4, Express.js, Socket.IO, SQLite17- **Frontend**: Vue 3, Vite, Bootstrap 5, Chart.js18- **Package Manager**: npm with `legacy-peer-deps=true` (.npmrc)1920## Build & Validation Commands2122### Prerequisites2324- Node.js >= 20.4.0, npm >= 9.3, Git2526### Essential Command Sequence27281. **Install Dependencies**:2930```bash31 npm ci # Use npm ci NOT npm install (~60-90 seconds)32```33342. **Linting** (required before committing):3536```bash37 npm run lint # Both linters (~15-30 seconds)38 npm run lint:prod # For production (zero warnings)39```40413. **Build Frontend**:4243```bash44 npm run build # Takes ~90-120 seconds, builds to dist/45```46474. **Run Tests**:48```bash49 npm run test-backend # Backend tests (~50-60 seconds)50 npm test # All tests51```5253### Development Workflow5455```bash56npm run dev # Starts frontend (port 3000) and backend (port 3001)57```5859## Project Architecture6061### Directory Structure6263```64/65├── server/ Backend source code66│ ├── model/ Database models (auto-mapped to tables)67│ ├── monitor-types/ Monitor type implementations68│ ├── notification-providers/ Notification integrations69│ ├── routers/ Express routers70│ ├── socket-handlers/ Socket.IO event handlers71│ ├── server.js Server entry point72│ └── uptime-kuma-server.js Main server logic73├── src/ Frontend source code (Vue 3 SPA)74│ ├── components/ Vue components75│ ├── pages/ Page components76│ ├── lang/ i18n translations77│ ├── router.js Vue Router configuration78│ └── main.js Frontend entry point79├── db/ Database related80│ ├── knex_migrations/ Knex migration files81│ └── kuma.db SQLite database (gitignored)82├── test/ Test files83│ ├── backend-test/ Backend unit tests84│ └── e2e/ Playwright E2E tests85├── config/ Build configuration86│ ├── vite.config.js Vite build config87│ └── playwright.config.js Playwright test config88├── dist/ Frontend build output (gitignored)89├── data/ App data directory (gitignored)90├── public/ Static frontend assets (dev only)91├── docker/ Docker build files92└── extra/ Utility scripts93```9495### Key Configuration Files9697- **package.json**: Scripts, dependencies, Node.js version requirement98- **.eslintrc.js**: ESLint rules (4 spaces, double quotes, unix line endings, JSDoc required)99- **.stylelintrc**: Stylelint rules (4 spaces indentation)100- **.editorconfig**: Editor settings (4 spaces, LF, UTF-8)101- **tsconfig-backend.json**: TypeScript config for backend (only src/util.ts)102- **.npmrc**: `legacy-peer-deps=true` (required for dependency resolution)103- **.gitignore**: Excludes node_modules, dist, data, tmp, private104105### Code Style (strictly enforced by linters)106107- 4 spaces indentation, double quotes, Unix line endings (LF), semicolons required108- **Naming**: JavaScript/TypeScript (camelCase), SQLite (snake_case), CSS/SCSS (kebab-case)109- JSDoc required for all functions/methods110111## CI/CD Workflows112113**auto-test.yml** (runs on PR/push to master/1.23.X):114115- Linting, building, backend tests on multiple OS/Node versions (15 min timeout)116- E2E Playwright tests117118**validate.yml**: Validates JSON/YAML files, language files, knex migrations119120**PR Requirements**: All linters pass, tests pass, code follows style guidelines121122## Common Issues1231241. **npm install vs npm ci**: Always use `npm ci` for reproducible builds1252. **TypeScript errors**: `npm run tsc` shows 1400+ errors - ignore them, they don't affect builds1263. **Stylelint warnings**: Deprecation warnings are expected, ignore them1274. **Test failures**: Always run `npm run build` before running tests1285. **Port conflicts**: Dev server uses ports 3000 and 30011296. **First run**: Server shows "db-config.json not found" - this is expected, starts setup wizard130131## Translations132133- Managed via Weblate. Add keys to `src/lang/en.json` only134- Don't include other languages in PRs135- Use `$t("key")` in Vue templates136137## Database138139- Primary: SQLite (also supports MariaDB/MySQL)140- Migrations in `db/knex_migrations/` using Knex.js141- Filename format validated by CI: `node ./extra/check-knex-filenames.mjs`142143## Testing144145- **Backend**: Node.js test runner, fast unit tests146- **E2E**: Playwright (requires `npx playwright install` first time)147- Test data in `data/playwright-test`148149## Adding New Features150151### New Notification Provider152153Files to modify:1541551. `server/notification-providers/PROVIDER_NAME.js` (backend logic)1562. `server/notification.js` (register provider)1573. `src/components/notifications/PROVIDER_NAME.vue` (frontend UI)1584. `src/components/notifications/index.js` (register frontend)1595. `src/components/NotificationDialog.vue` (add to list)1606. `src/lang/en.json` (add translation keys)161162### New Monitor Type163164Files to modify:1651661. `server/monitor-types/MONITORING_TYPE.js` (backend logic)1672. `server/uptime-kuma-server.js` (register monitor type)1683. `src/pages/EditMonitor.vue` (frontend UI)1694. `src/lang/en.json` (add translation keys)170171## Important Notes1721731. **Trust these instructions** - based on testing. Search only if incomplete/incorrect1742. **Dependencies**: 5 known vulnerabilities (3 moderate, 2 high) - acknowledged, don't fix without discussion1753. **Git Branches**: `master` (v2 development), `1.23.X` (v1 maintenance)1764. **Node Version**: >= 20.4.0 required1775. **Socket.IO**: Most backend logic in `server/socket-handlers/`, not REST1786. **Never commit**: `data/`, `dist/`, `tmp/`, `private/`, `node_modules/`179
Also in louislam/uptime-kuma
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| louislam/uptime-kumaAGENTS.md · 90k | AGENTS.md | gitagent-behaviour | 44/100 | 3 days ago | |
| louislam/uptime-kumaCLAUDE.md · 90k | CLAUDE.md | gitagent-behaviour | 44/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 3 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 3 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 24 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 3 days ago | |
| nerolis-lab/nerolis-lab.github/copilot-instructions.md · 32 | Copilot instructions | setupbuildtestlint-format+11 | 96/100 | 3 days ago | |
| thangaram611/second-brain.github/copilot-instructions.md · 0 | Copilot instructions | setupteststylearch+4 | 96/100 | 3 days ago | |
| keycloak/keycloak.github/copilot-instructions.md · 36k | Copilot instructions | setupbuildtestlint-format+6 | 93/100 | 3 days ago |
