@codigodoleo/wp-kit 3.4.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/lib/prompts/index.js +108 -1
  2. package/lib/utils/git.js +109 -5
  3. package/modules/docs/index.js +15 -0
  4. package/modules/docs/templates/README.md.hbs +32 -32
  5. package/modules/docs/templates/docs/{Arquitetura.md → Arquitetura.md.hbs} +27 -27
  6. package/modules/docs/templates/docs/{Deploy-Pipeline.md → Deploy-Pipeline.md.hbs} +6 -6
  7. package/modules/docs/templates/docs/{Desenvolvimento.md → Desenvolvimento.md.hbs} +39 -39
  8. package/modules/docs/templates/docs/{Getting-Started.md → Getting-Started.md.hbs} +35 -35
  9. package/modules/docs/templates/docs/{Infraestrutura.md → Infraestrutura.md.hbs} +1 -1
  10. package/modules/docs/templates/docs/{Monitoramento.md → Monitoramento.md.hbs} +1 -1
  11. package/modules/docs/templates/docs/{Sync-the-Production-DB-with-the-Staging-DB.md → Sync-the-Production-DB-with-the-Staging-DB.md.hbs} +1 -1
  12. package/modules/docs/templates/docs/Troubleshooting.md.hbs +3 -0
  13. package/modules/mu-plugin/index.js +143 -17
  14. package/modules/mu-plugin/prompts.js +7 -0
  15. package/modules/mu-plugin/templates/acorn/.gitignore.hbs +10 -0
  16. package/modules/mu-plugin/templates/acorn/README.md.hbs +46 -0
  17. package/modules/mu-plugin/templates/acorn/app/Providers/CoreServiceProvider.php.hbs +26 -0
  18. package/modules/mu-plugin/templates/acorn/composer.json.hbs +31 -0
  19. package/modules/mu-plugin/templates/acorn/config/app.php.hbs +43 -0
  20. package/modules/mu-plugin/templates/acorn/config/logging.php.hbs +59 -0
  21. package/modules/mu-plugin/templates/acorn/plugin.php.hbs +95 -0
  22. package/modules/mu-plugin/templates/acorn/resources/.gitkeep +0 -0
  23. package/modules/mu-plugin/templates/acorn/storage/framework/cache/.gitkeep +0 -0
  24. package/modules/mu-plugin/templates/acorn/storage/framework/sessions/.gitkeep +0 -0
  25. package/modules/mu-plugin/templates/acorn/storage/framework/views/.gitkeep +0 -0
  26. package/modules/mu-plugin/templates/bedrock-autoloader.php +28 -0
  27. package/modules/sage/templates/.lando.yml.hbs +15 -17
  28. package/modules/skills/prompts.js +1 -1
  29. package/package.json +1 -1
  30. package/templates/.lando.yml.hbs +0 -9
  31. package/templates/CLAUDE.md.hbs +1 -1
  32. package/modules/docs/templates/docs/Troubleshooting.md +0 -3
@@ -14,6 +14,93 @@ function parseBooleanEnv(value) {
14
14
  return null;
15
15
  }
16
16
 
17
+ function capitalizeToken(token) {
18
+ if (!token) return '';
19
+
20
+ const normalized = token.toLowerCase();
21
+ const dictionary = {
22
+ wordpress: 'WordPress',
23
+ wp: 'WP',
24
+ api: 'API',
25
+ ui: 'UI',
26
+ ux: 'UX',
27
+ cms: 'CMS',
28
+ seo: 'SEO',
29
+ php: 'PHP',
30
+ js: 'JS',
31
+ ci: 'CI',
32
+ cd: 'CD',
33
+ qa: 'QA',
34
+ devops: 'DevOps',
35
+ };
36
+
37
+ if (dictionary[normalized]) {
38
+ return dictionary[normalized];
39
+ }
40
+
41
+ return token.charAt(0).toUpperCase() + token.slice(1).toLowerCase();
42
+ }
43
+
44
+ function parseRepositoryInfo(gitRepository, projectName) {
45
+ const fallbackPath = `your-group/${projectName}`;
46
+ const fallbackHost = 'gitlab.com';
47
+
48
+ if (!gitRepository || typeof gitRepository !== 'string') {
49
+ return {
50
+ repositoryHost: fallbackHost,
51
+ repositoryPath: fallbackPath,
52
+ repositoryWebUrl: `https://${fallbackHost}/${fallbackPath}`,
53
+ repositoryHttpsUrl: `https://${fallbackHost}/${fallbackPath}.git`,
54
+ };
55
+ }
56
+
57
+ const value = gitRepository.trim();
58
+ const sshMatch = value.match(/^git@([^:]+):(.+?)(?:\.git)?$/i);
59
+ const httpsMatch = value.match(/^https?:\/\/([^/]+)\/(.+?)(?:\.git)?$/i);
60
+ const matched = sshMatch || httpsMatch;
61
+
62
+ if (!matched) {
63
+ return {
64
+ repositoryHost: fallbackHost,
65
+ repositoryPath: fallbackPath,
66
+ repositoryWebUrl: `https://${fallbackHost}/${fallbackPath}`,
67
+ repositoryHttpsUrl: `https://${fallbackHost}/${fallbackPath}.git`,
68
+ };
69
+ }
70
+
71
+ const repositoryHost = matched[1];
72
+ const repositoryPath = matched[2];
73
+
74
+ return {
75
+ repositoryHost,
76
+ repositoryPath,
77
+ repositoryWebUrl: `https://${repositoryHost}/${repositoryPath}`,
78
+ repositoryHttpsUrl: `https://${repositoryHost}/${repositoryPath}.git`,
79
+ };
80
+ }
81
+
82
+ function deriveProjectMetadata({ projectName, gitRepository }) {
83
+ const tokens = projectName.split('-').filter(Boolean);
84
+ const projectTitle = tokens.map(capitalizeToken).join(' ');
85
+ const projectPascal = tokens.map(capitalizeToken).join('');
86
+ const projectSnake = projectName.replace(/-/g, '_');
87
+ const projectConstant = projectSnake.toUpperCase();
88
+ const projectThemeSlug = `${projectName}-theme`;
89
+ const repository = parseRepositoryInfo(gitRepository, projectName);
90
+
91
+ return {
92
+ projectTitle,
93
+ projectPascal,
94
+ projectSnake,
95
+ projectConstant,
96
+ projectThemeSlug,
97
+ projectDevDomain: `development-www.${projectName}.com`,
98
+ projectStagingDomain: `staging-www.${projectName}.com`,
99
+ projectProductionDomain: `www.${projectName}.com`,
100
+ ...repository,
101
+ };
102
+ }
103
+
17
104
  export async function runPrompts({ defaults = false } = {}) {
18
105
  const defaultsGit = getGitUserDefaults();
19
106
 
@@ -21,8 +108,16 @@ export async function runPrompts({ defaults = false } = {}) {
21
108
  {
22
109
  type: 'input',
23
110
  name: 'projectName',
24
- message: 'Project name:',
111
+ message: 'Project name (lowercase, hyphens only):',
25
112
  default: 'wordpress-dev',
113
+ filter: (val) =>
114
+ val
115
+ .trim()
116
+ .toLowerCase()
117
+ .replace(/\s+/g, '-')
118
+ .replace(/[^a-z0-9-]/g, ''),
119
+ validate: (val) =>
120
+ /^[a-z0-9][a-z0-9-]*$/.test(val) || 'Use only lowercase letters, numbers and hyphens.',
26
121
  },
27
122
  {
28
123
  type: 'input',
@@ -154,8 +249,14 @@ export async function runPrompts({ defaults = false } = {}) {
154
249
  const enabledModules = Object.keys(modulePromptDefs).filter(
155
250
  (mod) => defaultAnswers[`enable_${mod.replace(/-/g, '_')}`] === true
156
251
  );
252
+ const derived = deriveProjectMetadata({
253
+ projectName: defaultAnswers.projectName,
254
+ gitRepository: defaultAnswers.gitRepository,
255
+ });
256
+
157
257
  return {
158
258
  ...defaultAnswers,
259
+ ...derived,
159
260
  phpVersion: '8.4',
160
261
  nodeVersion: '24',
161
262
  enabledModules,
@@ -176,8 +277,14 @@ export async function runPrompts({ defaults = false } = {}) {
176
277
  const enabledModules = Object.keys(modulePromptDefs).filter(
177
278
  (mod) => answers[`enable_${mod.replace(/-/g, '_')}`] === true
178
279
  );
280
+ const derived = deriveProjectMetadata({
281
+ projectName: answers.projectName,
282
+ gitRepository: answers.gitRepository,
283
+ });
284
+
179
285
  return {
180
286
  ...answers,
287
+ ...derived,
181
288
  phpVersion: '8.4',
182
289
  nodeVersion: '24',
183
290
  enabledModules,
package/lib/utils/git.js CHANGED
@@ -6,6 +6,9 @@ import fs from 'fs-extra';
6
6
 
7
7
  import { log, color } from './logger.js';
8
8
 
9
+ const CLAUDE_PLUGIN_SUPERPOWERS_SAGE = '.claude/plugins/superpowers-sage';
10
+ const CLAUDE_PLUGIN_SUPERPOWERS = '.claude/plugins/superpowers';
11
+
9
12
  export function getGitUserDefaults() {
10
13
  const exec = (cmd) => {
11
14
  try {
@@ -28,7 +31,7 @@ export function getGitUserDefaults() {
28
31
  */
29
32
  const TARGET_CONFIG = {
30
33
  claude: {
31
- dest: '.claude/plugins/superpowers-sage',
34
+ dest: CLAUDE_PLUGIN_SUPERPOWERS_SAGE,
32
35
  dirs: ['.claude-plugin', 'skills', 'agents', 'hooks'],
33
36
  label: 'Claude Code (.claude/)',
34
37
  },
@@ -44,6 +47,78 @@ const TARGET_CONFIG = {
44
47
  },
45
48
  };
46
49
 
50
+ const CLAUDE_SETTINGS_BASELINE = {
51
+ $schema: 'https://json.schemastore.org/claude-code-settings.json',
52
+ permissions: {
53
+ deny: [
54
+ 'Read(./.env)',
55
+ 'Read(./.env.*)',
56
+ 'Read(./secrets/**)',
57
+ 'Read(./config/credentials.json)',
58
+ ],
59
+ },
60
+ };
61
+
62
+ function mergeUnique(base = [], extra = []) {
63
+ return [...new Set([...(Array.isArray(base) ? base : []), ...extra])];
64
+ }
65
+
66
+ function mergeClaudeSettings(existing = {}, incoming = {}) {
67
+ const merged = { ...existing, ...incoming };
68
+
69
+ const existingPermissions = existing.permissions ?? {};
70
+ const incomingPermissions = incoming.permissions ?? {};
71
+
72
+ merged.permissions = {
73
+ ...existingPermissions,
74
+ ...incomingPermissions,
75
+ deny: mergeUnique(existingPermissions.deny, incomingPermissions.deny),
76
+ };
77
+
78
+ merged.enabledPlugins = {
79
+ ...(existing.enabledPlugins ?? {}),
80
+ ...(incoming.enabledPlugins ?? {}),
81
+ };
82
+
83
+ return merged;
84
+ }
85
+
86
+ async function updateClaudeProjectSettings(targetDir, enabledPlugins = {}) {
87
+ const claudeDir = path.join(targetDir, '.claude');
88
+ const settingsPath = path.join(claudeDir, 'settings.json');
89
+
90
+ await fs.ensureDir(claudeDir);
91
+
92
+ let existing = {};
93
+ if (await fs.pathExists(settingsPath)) {
94
+ try {
95
+ existing = await fs.readJson(settingsPath);
96
+ } catch {
97
+ log(
98
+ color.orange,
99
+ '[skills] .claude/settings.json invalido. Recriando com baseline seguro + plugins instalados.'
100
+ );
101
+ }
102
+ }
103
+
104
+ const nextSettings = mergeClaudeSettings(existing, {
105
+ ...CLAUDE_SETTINGS_BASELINE,
106
+ enabledPlugins,
107
+ });
108
+
109
+ await fs.writeJson(settingsPath, nextSettings, { spaces: 2 });
110
+ log(
111
+ color.green,
112
+ '✅ .claude/settings.json atualizado com plugins locais e baseline de seguranca.'
113
+ );
114
+ }
115
+
116
+ function cloneRepo(repo, tmpDir) {
117
+ return spawnSync('git', ['clone', '--depth=1', repo, tmpDir], {
118
+ stdio: 'inherit',
119
+ });
120
+ }
121
+
47
122
  /**
48
123
  * Clona codigodoleo/superpowers-sage e copia o conteúdo para os destinos selecionados.
49
124
  * Requer git instalado no host.
@@ -52,8 +127,10 @@ const TARGET_CONFIG = {
52
127
  * @param {string[]} targets - Lista de destinos: 'claude' | 'cursor' | 'ai'
53
128
  */
54
129
  export async function installSuperpowersSage(targetDir, targets = ['claude']) {
55
- const repo = 'https://github.com/codigodoleo/superpowers-sage.git';
130
+ const sageRepo = 'https://github.com/codigodoleo/superpowers-sage.git';
131
+ const baseRepo = 'https://github.com/obra/superpowers.git';
56
132
  const tmpDir = path.join(os.tmpdir(), `superpowers-sage-${Date.now()}`);
133
+ const tmpBaseDir = path.join(os.tmpdir(), `superpowers-base-${Date.now()}`);
57
134
 
58
135
  const validTargets = targets.filter((t) => TARGET_CONFIG[t]);
59
136
  if (validTargets.length === 0) {
@@ -63,9 +140,7 @@ export async function installSuperpowersSage(targetDir, targets = ['claude']) {
63
140
 
64
141
  log(color.blue, `🔌 Clonando superpowers-sage para: ${validTargets.join(', ')}...`);
65
142
 
66
- const result = spawnSync('git', ['clone', '--depth=1', repo, tmpDir], {
67
- stdio: 'inherit',
68
- });
143
+ const result = cloneRepo(sageRepo, tmpDir);
69
144
 
70
145
  if (result.status !== 0) {
71
146
  log(
@@ -92,5 +167,34 @@ export async function installSuperpowersSage(targetDir, targets = ['claude']) {
92
167
  log(color.green, `✅ superpowers-sage instalado em ${cfg.dest}`);
93
168
  }
94
169
 
170
+ const claudeEnabledPlugins = {
171
+ 'superpowers-sage@superpowers-sage-marketplace': true,
172
+ };
173
+
174
+ if (validTargets.includes('claude')) {
175
+ log(color.blue, '🔌 Clonando superpowers (base) para Claude Code...');
176
+
177
+ const baseResult = cloneRepo(baseRepo, tmpBaseDir);
178
+ if (baseResult.status !== 0) {
179
+ log(
180
+ color.orange,
181
+ '⚠️ Nao foi possivel clonar obra/superpowers. O plugin base nao foi instalado localmente.'
182
+ );
183
+ } else {
184
+ const baseDest = path.join(targetDir, CLAUDE_PLUGIN_SUPERPOWERS);
185
+ await fs.ensureDir(baseDest);
186
+ await fs.copy(tmpBaseDir, baseDest, {
187
+ overwrite: true,
188
+ filter: (src) =>
189
+ !src.includes(`${path.sep}.git${path.sep}`) && !src.endsWith(`${path.sep}.git`),
190
+ });
191
+ claudeEnabledPlugins['superpowers@superpowers-dev'] = true;
192
+ log(color.green, `✅ superpowers instalado em ${CLAUDE_PLUGIN_SUPERPOWERS}`);
193
+ }
194
+
195
+ await updateClaudeProjectSettings(targetDir, claudeEnabledPlugins);
196
+ }
197
+
95
198
  await fs.remove(tmpDir);
199
+ await fs.remove(tmpBaseDir);
96
200
  }
@@ -1,3 +1,18 @@
1
1
  export async function setupModule(context, generator) {
2
2
  await generator.generateFile('README.md', context, 'docs');
3
+
4
+ const docFiles = [
5
+ 'Arquitetura.md',
6
+ 'Deploy-Pipeline.md',
7
+ 'Desenvolvimento.md',
8
+ 'Getting-Started.md',
9
+ 'Infraestrutura.md',
10
+ 'Monitoramento.md',
11
+ 'Sync-the-Production-DB-with-the-Staging-DB.md',
12
+ 'Troubleshooting.md',
13
+ ];
14
+
15
+ for (const file of docFiles) {
16
+ await generator.generateFile(`docs/${file}`, context, 'docs', file);
17
+ }
3
18
  }
@@ -1,14 +1,14 @@
1
- # 🏠 Pipefy WordPress Website
1
+ # 🏠 {{projectTitle}} WordPress Website
2
2
 
3
- Bem-vindo à documentação oficial do site **pipefy.com** - um projeto WordPress robusto e moderno da Pipefy.
3
+ Bem-vindo à documentação oficial do site **{{projectName}}.com** - um projeto WordPress robusto e moderno da {{projectTitle}}.
4
4
 
5
5
  ## 🎯 **Visão Geral**
6
6
 
7
- Este é o repositório principal do site institucional da Pipefy, construído com **WordPress** e uma infraestrutura cloud-native moderna. O projeto utiliza tecnologias de ponta para garantir performance, escalabilidade e facilidade de manutenção.
7
+ Este é o repositório principal do site institucional da {{projectTitle}}, construído com **WordPress** e uma infraestrutura cloud-native moderna. O projeto utiliza tecnologias de ponta para garantir performance, escalabilidade e facilidade de manutenção.
8
8
 
9
9
  ### 📊 **Status do Projeto**
10
10
  - **Versão Atual**: `1.1.7` (2025-05-23)
11
- - **WordPress**: Customizado com tema Pipefy 2020
11
+ - **WordPress**: Customizado com tema {{projectTitle}} Theme
12
12
  - **Ambiente**: Multi-ambiente (Local, Development, Staging, Production)
13
13
  - **Deploy**: Automatizado via GitLab CI/CD + Kubernetes
14
14
 
@@ -23,18 +23,18 @@ Este é o repositório principal do site institucional da Pipefy, construído co
23
23
  ### Setup Rápido
24
24
  ```bash
25
25
  # 1. Clone o repositório
26
- git clone git@gitlab.com:pipefy/wordpress/pipefy-website.git
27
- cd pipefy-website
26
+ git clone {{gitRepository}}
27
+ cd {{projectName}}
28
28
 
29
29
  # 2. Inicie o ambiente local
30
30
  lando start
31
31
 
32
32
  # 3. Configure WordPress
33
- lando ssh -c "development/scripts/init-wp.sh --user=seu-email@pipefy.com"
33
+ lando ssh -c "development/scripts/init-wp.sh --user=seu-email@{{projectName}}.com"
34
34
 
35
35
  # 4. Acesse o site
36
- # Frontend: https://pipefy.lndo.site
37
- # Admin: https://pipefy.lndo.site/wp-admin
36
+ # Frontend: https://{{projectDomain}}
37
+ # Admin: https://{{projectDomain}}/wp-admin
38
38
  ```
39
39
 
40
40
  ## 🏗️ **Arquitetura**
@@ -42,8 +42,8 @@ lando ssh -c "development/scripts/init-wp.sh --user=seu-email@pipefy.com"
42
42
  ```
43
43
  ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
44
44
  │ Local │────│ Development │────│ Staging │────│ Production │
45
- │ pipefy.lndo.site│ │development-www │ │ staging-www │ │ www.pipefy.com │
46
- │ │ │ .pipefy.com │ │ .pipefy.com │ │ │
45
+ │ {{projectDomain}}│ │development-www │ │ staging-www │ │ {{projectProductionDomain}} │
46
+ │ │ │ .{{projectName}}.com │ │ .{{projectName}}.com │ │ │
47
47
  └─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
48
48
  │ │ │ │
49
49
  └───────────────────────┼───────────────────────┼───────────────────────┘
@@ -59,7 +59,7 @@ lando ssh -c "development/scripts/init-wp.sh --user=seu-email@pipefy.com"
59
59
  | Categoria | Tecnologia |
60
60
  |-----------|------------|
61
61
  | **CMS** | WordPress (customizado) |
62
- | **Tema** | Pipefy 2020 (custom theme) |
62
+ | **Tema** | {{projectTitle}} Theme (custom theme) |
63
63
  | **Frontend** | PHP, JavaScript, Sass, Gutenberg Blocks |
64
64
  | **Containerização** | Docker, Lando |
65
65
  | **Orquestração** | Kubernetes, Helm |
@@ -71,10 +71,10 @@ lando ssh -c "development/scripts/init-wp.sh --user=seu-email@pipefy.com"
71
71
  ## 📁 **Estrutura do Projeto**
72
72
 
73
73
  ```
74
- pipefy-website/
74
+ {{projectName}}/
75
75
  ├── 📂 dist/ # WordPress core + customizações
76
76
  │ └── 📂 wp-content/
77
- │ ├── 📂 themes/pipefy-2020/ # Tema principal
77
+ │ ├── 📂 themes/{{projectThemeSlug}}/ # Tema principal
78
78
  │ ├── 📂 plugins/ # Plugins WordPress
79
79
  │ └── 📂 mu-plugins/ # Must-use plugins
80
80
  ├── 📂 development/ # Scripts e config. desenvolvimento
@@ -91,10 +91,10 @@ pipefy-website/
91
91
 
92
92
  | Ambiente | URL | Branch | Namespace K8s | Finalidade |
93
93
  |----------|-----|--------|---------------|------------|
94
- | **Local** | `pipefy.lndo.site` | `feature/*` | - | Desenvolvimento local |
95
- | **Development** | `development-www.pipefy.com` | `development` | `website-dev` | Testes contínuos |
96
- | **Staging** | `staging-www.pipefy.com` | `staging` | `website-stg` | Homologação |
97
- | **Production** | `www.pipefy.com` | `master` | `website-prod` | Site oficial |
94
+ | **Local** | `{{projectDomain}}` | `feature/*` | - | Desenvolvimento local |
95
+ | **Development** | `{{projectDevDomain}}` | `development` | `website-dev` | Testes contínuos |
96
+ | **Staging** | `{{projectStagingDomain}}` | `staging` | `website-stg` | Homologação |
97
+ | **Production** | `{{projectProductionDomain}}` | `master` | `website-prod` | Site oficial |
98
98
 
99
99
  ## 🔄 **Workflow de Desenvolvimento**
100
100
 
@@ -103,12 +103,12 @@ graph LR
103
103
  A[Feature Branch] --> B[Pull Request]
104
104
  B --> C[Code Review]
105
105
  C --> D[Merge to Development]
106
- D --> E["🚀 development-www.pipefy.com"]
106
+ D --> E["🚀 {{projectDevDomain}}"]
107
107
  E --> F[Merge to Staging]
108
- F --> G["🔍 staging-www.pipefy.com"]
108
+ F --> G["🔍 {{projectStagingDomain}}"]
109
109
  G --> H[Tests + QA]
110
110
  H --> I[Merge to Master]
111
- I --> J["✅ www.pipefy.com"]
111
+ I --> J["✅ {{projectProductionDomain}}"]
112
112
  ```
113
113
 
114
114
  ## 📚 **Documentação Principal**
@@ -126,8 +126,8 @@ graph LR
126
126
 
127
127
  ### 📦 **Para Gestão**
128
128
  - [Plugins & Integrações](Plugins-Integracoes) - Componentes externos
129
- - [Changelog](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md) - Histórico de versões
130
- - [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS) - Responsabilidades
129
+ - [Changelog]({{repositoryWebUrl}}/-/blob/master/CHANGELOG.md) - Histórico de versões
130
+ - [CODEOWNERS]({{repositoryWebUrl}}/-/blob/master/CODEOWNERS) - Responsabilidades
131
131
 
132
132
  ## 🆘 **Precisa de Ajuda?**
133
133
 
@@ -136,20 +136,20 @@ graph LR
136
136
  - [FAQ](FAQ) - Perguntas frequentes
137
137
 
138
138
  ### 📞 **Contatos**
139
- - **Equipe**: @Approvers (conforme [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS))
140
- - **Issues**: [GitLab Issues](https://gitlab.com/pipefy/wordpress/pipefy-website/-/issues)
141
- - **Pipefy Cards**: Vinculados no [CHANGELOG.md](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md)
139
+ - **Equipe**: @Approvers (conforme [CODEOWNERS]({{repositoryWebUrl}}/-/blob/master/CODEOWNERS))
140
+ - **Issues**: [GitLab Issues]({{repositoryWebUrl}}/-/issues)
141
+ - **{{projectTitle}} Cards**: Vinculados no [CHANGELOG.md]({{repositoryWebUrl}}/-/blob/master/CHANGELOG.md)
142
142
 
143
143
  ## 🎯 **Links Importantes**
144
144
 
145
145
  | Recurso | Link | Ambiente |
146
146
  |---------|------|----------|
147
- | **Site Produção** | [www.pipefy.com](https://www.pipefy.com) | 🔴 Production |
148
- | **Site Staging** | [staging-www.pipefy.com](https://staging-www.pipefy.com) | 🟡 Staging |
149
- | **Site Development** | [development-www.pipefy.com](https://development-www.pipefy.com) | 🟠 Development |
150
- | **Site Local** | [pipefy.lndo.site](https://pipefy.lndo.site) | 🔵 Local |
151
- | **GitLab Project** | [pipefy/wordpress/pipefy-website](https://gitlab.com/pipefy/wordpress/pipefy-website) | - |
152
- | **CI/CD Pipelines** | [Pipelines](https://gitlab.com/pipefy/wordpress/pipefy-website/-/pipelines) | - |
147
+ | **Site Produção** | [{{projectProductionDomain}}](https://{{projectProductionDomain}}) | 🔴 Production |
148
+ | **Site Staging** | [{{projectStagingDomain}}](https://{{projectStagingDomain}}) | 🟡 Staging |
149
+ | **Site Development** | [{{projectDevDomain}}](https://{{projectDevDomain}}) | 🟠 Development |
150
+ | **Site Local** | [{{projectDomain}}](https://{{projectDomain}}) | 🔵 Local |
151
+ | **GitLab Project** | [{{repositoryPath}}]({{repositoryWebUrl}}) | - |
152
+ | **CI/CD Pipelines** | [Pipelines]({{repositoryWebUrl}}/-/pipelines) | - |
153
153
  | **Kubernetes Dashboards** | *[Links internos conforme ambiente]* | - |
154
154
 
155
155
  ---
@@ -1,10 +1,10 @@
1
1
  # 🏗️ Arquitetura
2
2
 
3
- Documentação completa da arquitetura técnica do site Pipefy, incluindo infraestrutura, tecnologias e planos futuros.
3
+ Documentação completa da arquitetura técnica do site {{projectTitle}}, incluindo infraestrutura, tecnologias e planos futuros.
4
4
 
5
5
  ## 🎯 **Visão Geral da Arquitetura**
6
6
 
7
- O site Pipefy é construído com uma arquitetura moderna e escalável, utilizando WordPress customizado em containers orquestrados por Kubernetes, com pipeline de CI/CD totalmente automatizado.
7
+ O site {{projectTitle}} é construído com uma arquitetura moderna e escalável, utilizando WordPress customizado em containers orquestrados por Kubernetes, com pipeline de CI/CD totalmente automatizado.
8
8
 
9
9
  ## 🏛️ **Arquitetura de Alto Nível**
10
10
 
@@ -12,7 +12,7 @@ O site Pipefy é construído com uma arquitetura moderna e escalável, utilizand
12
12
  graph TB
13
13
  subgraph "👨‍💻 Desenvolvimento"
14
14
  DEV[Desenvolvedores]
15
- LOCAL[pipefy.lndo.site<br/>Lando + Docker]
15
+ LOCAL[{{projectDomain}}<br/>Lando + Docker]
16
16
  end
17
17
 
18
18
  subgraph "🔄 CI/CD Pipeline"
@@ -25,9 +25,9 @@ graph TB
25
25
  LB[Load Balancer<br/>OCI]
26
26
 
27
27
  subgraph "🎛️ Kubernetes Cluster"
28
- K8S_DEV[website-dev<br/>development-www.pipefy.com]
29
- K8S_STG[website-stg<br/>staging-www.pipefy.com]
30
- K8S_PROD[website-prod<br/>www.pipefy.com]
28
+ K8S_DEV[website-dev<br/>{{projectDevDomain}}]
29
+ K8S_STG[website-stg<br/>{{projectStagingDomain}}]
30
+ K8S_PROD[website-prod<br/>{{projectProductionDomain}}]
31
31
  end
32
32
 
33
33
  subgraph "💾 Persistence"
@@ -63,7 +63,7 @@ graph TB
63
63
  | Componente | Tecnologia | Versão | Finalidade |
64
64
  | ------------- | ------------------------- | ------ | --------------------------------------- |
65
65
  | **CMS** | WordPress | Latest | Sistema de gerenciamento de conteúdo |
66
- | **Tema** | Pipefy 2020 (Custom) | 1.1.7 | Interface e funcionalidades específicas |
66
+ | **Tema** | {{projectTitle}} Theme (Custom) | 1.1.7 | Interface e funcionalidades específicas |
67
67
  | **Blocks** | Gutenberg Custom Blocks | - | Blocos personalizados para editores |
68
68
  | **Languages** | PHP, JavaScript, CSS/Sass | - | Desenvolvimento frontend/backend |
69
69
 
@@ -103,26 +103,26 @@ graph TB
103
103
  # Kubernetes Namespaces Structure
104
104
  environments:
105
105
  local:
106
- url: 'pipefy.lndo.site'
106
+ url: '{{projectDomain}}'
107
107
  type: 'Lando Container'
108
108
  purpose: 'Desenvolvimento local'
109
109
 
110
110
  development:
111
- url: 'development-www.pipefy.com'
111
+ url: '{{projectDevDomain}}'
112
112
  namespace: 'website-dev'
113
113
  branch: 'development'
114
114
  auto_deploy: true
115
115
  purpose: 'Testes contínuos e integração'
116
116
 
117
117
  staging:
118
- url: 'staging-www.pipefy.com'
118
+ url: '{{projectStagingDomain}}'
119
119
  namespace: 'website-stg'
120
120
  branch: 'staging'
121
121
  auto_deploy: false
122
122
  purpose: 'Homologação e testes finais'
123
123
 
124
124
  production:
125
- url: 'www.pipefy.com'
125
+ url: '{{projectProductionDomain}}'
126
126
  namespace: 'website-prod'
127
127
  branch: 'master'
128
128
  auto_deploy: false
@@ -170,7 +170,7 @@ k8s/
170
170
 
171
171
  ```
172
172
  helm/
173
- ├── 📂 pipefy-website/ # Chart principal
173
+ ├── 📂 {{projectName}}/ # Chart principal
174
174
  │ ├── 📄 Chart.yaml # Metadados do chart
175
175
  │ ├── 📄 values.yaml # Valores padrão
176
176
  │ ├── 📂 templates/ # Templates Kubernetes
@@ -206,9 +206,9 @@ graph LR
206
206
  G --> J[website-stg namespace]
207
207
  H --> K[website-prod namespace]
208
208
 
209
- I --> L[development-www.pipefy.com]
210
- J --> M[staging-www.pipefy.com]
211
- K --> N[www.pipefy.com]
209
+ I --> L[{{projectDevDomain}}]
210
+ J --> M[{{projectStagingDomain}}]
211
+ K --> N[{{projectProductionDomain}}]
212
212
  ```
213
213
 
214
214
  ### **🎯 Pipeline Futuro (Helm)**
@@ -228,9 +228,9 @@ graph LR
228
228
  G --> J[website-stg namespace]
229
229
  H --> K[website-prod namespace]
230
230
 
231
- I --> L[development-www.pipefy.com]
232
- J --> M[staging-www.pipefy.com]
233
- K --> N[www.pipefy.com]
231
+ I --> L[{{projectDevDomain}}]
232
+ J --> M[{{projectStagingDomain}}]
233
+ K --> N[{{projectProductionDomain}}]
234
234
  ```
235
235
 
236
236
  ## 🛡️ **Segurança e Monitoramento**
@@ -360,7 +360,7 @@ kubectl get services -n website-prod
360
360
  kubectl get ingress -n website-prod
361
361
 
362
362
  # Logs e debugging
363
- kubectl logs -f deployment/pipefy-website -n website-prod
363
+ kubectl logs -f deployment/{{projectName}} -n website-prod
364
364
  kubectl describe pod <pod-name> -n website-prod
365
365
  ```
366
366
 
@@ -368,16 +368,16 @@ kubectl describe pod <pod-name> -n website-prod
368
368
 
369
369
  ```bash
370
370
  # Deploy usando Helm
371
- helm upgrade --install pipefy-dev ./helm/pipefy-website -f helm/environments/values-dev.yaml -n website-dev
372
- helm upgrade --install pipefy-stg ./helm/pipefy-website -f helm/environments/values-stg.yaml -n website-stg
373
- helm upgrade --install pipefy-prod ./helm/pipefy-website -f helm/environments/values-prod.yaml -n website-prod
371
+ helm upgrade --install {{projectName}}-dev ./helm/{{projectName}} -f helm/environments/values-dev.yaml -n website-dev
372
+ helm upgrade --install {{projectName}}-stg ./helm/{{projectName}} -f helm/environments/values-stg.yaml -n website-stg
373
+ helm upgrade --install {{projectName}}-prod ./helm/{{projectName}} -f helm/environments/values-prod.yaml -n website-prod
374
374
 
375
375
  # Verificar releases
376
376
  helm list -n website-prod
377
- helm status pipefy-prod -n website-prod
377
+ helm status {{projectName}}-prod -n website-prod
378
378
 
379
379
  # Rollback se necessário
380
- helm rollback pipefy-prod 1 -n website-prod
380
+ helm rollback {{projectName}}-prod 1 -n website-prod
381
381
  ```
382
382
 
383
383
  ## 📊 **Métricas e Performance**
@@ -407,9 +407,9 @@ helm rollback pipefy-prod 1 -n website-prod
407
407
 
408
408
  ## 📞 **Suporte Técnico**
409
409
 
410
- - **Infraestrutura**: Equipe DevOps (ver [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS))
411
- - **Kubernetes Issues**: [GitLab Issues - Label: infrastructure](https://gitlab.com/pipefy/wordpress/pipefy-website/-/issues?label_name=infrastructure)
412
- - **Helm Planning**: [GitLab Issues - Label: helm-migration](https://gitlab.com/pipefy/wordpress/pipefy-website/-/issues?label_name=helm-migration)
410
+ - **Infraestrutura**: Equipe DevOps (ver [CODEOWNERS]({{repositoryWebUrl}}/-/blob/master/CODEOWNERS))
411
+ - **Kubernetes Issues**: [GitLab Issues - Label: infrastructure]({{repositoryWebUrl}}/-/issues?label_name=infrastructure)
412
+ - **Helm Planning**: [GitLab Issues - Label: helm-migration]({{repositoryWebUrl}}/-/issues?label_name=helm-migration)
413
413
 
414
414
  ---
415
415
 
@@ -1,8 +1,8 @@
1
- # Pipeline CI/CD - Pipefy Website
1
+ # Pipeline CI/CD - {{projectTitle}} Website
2
2
 
3
3
  ## Visão Geral
4
4
 
5
- Pipeline automatizado para deploy do WordPress da Pipefy com integração ao fluxo de desenvolvimento da equipe.
5
+ Pipeline automatizado para deploy do WordPress da {{projectTitle}} com integração ao fluxo de desenvolvimento da equipe.
6
6
 
7
7
  ## Ambientes e Triggers
8
8
 
@@ -10,19 +10,19 @@ Pipeline automatizado para deploy do WordPress da Pipefy com integração ao flu
10
10
 
11
11
  - **Trigger**: Push na branch `develop`
12
12
  - **Namespace**: `website-dev`
13
- - **URL Cache**: `assets-site.staticpipefy.com/development/`
13
+ - **URL Cache**: `assets-site.static{{projectName}}.com/development/`
14
14
 
15
15
  ### Staging
16
16
 
17
17
  - **Trigger**: Push na branch `staging`
18
18
  - **Namespace**: `website-stg`
19
- - **URL Cache**: `assets-site.staticpipefy.com/staging/`
19
+ - **URL Cache**: `assets-site.static{{projectName}}.com/staging/`
20
20
 
21
21
  ### Production
22
22
 
23
23
  - **Trigger**: Push na branch `master` (apenas de branches `release/*` ou `hotfix/*`)
24
24
  - **Namespace**: `website-prod`
25
- - **URL Cache**: `assets-site.staticpipefy.com/production/`
25
+ - **URL Cache**: `assets-site.static{{projectName}}.com/production/`
26
26
 
27
27
  ## Stages do Pipeline
28
28
 
@@ -106,7 +106,7 @@ Pipeline automatizado para deploy do WordPress da Pipefy com integração ao flu
106
106
  ### 📋 Processo de Restauração
107
107
 
108
108
  1. **🎯 Acesse o GitLab:**
109
- - Navegue até [CI/CD → Schedules](https://gitlab.com/pipefy/wordpress/pipefy-website/-/pipeline_schedules)
109
+ - Navegue até [CI/CD → Schedules]({{repositoryWebUrl}}/-/pipeline_schedules)
110
110
 
111
111
  2. **📥 Backup do Banco de Produção:**
112
112
  - Clique no botão ▶️ **Play** no pipeline agendado `Download Prod Database`