Cline rules
.clinerules/project.mdCline rules
Quality
84/100
Scores the file, not the repository.Length
840 words
23 headings · 7 code blocksRepository
0
— · pushed 130 days agoLast changed
3 days ago
First indexed 3 days ago.1# Generated Project Configuration23> **Auto-generated by `analyze_project`** (manually refined for v2)4> **Project:** nginx-proxy5> **Type:** CLI tool (single package)6> **Last Updated:** 2026-03-2578---910## 🚨 MANDATORY: Load CodeOps Rules Before Any Work1112**Before ANY planning or implementation, the AI agent MUST load these rules13using the codeops-mcp tools:**14151. `get_rule("agents")` — Load agent behavior rules **(REQUIRED FIRST)**162. `get_rule("code")` — Load coding standards173. `get_rule("testing")` — Load testing workflows184. `get_rule("git-commands")` — Load git commit protocols1920These rules are **mandatory** and must be consulted before every task.21**Do NOT skip this step. Do NOT proceed without reading these documents.**2223---2425## Project Overview2627- **Name:** @blendsdk/proxybuilder28- **Description:** Nginx reverse proxy configuration builder CLI tool. Generates nginx proxy configs, manages SSL certificates via Let's Encrypt (including wildcard certs via DNS-01), handles domain-based reverse proxy setups with round-robin load balancing, and provides file-based maintenance mode.29- **Type:** CLI tool (single package)30- **Version:** 2.0.031- **Binary:** `proxybuilder`3233## Toolchain3435- **Language(s):** TypeScript (strict mode)36- **Framework(s):** yargs (CLI), Node.js built-in fs/path/child_process37- **Package Manager:** yarn38- **Test Framework:** Vitest39- **Node.js Minimum:** >= 20 LTS4041**Manifest files found:** package.json, tsconfig.json4243## Commands4445All commands assume execution from the project root. Prefix all shell commands with `clear &&`.4647### Build4849```bash50clear && yarn build51```5253### Test5455```bash56clear && yarn test57```5859### Verify (before commit)6061```bash62# Full verification — run this before any git commit63clear && yarn build && yarn test64```6566### Dev (run locally)6768```bash69clear && node dist/index.js --help70```7172## Project Structure7374### Type: Single package (flat)7576### Directory Layout7778```79src/80 index.ts # CLI entry point (yargs command router)81 builder.ts # ProxyBuilder class — core proxy config logic82 config.ts # ConfigManager — proxybuilder.json CRUD83 constants.ts # Application-wide constants and defaults84 cron.ts # Cron job installation helpers85 logger.ts # Color-coded logging with verbosity control86 shell.ts # Shell command executor with dry-run support87 template.ts # Template engine ({{placeholder}} substitution)88 types.ts # TypeScript interfaces and enums89 validator.ts # Input validation (domain, upstream, email, etc.)90 commands/ # yargs command handlers (15 files)91 setup.ts # Install system prerequisites92 init.ts # Initialize proxybuilder working directory93 create.ts # Create a new domain proxy94 delete.ts # Delete a domain95 enable.ts # Enable a disabled domain96 disable.ts # Disable a domain97 update.ts # Update domain configuration98 list.ts # List all domains99 renew.ts # Renew SSL certificates100 revoke.ts # Revoke SSL certificate101 cert-info.ts # Display certificate details102 dns-setup.ts # Configure DNS provider credentials103 dns-challenge.ts # Internal certbot hook callback (hidden)104 maintenance.ts # Toggle maintenance mode105 status.ts # System health overview106 dns/ # DNS provider integrations107 provider.ts # IDnsProvider interface + registry108 cloudns.ts # ClouDNS implementation109 namecheap.ts # Namecheap implementation110 templates/ # Nginx config templates (copied to dist/)111 nginx.conf # Main nginx config112 proxy.conf # Shared proxy headers113 letsencrypt.conf # ACME challenge location114 maintenance.conf # Maintenance mode check115 passthrough/ # Passthrough mode templates116 site.conf117 upstream.conf118 ssl.conf119 full/ # Full mode templates120 site.conf121 upstream.conf122 ssl.conf123 security.conf124 general.conf125 log.conf126 pages/ # HTML pages127 maintenance.html128 502.html129tests/ # Vitest test files (192 tests)130 validator.test.ts # Input validation (74 tests)131 template.test.ts # Template engine (26 tests)132 config.test.ts # ConfigManager CRUD (31 tests)133 logger.test.ts # Logger level/file/format (24 tests)134 dns-provider.test.ts # DNS provider registry (20 tests)135 constants.test.ts # Constants validation (17 tests)136plans/137 proxybuilder-v2/ # v2 implementation plan (completed)138```139140## Coding Conventions141142### Naming143144- **Files:** kebab-case (e.g., `cert-info.ts`, `dns-setup.ts`)145- **Classes:** PascalCase (e.g., `ProxyBuilder`, `ConfigManager`)146- **Interfaces:** PascalCase with `I` prefix (e.g., `IProxyConfig`, `IDomainConfig`)147- **Types/Enums:** PascalCase (e.g., `ProxyMode`, `LogLevel`)148- **Functions/Methods:** camelCase (e.g., `renderTemplate`, `getCertExpiry`)149- **Constants:** UPPER_SNAKE_CASE (e.g., `CERTBOT_BIN`, `DH_PARAM_BITS`, `FOLDERS`)150151### Patterns152153- **Command pattern:** Each command file exports `command`, `desc`, `builder`, `handler` (yargs module)154- **DNS provider pattern:** Plugin interface `IDnsProvider` with `registerProvider()` registry155- **Template engine:** `{{placeholder}}` substitution from `.conf` template files156- **Config storage:** Single `proxybuilder.json` file as source of truth157- **Proxy modes:** `passthrough` (SSL only) and `full` (headers, gzip, logging)158159## Git & Commit Conventions160161### Commit Scope162163```164# Single package — use package name as scope:165# feat(proxybuilder): description166```167168### Branch Strategy169170- **Main branch:** `main`171- **Current development branch:** `v2`172- **Feature branches:** `feature/[name]`173174## Special Rules (Project-Specific)175176```177- CLI binary entry point: dist/index.js (#!/usr/bin/env node)178- Build copies src/templates/ to dist/templates/ (templates are runtime assets)179- The project manages real infrastructure (nginx, SSL certs) — changes must be tested carefully180- No shelljs dependency in v2 — uses Node.js child_process directly via Shell class181- DNS provider credentials stored with restricted file permissions (600)182- Maintenance mode uses file-based flag (no nginx reload needed)183- Two proxy modes: passthrough and full (each with own template set)184```185186## Cross-References187188The generic rule files that read this `project.md`:189190- **make_plan.md** — Uses verify command, file paths, commit scope191- **code.md** — Uses language conventions, architecture rules192- **testing.md** — Uses test commands, test locations, test framework193- **git-commands.md** — Uses commit scope, verify command194- **agents.md** — Uses shell commands, verify command195- **plans.md** — Uses task file path patterns196
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bashdeban/fastmind.clinerules/.project-consistency-keeper2.md · 5 | Cline rules | setupbuildtestlint-format+11 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.clinerules · 31k | Cline rules | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| BryaanF/LiantPortfolio.clinerules/project-guidelines.md · 0 | Cline rules | buildstylearchgit+2 | 96/100 | 3 days ago | |
| u9401066/zotero-keeper.clinerules/50-pubmed-project.md · 7 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| u9401066/zotero-keepervscode-extension/resources/repo-assets/pubmed-search-mcp/.clinerules/50-pubmed-project.md · 7 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| VaillerTeeter/HoshimiNest.clinerules/project-identity.md · 1 | Cline rules | setuparchtypesdo-not | 93/100 | yesterday | |
| HerringtonDarkholme/megarepo.clinerules/02-development.md · 17 | Cline rules | setupbuildteststyle+3 | 92/100 | 3 days ago | |
| blendsdk/codeops-mcp.clinerules/project.md · 0 | Cline rules | buildteststylearch+7 | 91/100 | 3 days ago |
