@adriankulik/create-fullstack-app 1.0.1 → 1.2.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.
- package/README.md +5 -1
- package/cli/index.js +11 -0
- package/package.json +1 -1
- package/templates/base/.agents/skills/accessibility-general/SKILL.md +231 -0
- package/templates/base/.agents/skills/senior-frontend/SKILL.md +209 -0
- package/templates/base/.agents/skills/senior-frontend/references/frontend_best_practices.md +103 -0
- package/templates/base/.agents/skills/senior-frontend/references/nextjs_optimization_guide.md +103 -0
- package/templates/base/.agents/skills/senior-frontend/references/react_patterns.md +103 -0
- package/templates/base/.agents/skills/senior-frontend/scripts/bundle_analyzer.py +114 -0
- package/templates/base/.agents/skills/senior-frontend/scripts/component_generator.py +114 -0
- package/templates/base/.agents/skills/senior-frontend/scripts/frontend_scaffolder.py +114 -0
- package/templates/base/.agents/skills/senior-fullstack/SKILL.md +209 -0
- package/templates/base/.agents/skills/senior-fullstack/references/architecture_patterns.md +103 -0
- package/templates/base/.agents/skills/senior-fullstack/references/development_workflows.md +103 -0
- package/templates/base/.agents/skills/senior-fullstack/references/tech_stack_guide.md +103 -0
- package/templates/base/.agents/skills/senior-fullstack/scripts/code_quality_analyzer.py +114 -0
- package/templates/base/.agents/skills/senior-fullstack/scripts/fullstack_scaffolder.py +114 -0
- package/templates/base/.agents/skills/senior-fullstack/scripts/project_scaffolder.py +114 -0
- package/templates/base/.agents/skills/senior-qa/SKILL.md +209 -0
- package/templates/base/.agents/skills/senior-qa/references/qa_best_practices.md +103 -0
- package/templates/base/.agents/skills/senior-qa/references/test_automation_patterns.md +103 -0
- package/templates/base/.agents/skills/senior-qa/references/testing_strategies.md +103 -0
- package/templates/base/.agents/skills/senior-qa/scripts/coverage_analyzer.py +114 -0
- package/templates/base/.agents/skills/senior-qa/scripts/e2e_test_scaffolder.py +114 -0
- package/templates/base/.agents/skills/senior-qa/scripts/test_suite_generator.py +114 -0
- package/templates/base/ACCESSIBILITY.md +117 -0
- package/templates/base/{GEMINI.md → AGENTS.md} +1 -1
- package/templates/base/README.md +12 -0
package/README.md
CHANGED
|
@@ -34,7 +34,11 @@ You will be prompted to choose a project name, your preferred frontend, and back
|
|
|
34
34
|
- **Opinionated Defaults**: We bake in sensible, predefined choices (e.g., Angular uses `zone.js`, testing is unified under Playwright and framework-native test runners).
|
|
35
35
|
- **Unified Scripts**: `start.sh`, `test.sh`, and `lint.sh` available out of the box to manage both frontend and backend seamlessly.
|
|
36
36
|
- **CI/CD Ready**: Includes a pre-configured `.github/workflows/cli-e2e.yml` that tests both ends. *Tip: To enforce this, enable branch protection in your GitHub repository settings and require the "test" status check to pass.*
|
|
37
|
-
- **Developer Experience**: Includes `.vscode/extensions.json` recommending the necessary linters and formatters, and
|
|
37
|
+
- **Developer Experience**: Includes `.vscode/extensions.json` recommending the necessary linters and formatters, and an `AGENTS.md` file providing behavioral guidelines for AI agents (based on [andrej-karpathy-skills](https://github.com/forrestchang/andrej-karpathy-skills)). It is AI development friendly, including an extensive set of agent skills in `.agents/skills` sourced from [claude-skills](https://github.com/alirezarezvani/claude-skills).
|
|
38
|
+
<details>
|
|
39
|
+
<summary>Included Agent Skills</summary>
|
|
40
|
+
<p>senior-frontend, senior-qa, senior-fullstack, accessibility-general</p>
|
|
41
|
+
</details>
|
|
38
42
|
|
|
39
43
|
## Generated Project
|
|
40
44
|
|
package/cli/index.js
CHANGED
|
@@ -144,6 +144,17 @@ async function main() {
|
|
|
144
144
|
console.log(pc.yellow(' Could not set up Python virtual environment automatically. Please set it up manually.'));
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
// 7. Initialize Git repository
|
|
148
|
+
console.log(pc.blue('\nInitializing Git repository...'));
|
|
149
|
+
try {
|
|
150
|
+
execSync('git init', { cwd: targetDir, stdio: 'ignore' });
|
|
151
|
+
execSync('git add .', { cwd: targetDir, stdio: 'ignore' });
|
|
152
|
+
execSync('git commit -m "Initial commit from create-fullstack-app"', { cwd: targetDir, stdio: 'ignore' });
|
|
153
|
+
console.log(pc.cyan(' Git repository initialized.'));
|
|
154
|
+
} catch (e) {
|
|
155
|
+
console.log(pc.yellow(' Could not initialize Git repository automatically. You may need to run git init yourself.'));
|
|
156
|
+
}
|
|
157
|
+
|
|
147
158
|
console.log(pc.green(`\nSuccess! Created ${projectName} at ${targetDir}`));
|
|
148
159
|
console.log('\nInside that directory, you can run several commands:\n');
|
|
149
160
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: accessibility-general
|
|
3
|
+
description: >
|
|
4
|
+
Load this skill immediately whenever a project contains an ACCESSIBILITY.md
|
|
5
|
+
file, or whenever you are contributing to the mgifford/ACCESSIBILITY.md
|
|
6
|
+
repository. Absolutely always read ACCESSIBILITY.md before proposing or
|
|
7
|
+
writing any changes. Under no circumstances skip this skill when an
|
|
8
|
+
ACCESSIBILITY.md file is present. This skill governs when and how all other
|
|
9
|
+
accessibility topic skills must be loaded.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ACCESSIBILITY.md Agent Skill
|
|
13
|
+
|
|
14
|
+
This skill teaches AI coding agents how to use the ACCESSIBILITY.md framework,
|
|
15
|
+
including when to load topic-specific skills, how to apply examples, and what
|
|
16
|
+
the project's non-negotiable requirements are.
|
|
17
|
+
|
|
18
|
+
> **Scope**: Apply this skill whenever working in any project that has an
|
|
19
|
+
> `ACCESSIBILITY.md` file at its root, or when contributing to the
|
|
20
|
+
> `mgifford/ACCESSIBILITY.md` repository itself.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## What ACCESSIBILITY.md Is
|
|
25
|
+
|
|
26
|
+
`ACCESSIBILITY.md` is a documentation standard — a predictable, machine-readable
|
|
27
|
+
place to find a project's:
|
|
28
|
+
|
|
29
|
+
- Conformance target (e.g., WCAG 2.2 AA)
|
|
30
|
+
- CI/automated guardrails
|
|
31
|
+
- Assistive technology coverage
|
|
32
|
+
- Known gaps and open issues
|
|
33
|
+
- Definition of Done for accessibility
|
|
34
|
+
|
|
35
|
+
Read `ACCESSIBILITY.md` before proposing or writing changes to any project that
|
|
36
|
+
has one. It is the source of truth for that project's accessibility requirements.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Topic Skills: When to Load Them
|
|
41
|
+
|
|
42
|
+
This repo ships per-topic skills in `skills/`. Load the relevant one **only when
|
|
43
|
+
that feature area is present in the project** — a project without forms does not
|
|
44
|
+
need the forms skill. Each skill is a distillation of a full best practices guide
|
|
45
|
+
in the `mgifford/ACCESSIBILITY.md` `examples/` directory.
|
|
46
|
+
|
|
47
|
+
| When the project includes… | Load skill |
|
|
48
|
+
| --------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
49
|
+
| Color themes, dark/light mode | `skills/light-dark-mode/SKILL.md` |
|
|
50
|
+
| Forms, inputs, validation | `skills/forms/SKILL.md` _(if forms are present)_ |
|
|
51
|
+
| SVG graphics | `skills/svg/SKILL.md` _(if SVGs are present)_ |
|
|
52
|
+
| Charts and data visualization | `skills/charts-graphs/SKILL.md` _(if charts are present)_ |
|
|
53
|
+
| Keyboard interaction / custom widgets | `skills/keyboard/SKILL.md` |
|
|
54
|
+
| Tooltips | `skills/tooltips/SKILL.md` _(if tooltips are present)_ |
|
|
55
|
+
| Audio/video media | `skills/audio-video/SKILL.md` _(if media is present)_ |
|
|
56
|
+
| Maps | `skills/maps/SKILL.md` _(if maps are present)_ |
|
|
57
|
+
| Print styles | `skills/print/SKILL.md` _(if print CSS is in scope)_ |
|
|
58
|
+
| Mermaid diagrams | `skills/mermaid/SKILL.md` _(if Mermaid is used)_ |
|
|
59
|
+
| Anchor links / in-page navigation | `skills/anchor-links/SKILL.md` _(if anchor links are present)_ |
|
|
60
|
+
| Accessibility bug reporting | `skills/bug-reporting/SKILL.md` _(when filing or reviewing bug reports)_ |
|
|
61
|
+
| Content design and plain language | `skills/content-design/SKILL.md` |
|
|
62
|
+
| User personalization / preferences | `skills/user-personalization/SKILL.md` _(if personalization features are present)_ |
|
|
63
|
+
| Digital quality (Opquast) | `skills/opquast-digital-quality/SKILL.md` |
|
|
64
|
+
| axe-core scans / automated rule results | `skills/axe-rules/SKILL.md` |
|
|
65
|
+
| Manual / assistive-technology testing | `skills/manual-testing/SKILL.md` |
|
|
66
|
+
|
|
67
|
+
If a skill file is not present, fall back to the corresponding file in the
|
|
68
|
+
`mgifford/ACCESSIBILITY.md` `examples/` directory.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Non-Negotiable Requirements
|
|
73
|
+
|
|
74
|
+
These apply to every task, regardless of which topic skill you load:
|
|
75
|
+
|
|
76
|
+
### WCAG 2.2 Level AA
|
|
77
|
+
|
|
78
|
+
All code examples, components, and documentation must comply. Key criteria:
|
|
79
|
+
|
|
80
|
+
- 1.4.3 Contrast Minimum (4.5:1 text, 3:1 large text)
|
|
81
|
+
- 1.4.11 Non-text Contrast (3:1 for UI components)
|
|
82
|
+
- 2.4.7 Focus Visible
|
|
83
|
+
- 2.4.11 Focus Appearance (WCAG 2.2)
|
|
84
|
+
- 1.3.1 Info and Relationships
|
|
85
|
+
- 4.1.2 Name, Role, Value
|
|
86
|
+
|
|
87
|
+
### Semantic HTML first
|
|
88
|
+
|
|
89
|
+
Use the correct HTML element before reaching for ARIA. ARIA supplements HTML; it does not replace it.
|
|
90
|
+
|
|
91
|
+
### Keyboard navigation
|
|
92
|
+
|
|
93
|
+
Every interactive element must be reachable and operable via keyboard alone. Tab order must be logical.
|
|
94
|
+
|
|
95
|
+
### Text alternatives
|
|
96
|
+
|
|
97
|
+
Every image, icon, chart, and diagram needs a text alternative. `aria-hidden="true"` is correct for purely decorative elements.
|
|
98
|
+
|
|
99
|
+
### Color independence
|
|
100
|
+
|
|
101
|
+
Never convey information by color alone. Always pair color with icon, label, or pattern.
|
|
102
|
+
|
|
103
|
+
### No accessibility regressions
|
|
104
|
+
|
|
105
|
+
Never propose a change that introduces a WCAG 2.2 AA violation, even if the change is otherwise an improvement.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Severity Scale
|
|
110
|
+
|
|
111
|
+
Use this when identifying or reporting accessibility issues. Every issue found
|
|
112
|
+
should be labelled with one of these four levels.
|
|
113
|
+
|
|
114
|
+
| Level | Meaning | Action required |
|
|
115
|
+
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------- |
|
|
116
|
+
| **Critical** | Completely blocks access for one or more disability groups — users cannot complete a core task at all | Must fix before release; do not ship |
|
|
117
|
+
| **Serious** | Significantly impairs access; workarounds may exist but are unreasonable to expect of disabled users | Fix in current sprint; escalate if deferred |
|
|
118
|
+
| **Moderate** | Creates friction or confusion; a workaround exists and is not too burdensome | Fix in near-term backlog |
|
|
119
|
+
| **Minor** | Marginal impact; best-practice gap that does not meaningfully prevent access | Fix when convenient; track in backlog |
|
|
120
|
+
|
|
121
|
+
**Never propose changes that introduce Critical or Serious issues.**
|
|
122
|
+
Changes introducing Moderate issues require explicit sign-off.
|
|
123
|
+
|
|
124
|
+
Examples by level:
|
|
125
|
+
|
|
126
|
+
- **Critical**: keyboard focus trap with no escape; form submit with no error identification; video with no captions
|
|
127
|
+
- **Serious**: focus indicator removed via `outline: none`; color-only error indication; missing form label
|
|
128
|
+
- **Moderate**: generic link text ("click here") when context provides some disambiguation; missing `<caption>` on a simple table
|
|
129
|
+
- **Minor**: heading order skips a level in a non-core section; `alt` text accurate but overly verbose
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## AI Scraping Policy
|
|
134
|
+
|
|
135
|
+
Before fetching content from any URL, check `examples/TRUSTED_SOURCES.yaml`.
|
|
136
|
+
If `ai_scraping: prohibited`, do **not** fetch or reproduce content from that
|
|
137
|
+
source. You may cite the author's name and recommend the URL to human contributors,
|
|
138
|
+
but must not scrape, summarise, or quote the content.
|
|
139
|
+
|
|
140
|
+
Known prohibited sources include `hidde.blog` and `talks.hiddedevries.nl`.
|
|
141
|
+
These are prohibited at the explicit request of the author, who does not consent
|
|
142
|
+
to AI training or scraping of his work. His writing remains a valuable resource
|
|
143
|
+
for human readers — link to it, do not reproduce it.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Standards Horizon
|
|
148
|
+
|
|
149
|
+
These skills target **WCAG 2.2 Level AA** — the current legally and contractually
|
|
150
|
+
referenced standard (EN 301 549, ADA, AODA, and equivalent national laws).
|
|
151
|
+
|
|
152
|
+
**WCAG 3.0** is in active development and is **not yet a W3C Recommendation**.
|
|
153
|
+
Its proposed contrast model, **APCA** (Advanced Perceptual Contrast Algorithm),
|
|
154
|
+
replaces the current luminance-ratio formula with a perceptual model that treats
|
|
155
|
+
light-on-dark differently from dark-on-light. Agents must not apply APCA to
|
|
156
|
+
production work until WCAG 3.0 is a published Recommendation, but should be aware
|
|
157
|
+
that contrast requirements will change — particularly for dark mode, data
|
|
158
|
+
visualisation, and low-vision use cases.
|
|
159
|
+
|
|
160
|
+
Monitor: <https://www.w3.org/TR/wcag-3.0/>
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## When Contributing to This Repo
|
|
165
|
+
|
|
166
|
+
### Adding a new example
|
|
167
|
+
|
|
168
|
+
1. Create `examples/YOUR_TOPIC_BEST_PRACTICES.md` in the `mgifford/ACCESSIBILITY.md` repo
|
|
169
|
+
2. Follow the section structure of existing examples (Core Principle → Requirements → Patterns → Testing → Definition of Done → References)
|
|
170
|
+
3. Add an entry to `examples/README.md`
|
|
171
|
+
4. Add a reference in `AGENTS.md`
|
|
172
|
+
5. Create a corresponding skill (see below)
|
|
173
|
+
|
|
174
|
+
### Adding a new skill (derived from an example)
|
|
175
|
+
|
|
176
|
+
1. Create `skills/your-topic/SKILL.md` — distill the example into agent-actionable rules; label every requirement with its severity level (Critical / Serious / Moderate / Minor)
|
|
177
|
+
2. Create `skills/your-topic/SYNC.md` — set `canonical_source` to the example path in `mgifford/ACCESSIBILITY.md`; leave `last_synced_commit` blank
|
|
178
|
+
3. Create `skills/your-topic/README.md`
|
|
179
|
+
4. Build the ZIP: `cd skills && zip -r your-topic.skill your-topic/`
|
|
180
|
+
5. Register in `skills/README.md` and `index.md`
|
|
181
|
+
6. The `skill-sync-check.yml` action will automatically track drift going forward
|
|
182
|
+
|
|
183
|
+
### Updating a skill after its example changes
|
|
184
|
+
|
|
185
|
+
The `skill-sync-check.yml` GitHub Action opens an issue or PR comment when
|
|
186
|
+
an example changes and its skill's `last_synced_commit` is stale.
|
|
187
|
+
|
|
188
|
+
When you see that issue:
|
|
189
|
+
|
|
190
|
+
1. Review the diff linked in the issue
|
|
191
|
+
2. Update `skills/your-topic/SKILL.md` to reflect any new requirements or removed patterns
|
|
192
|
+
3. Update `last_synced_commit` in `SYNC.md` to the current commit SHA
|
|
193
|
+
4. Rebuild the `.skill` ZIP
|
|
194
|
+
|
|
195
|
+
### Disclosing AI usage
|
|
196
|
+
|
|
197
|
+
Update the **AI Disclosure** section in `README.md` when using AI tools to make
|
|
198
|
+
changes. Record which LLM was used and for what purpose. Only list tools actually used.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Quick Reference
|
|
203
|
+
|
|
204
|
+
- Full examples: `mgifford/ACCESSIBILITY.md` → `examples/` directory
|
|
205
|
+
- Per-topic skills: `skills/` directory (this repo)
|
|
206
|
+
- Project accessibility commitment: `ACCESSIBILITY.md`
|
|
207
|
+
- Sustainability policy: `SUSTAINABILITY.md` / <https://github.com/mgifford/SUSTAINABILITY.md>
|
|
208
|
+
- Contribution guide: `CONTRIBUTING.md`
|
|
209
|
+
- Trusted sources: `examples/TRUSTED_SOURCES.yaml`
|
|
210
|
+
- Machine-readable WCAG: [wai-yaml-ld](https://github.com/mgifford/wai-yaml-ld)
|
|
211
|
+
- WAI-ARIA Authoring Practices Guide: <https://www.w3.org/WAI/ARIA/apg/>
|
|
212
|
+
- WCAG 3.0 draft: <https://www.w3.org/TR/wcag-3.0/>
|
|
213
|
+
|
|
214
|
+
## Alternative: Frontend-Focused Minimal Accessibility Skill
|
|
215
|
+
|
|
216
|
+
For a complementary frontend skill that emphasises trusting the browser and writing as
|
|
217
|
+
little code as possible, see **[mikemai2awesome/agent-skills — `frontend-a11y`](https://github.com/mikemai2awesome/agent-skills/tree/main/skills/frontend-a11y)**.
|
|
218
|
+
|
|
219
|
+
That skill covers:
|
|
220
|
+
|
|
221
|
+
- Using native HTML elements (`<dialog>`, `<details>`, `<button>`) instead of ARIA-hacked divs
|
|
222
|
+
- Avoiding redundant ARIA roles on landmark elements
|
|
223
|
+
- Using ARIA attribute selectors (`[aria-expanded="true"]`) as CSS hooks
|
|
224
|
+
- Safe fade-in animation patterns that do not break screen reader announcement order
|
|
225
|
+
- Native `<dialog>` with `showModal()` for focus-trap-free modal dialogs
|
|
226
|
+
|
|
227
|
+
Install it alongside this skill:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
npx skills add mikemai2awesome/agent-skills --skill frontend-a11y
|
|
231
|
+
```
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: senior-frontend
|
|
3
|
+
description: Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Senior Frontend
|
|
7
|
+
|
|
8
|
+
Complete toolkit for senior frontend with modern tools and best practices.
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
### Main Capabilities
|
|
13
|
+
|
|
14
|
+
This skill provides three core capabilities through automated scripts:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Script 1: Component Generator
|
|
18
|
+
python scripts/component_generator.py [options]
|
|
19
|
+
|
|
20
|
+
# Script 2: Bundle Analyzer
|
|
21
|
+
python scripts/bundle_analyzer.py [options]
|
|
22
|
+
|
|
23
|
+
# Script 3: Frontend Scaffolder
|
|
24
|
+
python scripts/frontend_scaffolder.py [options]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Core Capabilities
|
|
28
|
+
|
|
29
|
+
### 1. Component Generator
|
|
30
|
+
|
|
31
|
+
Automated tool for component generator tasks.
|
|
32
|
+
|
|
33
|
+
**Features:**
|
|
34
|
+
- Automated scaffolding
|
|
35
|
+
- Best practices built-in
|
|
36
|
+
- Configurable templates
|
|
37
|
+
- Quality checks
|
|
38
|
+
|
|
39
|
+
**Usage:**
|
|
40
|
+
```bash
|
|
41
|
+
python scripts/component_generator.py <project-path> [options]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Bundle Analyzer
|
|
45
|
+
|
|
46
|
+
Comprehensive analysis and optimization tool.
|
|
47
|
+
|
|
48
|
+
**Features:**
|
|
49
|
+
- Deep analysis
|
|
50
|
+
- Performance metrics
|
|
51
|
+
- Recommendations
|
|
52
|
+
- Automated fixes
|
|
53
|
+
|
|
54
|
+
**Usage:**
|
|
55
|
+
```bash
|
|
56
|
+
python scripts/bundle_analyzer.py <target-path> [--verbose]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. Frontend Scaffolder
|
|
60
|
+
|
|
61
|
+
Advanced tooling for specialized tasks.
|
|
62
|
+
|
|
63
|
+
**Features:**
|
|
64
|
+
- Expert-level automation
|
|
65
|
+
- Custom configurations
|
|
66
|
+
- Integration ready
|
|
67
|
+
- Production-grade output
|
|
68
|
+
|
|
69
|
+
**Usage:**
|
|
70
|
+
```bash
|
|
71
|
+
python scripts/frontend_scaffolder.py [arguments] [options]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Reference Documentation
|
|
75
|
+
|
|
76
|
+
### React Patterns
|
|
77
|
+
|
|
78
|
+
Comprehensive guide available in `references/react_patterns.md`:
|
|
79
|
+
|
|
80
|
+
- Detailed patterns and practices
|
|
81
|
+
- Code examples
|
|
82
|
+
- Best practices
|
|
83
|
+
- Anti-patterns to avoid
|
|
84
|
+
- Real-world scenarios
|
|
85
|
+
|
|
86
|
+
### Nextjs Optimization Guide
|
|
87
|
+
|
|
88
|
+
Complete workflow documentation in `references/nextjs_optimization_guide.md`:
|
|
89
|
+
|
|
90
|
+
- Step-by-step processes
|
|
91
|
+
- Optimization strategies
|
|
92
|
+
- Tool integrations
|
|
93
|
+
- Performance tuning
|
|
94
|
+
- Troubleshooting guide
|
|
95
|
+
|
|
96
|
+
### Frontend Best Practices
|
|
97
|
+
|
|
98
|
+
Technical reference guide in `references/frontend_best_practices.md`:
|
|
99
|
+
|
|
100
|
+
- Technology stack details
|
|
101
|
+
- Configuration examples
|
|
102
|
+
- Integration patterns
|
|
103
|
+
- Security considerations
|
|
104
|
+
- Scalability guidelines
|
|
105
|
+
|
|
106
|
+
## Tech Stack
|
|
107
|
+
|
|
108
|
+
**Languages:** TypeScript, JavaScript, Python, Go, Swift, Kotlin
|
|
109
|
+
**Frontend:** React, Next.js, React Native, Flutter
|
|
110
|
+
**Backend:** Node.js, Express, GraphQL, REST APIs
|
|
111
|
+
**Database:** PostgreSQL, Prisma, NeonDB, Supabase
|
|
112
|
+
**DevOps:** Docker, Kubernetes, Terraform, GitHub Actions, CircleCI
|
|
113
|
+
**Cloud:** AWS, GCP, Azure
|
|
114
|
+
|
|
115
|
+
## Development Workflow
|
|
116
|
+
|
|
117
|
+
### 1. Setup and Configuration
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Install dependencies
|
|
121
|
+
npm install
|
|
122
|
+
# or
|
|
123
|
+
pip install -r requirements.txt
|
|
124
|
+
|
|
125
|
+
# Configure environment
|
|
126
|
+
cp .env.example .env
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 2. Run Quality Checks
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Use the analyzer script
|
|
133
|
+
python scripts/bundle_analyzer.py .
|
|
134
|
+
|
|
135
|
+
# Review recommendations
|
|
136
|
+
# Apply fixes
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 3. Implement Best Practices
|
|
140
|
+
|
|
141
|
+
Follow the patterns and practices documented in:
|
|
142
|
+
- `references/react_patterns.md`
|
|
143
|
+
- `references/nextjs_optimization_guide.md`
|
|
144
|
+
- `references/frontend_best_practices.md`
|
|
145
|
+
|
|
146
|
+
## Best Practices Summary
|
|
147
|
+
|
|
148
|
+
### Code Quality
|
|
149
|
+
- Follow established patterns
|
|
150
|
+
- Write comprehensive tests
|
|
151
|
+
- Document decisions
|
|
152
|
+
- Review regularly
|
|
153
|
+
|
|
154
|
+
### Performance
|
|
155
|
+
- Measure before optimizing
|
|
156
|
+
- Use appropriate caching
|
|
157
|
+
- Optimize critical paths
|
|
158
|
+
- Monitor in production
|
|
159
|
+
|
|
160
|
+
### Security
|
|
161
|
+
- Validate all inputs
|
|
162
|
+
- Use parameterized queries
|
|
163
|
+
- Implement proper authentication
|
|
164
|
+
- Keep dependencies updated
|
|
165
|
+
|
|
166
|
+
### Maintainability
|
|
167
|
+
- Write clear code
|
|
168
|
+
- Use consistent naming
|
|
169
|
+
- Add helpful comments
|
|
170
|
+
- Keep it simple
|
|
171
|
+
|
|
172
|
+
## Common Commands
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# Development
|
|
176
|
+
npm run dev
|
|
177
|
+
npm run build
|
|
178
|
+
npm run test
|
|
179
|
+
npm run lint
|
|
180
|
+
|
|
181
|
+
# Analysis
|
|
182
|
+
python scripts/bundle_analyzer.py .
|
|
183
|
+
python scripts/frontend_scaffolder.py --analyze
|
|
184
|
+
|
|
185
|
+
# Deployment
|
|
186
|
+
docker build -t app:latest .
|
|
187
|
+
docker-compose up -d
|
|
188
|
+
kubectl apply -f k8s/
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Troubleshooting
|
|
192
|
+
|
|
193
|
+
### Common Issues
|
|
194
|
+
|
|
195
|
+
Check the comprehensive troubleshooting section in `references/frontend_best_practices.md`.
|
|
196
|
+
|
|
197
|
+
### Getting Help
|
|
198
|
+
|
|
199
|
+
- Review reference documentation
|
|
200
|
+
- Check script output messages
|
|
201
|
+
- Consult tech stack documentation
|
|
202
|
+
- Review error logs
|
|
203
|
+
|
|
204
|
+
## Resources
|
|
205
|
+
|
|
206
|
+
- Pattern Reference: `references/react_patterns.md`
|
|
207
|
+
- Workflow Guide: `references/nextjs_optimization_guide.md`
|
|
208
|
+
- Technical Guide: `references/frontend_best_practices.md`
|
|
209
|
+
- Tool Scripts: `scripts/` directory
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Frontend Best Practices
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This reference guide provides comprehensive information for senior frontend.
|
|
6
|
+
|
|
7
|
+
## Patterns and Practices
|
|
8
|
+
|
|
9
|
+
### Pattern 1: Best Practice Implementation
|
|
10
|
+
|
|
11
|
+
**Description:**
|
|
12
|
+
Detailed explanation of the pattern.
|
|
13
|
+
|
|
14
|
+
**When to Use:**
|
|
15
|
+
- Scenario 1
|
|
16
|
+
- Scenario 2
|
|
17
|
+
- Scenario 3
|
|
18
|
+
|
|
19
|
+
**Implementation:**
|
|
20
|
+
```typescript
|
|
21
|
+
// Example code implementation
|
|
22
|
+
export class Example {
|
|
23
|
+
// Implementation details
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Benefits:**
|
|
28
|
+
- Benefit 1
|
|
29
|
+
- Benefit 2
|
|
30
|
+
- Benefit 3
|
|
31
|
+
|
|
32
|
+
**Trade-offs:**
|
|
33
|
+
- Consider 1
|
|
34
|
+
- Consider 2
|
|
35
|
+
- Consider 3
|
|
36
|
+
|
|
37
|
+
### Pattern 2: Advanced Technique
|
|
38
|
+
|
|
39
|
+
**Description:**
|
|
40
|
+
Another important pattern for senior frontend.
|
|
41
|
+
|
|
42
|
+
**Implementation:**
|
|
43
|
+
```typescript
|
|
44
|
+
// Advanced example
|
|
45
|
+
async function advancedExample() {
|
|
46
|
+
// Code here
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Guidelines
|
|
51
|
+
|
|
52
|
+
### Code Organization
|
|
53
|
+
- Clear structure
|
|
54
|
+
- Logical separation
|
|
55
|
+
- Consistent naming
|
|
56
|
+
- Proper documentation
|
|
57
|
+
|
|
58
|
+
### Performance Considerations
|
|
59
|
+
- Optimization strategies
|
|
60
|
+
- Bottleneck identification
|
|
61
|
+
- Monitoring approaches
|
|
62
|
+
- Scaling techniques
|
|
63
|
+
|
|
64
|
+
### Security Best Practices
|
|
65
|
+
- Input validation
|
|
66
|
+
- Authentication
|
|
67
|
+
- Authorization
|
|
68
|
+
- Data protection
|
|
69
|
+
|
|
70
|
+
## Common Patterns
|
|
71
|
+
|
|
72
|
+
### Pattern A
|
|
73
|
+
Implementation details and examples.
|
|
74
|
+
|
|
75
|
+
### Pattern B
|
|
76
|
+
Implementation details and examples.
|
|
77
|
+
|
|
78
|
+
### Pattern C
|
|
79
|
+
Implementation details and examples.
|
|
80
|
+
|
|
81
|
+
## Anti-Patterns to Avoid
|
|
82
|
+
|
|
83
|
+
### Anti-Pattern 1
|
|
84
|
+
What not to do and why.
|
|
85
|
+
|
|
86
|
+
### Anti-Pattern 2
|
|
87
|
+
What not to do and why.
|
|
88
|
+
|
|
89
|
+
## Tools and Resources
|
|
90
|
+
|
|
91
|
+
### Recommended Tools
|
|
92
|
+
- Tool 1: Purpose
|
|
93
|
+
- Tool 2: Purpose
|
|
94
|
+
- Tool 3: Purpose
|
|
95
|
+
|
|
96
|
+
### Further Reading
|
|
97
|
+
- Resource 1
|
|
98
|
+
- Resource 2
|
|
99
|
+
- Resource 3
|
|
100
|
+
|
|
101
|
+
## Conclusion
|
|
102
|
+
|
|
103
|
+
Key takeaways for using this reference guide effectively.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Nextjs Optimization Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This reference guide provides comprehensive information for senior frontend.
|
|
6
|
+
|
|
7
|
+
## Patterns and Practices
|
|
8
|
+
|
|
9
|
+
### Pattern 1: Best Practice Implementation
|
|
10
|
+
|
|
11
|
+
**Description:**
|
|
12
|
+
Detailed explanation of the pattern.
|
|
13
|
+
|
|
14
|
+
**When to Use:**
|
|
15
|
+
- Scenario 1
|
|
16
|
+
- Scenario 2
|
|
17
|
+
- Scenario 3
|
|
18
|
+
|
|
19
|
+
**Implementation:**
|
|
20
|
+
```typescript
|
|
21
|
+
// Example code implementation
|
|
22
|
+
export class Example {
|
|
23
|
+
// Implementation details
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Benefits:**
|
|
28
|
+
- Benefit 1
|
|
29
|
+
- Benefit 2
|
|
30
|
+
- Benefit 3
|
|
31
|
+
|
|
32
|
+
**Trade-offs:**
|
|
33
|
+
- Consider 1
|
|
34
|
+
- Consider 2
|
|
35
|
+
- Consider 3
|
|
36
|
+
|
|
37
|
+
### Pattern 2: Advanced Technique
|
|
38
|
+
|
|
39
|
+
**Description:**
|
|
40
|
+
Another important pattern for senior frontend.
|
|
41
|
+
|
|
42
|
+
**Implementation:**
|
|
43
|
+
```typescript
|
|
44
|
+
// Advanced example
|
|
45
|
+
async function advancedExample() {
|
|
46
|
+
// Code here
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Guidelines
|
|
51
|
+
|
|
52
|
+
### Code Organization
|
|
53
|
+
- Clear structure
|
|
54
|
+
- Logical separation
|
|
55
|
+
- Consistent naming
|
|
56
|
+
- Proper documentation
|
|
57
|
+
|
|
58
|
+
### Performance Considerations
|
|
59
|
+
- Optimization strategies
|
|
60
|
+
- Bottleneck identification
|
|
61
|
+
- Monitoring approaches
|
|
62
|
+
- Scaling techniques
|
|
63
|
+
|
|
64
|
+
### Security Best Practices
|
|
65
|
+
- Input validation
|
|
66
|
+
- Authentication
|
|
67
|
+
- Authorization
|
|
68
|
+
- Data protection
|
|
69
|
+
|
|
70
|
+
## Common Patterns
|
|
71
|
+
|
|
72
|
+
### Pattern A
|
|
73
|
+
Implementation details and examples.
|
|
74
|
+
|
|
75
|
+
### Pattern B
|
|
76
|
+
Implementation details and examples.
|
|
77
|
+
|
|
78
|
+
### Pattern C
|
|
79
|
+
Implementation details and examples.
|
|
80
|
+
|
|
81
|
+
## Anti-Patterns to Avoid
|
|
82
|
+
|
|
83
|
+
### Anti-Pattern 1
|
|
84
|
+
What not to do and why.
|
|
85
|
+
|
|
86
|
+
### Anti-Pattern 2
|
|
87
|
+
What not to do and why.
|
|
88
|
+
|
|
89
|
+
## Tools and Resources
|
|
90
|
+
|
|
91
|
+
### Recommended Tools
|
|
92
|
+
- Tool 1: Purpose
|
|
93
|
+
- Tool 2: Purpose
|
|
94
|
+
- Tool 3: Purpose
|
|
95
|
+
|
|
96
|
+
### Further Reading
|
|
97
|
+
- Resource 1
|
|
98
|
+
- Resource 2
|
|
99
|
+
- Resource 3
|
|
100
|
+
|
|
101
|
+
## Conclusion
|
|
102
|
+
|
|
103
|
+
Key takeaways for using this reference guide effectively.
|