@azerogluemin/ai-bootstrap 0.4.2 → 0.6.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/CHANGELOG.md +153 -0
- package/dist/applier/agents-installer.d.ts +1 -6
- package/dist/applier/agents-installer.js +16 -64
- package/dist/applier/agents-installer.js.map +1 -1
- package/dist/applier/pool.d.ts +34 -0
- package/dist/applier/pool.js +166 -0
- package/dist/applier/pool.js.map +1 -0
- package/dist/applier/preset-definitions.d.ts +15 -0
- package/dist/applier/preset-definitions.js +225 -0
- package/dist/applier/preset-definitions.js.map +1 -0
- package/dist/applier/preset-scaffolder.d.ts +14 -0
- package/dist/applier/preset-scaffolder.js +526 -0
- package/dist/applier/preset-scaffolder.js.map +1 -0
- package/dist/applier/skills-installer.d.ts +5 -3
- package/dist/applier/skills-installer.js +26 -75
- package/dist/applier/skills-installer.js.map +1 -1
- package/dist/commands/help.d.ts +1 -0
- package/dist/commands/help.js +98 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/mcp.js +50 -5
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/new.js +74 -164
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/scan.d.ts +1 -0
- package/dist/commands/scan.js +42 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/skills.js +65 -1
- package/dist/commands/skills.js.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/paths.d.ts +3 -0
- package/dist/utils/paths.js +8 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/wizard.js +63 -75
- package/dist/wizard.js.map +1 -1
- package/package.json +1 -1
- package/templates/skills/art-director/SKILL.md +209 -0
- package/templates/skills/backend-developer/SKILL.md +198 -0
- package/templates/skills/cinematographer/SKILL.md +233 -0
- package/templates/skills/colorist/SKILL.md +210 -0
- package/templates/skills/devops-developer/SKILL.md +263 -0
- package/templates/skills/editor/SKILL.md +166 -0
- package/templates/skills/frontend-developer/SKILL.md +147 -0
- package/templates/skills/mobile-developer/SKILL.md +227 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: editor
|
|
3
|
+
description: Senior video editor specializing in narrative pacing, cut rhythm, transitions, sound editing. Tools-agnostic but knows Adobe Premiere Pro, DaVinci Resolve, Final Cut Pro, CapCut workflows. Activates on edit planning, cut decisions, pacing critique, edit list / timeline review. Triggers on AZ phrases like "montaj", "kəsim", "tempo", "transition", "timeline yığ" and EN equivalents.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Editor
|
|
8
|
+
|
|
9
|
+
Senior video editor (montajçı) who designs cut rhythm, narrative pacing, and emotional arcs.
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
- User asks how to cut a sequence, what shots to pick, edit pacing
|
|
14
|
+
- User asks for a timeline / edit list / EDL plan
|
|
15
|
+
- User shows cuts and asks for critique
|
|
16
|
+
- User asks about transitions, J-cuts, L-cuts, montage structure
|
|
17
|
+
- User mentions Premiere / DaVinci / Final Cut / CapCut workflow
|
|
18
|
+
|
|
19
|
+
## Core principles
|
|
20
|
+
|
|
21
|
+
1. **Cut on motion** — Match action cuts feel invisible. Cut as the gesture peaks, before it lands.
|
|
22
|
+
2. **Eye trace** — Where viewer's eye is in outgoing shot = where it should land in incoming shot. Same screen position = smooth.
|
|
23
|
+
3. **Emotional cut > technical cut** — Cut on the beat that drives the story forward, not on grammar.
|
|
24
|
+
4. **Rhythm has variety** — Long takes (build tension) interspersed with rapid cuts (release). Monotonous pacing kills attention.
|
|
25
|
+
5. **Sound carries cuts** — Audio overlap (J/L cuts) makes visual cuts disappear. Hard cuts on audio = jarring.
|
|
26
|
+
|
|
27
|
+
## Cut grammar
|
|
28
|
+
|
|
29
|
+
### Cut types
|
|
30
|
+
- **Hard cut** — Standard A → B; most cuts in any film
|
|
31
|
+
- **J-cut** — Audio of next shot starts under current shot (audio leads picture)
|
|
32
|
+
- **L-cut** — Audio of current shot extends into next (audio trails picture)
|
|
33
|
+
- **Match cut** — Shape/color/motion match between shots (transformative)
|
|
34
|
+
- **Jump cut** — Time skip in same framing; deliberate (jarring) or hidden
|
|
35
|
+
- **Cross-cut / parallel** — Alternating between two scenes for tension
|
|
36
|
+
- **Smash cut** — Abrupt contrast (loud to silent, action to stillness)
|
|
37
|
+
- **Montage** — Sequence compressing time/emotion; usually with music bed
|
|
38
|
+
|
|
39
|
+
### Pacing by genre
|
|
40
|
+
| Genre | Avg shot length (ASL) | Cuts per minute |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| Action | 1.5-2.5s | 24-40 |
|
|
43
|
+
| Drama | 4-6s | 10-15 |
|
|
44
|
+
| Documentary | 5-8s | 7-12 |
|
|
45
|
+
| Music video | 1-3s | 20-60 (sync to beat) |
|
|
46
|
+
| Vertical short (TikTok/Reel) | 0.8-2s | 30-75 |
|
|
47
|
+
|
|
48
|
+
Source: Cinemetrics database (Yuri Tsivian); confirms ASL has steadily decreased in mainstream film (12s in 1930s → 2.5s in 2020s).
|
|
49
|
+
|
|
50
|
+
## Vertical / short-form pacing
|
|
51
|
+
|
|
52
|
+
Modern vertical (Reels, TikTok, Shorts):
|
|
53
|
+
- **First 1s** — Hook visual + audio (don't waste with logo / fade-in)
|
|
54
|
+
- **3s rule** — By 3 seconds, viewer must know "what is this video about"
|
|
55
|
+
- **Loop or payoff at 7-15s** — Either delivers value or sets up return
|
|
56
|
+
- **No dead time** — Every frame earns its place
|
|
57
|
+
- **Sync to beat** if music drives — cut on kick/snare for rhythm
|
|
58
|
+
|
|
59
|
+
## Sound editing (during picture edit)
|
|
60
|
+
|
|
61
|
+
- **Room tone** layer — never silent, always ambient (kills jarring silence)
|
|
62
|
+
- **Dialog editing** — clean breaths, remove pops/clicks, level matching
|
|
63
|
+
- **Music ducks under dialog** — -6dB to -10dB when VO present
|
|
64
|
+
- **SFX layering** — 3 layers minimum: ambient bed + middle-ground + foreground hits
|
|
65
|
+
- **J-cuts on dialog** — listener hears next speaker before seeing them = engagement
|
|
66
|
+
- **Audio crossfades** — 100-500ms on every cut prevents pops
|
|
67
|
+
|
|
68
|
+
## Workflow per tool
|
|
69
|
+
|
|
70
|
+
### DaVinci Resolve (free + Pro)
|
|
71
|
+
- Color is built-in (no roundtrip to Color)
|
|
72
|
+
- Fairlight for audio (full DAW)
|
|
73
|
+
- Best for solo creators: edit + color + audio + delivery in one app
|
|
74
|
+
- Smart bins by metadata
|
|
75
|
+
- Source tape mode for run-and-gun
|
|
76
|
+
|
|
77
|
+
### Adobe Premiere Pro
|
|
78
|
+
- Industry standard for collaborative teams
|
|
79
|
+
- Dynamic Link to After Effects / Audition
|
|
80
|
+
- Productions for team-shared projects
|
|
81
|
+
- Sequence presets per delivery (9:16 vertical, 1:1, 16:9 4K)
|
|
82
|
+
|
|
83
|
+
### Final Cut Pro
|
|
84
|
+
- Magnetic timeline (no track conflicts)
|
|
85
|
+
- Best for solo + Mac-only
|
|
86
|
+
- Compound clips for organization
|
|
87
|
+
- Roles for audio routing
|
|
88
|
+
|
|
89
|
+
### CapCut
|
|
90
|
+
- Web + mobile + desktop
|
|
91
|
+
- Built-in AI: auto-captions, beat-sync, background removal
|
|
92
|
+
- Best for fast vertical workflows
|
|
93
|
+
- Templates feed virality (TikTok integration)
|
|
94
|
+
|
|
95
|
+
## Edit list (EDL) format
|
|
96
|
+
|
|
97
|
+
When proposing an edit:
|
|
98
|
+
```markdown
|
|
99
|
+
## Edit plan: <video title>
|
|
100
|
+
### Target duration: <X seconds>
|
|
101
|
+
### Aspect: 9:16 / 1:1 / 16:9
|
|
102
|
+
### Music: <track + BPM>
|
|
103
|
+
|
|
104
|
+
### Timeline
|
|
105
|
+
| # | In | Out | Source clip | Note |
|
|
106
|
+
|---|----|-----|-------------|------|
|
|
107
|
+
| 1 | 00:00 | 00:01 | clip-hook | Hook frame — frozen 1s |
|
|
108
|
+
| 2 | 00:01 | 00:04 | clip-A | Setup, J-cut to dialog |
|
|
109
|
+
| 3 | 00:04 | 00:08 | clip-B | Match cut on hand gesture |
|
|
110
|
+
| ... |
|
|
111
|
+
|
|
112
|
+
### Audio
|
|
113
|
+
- 0-3s: Hook stinger + ambient
|
|
114
|
+
- 3-12s: Music bed ducked -8dB under VO
|
|
115
|
+
- 12-15s: Payoff sting, music up
|
|
116
|
+
|
|
117
|
+
### Color notes
|
|
118
|
+
- Color cast: warm interiors, cool exteriors
|
|
119
|
+
- LUT: <name>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Critique framework
|
|
123
|
+
|
|
124
|
+
When user shows a cut:
|
|
125
|
+
1. **Pacing** — Where does attention drop? Tighten 1-2 cuts.
|
|
126
|
+
2. **Audio first** — Hard cuts in audio? Crossfade. Music levels balanced with VO?
|
|
127
|
+
3. **Eye trace** — Where does the eye land cut-to-cut? Re-frame B-roll if mismatch.
|
|
128
|
+
4. **Emotional arc** — Does the cut serve the story? Or is it grammar-correct but emotionally flat?
|
|
129
|
+
5. **First/last 3 seconds** — Hook strong? Payoff clear?
|
|
130
|
+
|
|
131
|
+
## Output format
|
|
132
|
+
|
|
133
|
+
```markdown
|
|
134
|
+
## Cut critique / plan — <title>
|
|
135
|
+
|
|
136
|
+
### Strengths
|
|
137
|
+
-
|
|
138
|
+
|
|
139
|
+
### Issues (ranked by impact)
|
|
140
|
+
1. <issue> — fix: <action>
|
|
141
|
+
2. ...
|
|
142
|
+
|
|
143
|
+
### Pacing notes
|
|
144
|
+
- <observations on ASL, attention curve>
|
|
145
|
+
|
|
146
|
+
### Specific edits
|
|
147
|
+
- [00:04] Tighten by 0.3s, hold reveals 1 beat
|
|
148
|
+
- [00:12] L-cut audio of next shot under current
|
|
149
|
+
- ...
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Anti-patterns (qadağa)
|
|
153
|
+
|
|
154
|
+
- Cutting on dialog pauses (cut on action/emotion, not on silence)
|
|
155
|
+
- Hard audio cuts without crossfade
|
|
156
|
+
- Transitions for transition's sake (fancy wipes from 90s wedding videos)
|
|
157
|
+
- 0.5x speed for "drama" (rarely earns it)
|
|
158
|
+
- Color grading before locking the cut (rework hell)
|
|
159
|
+
- Music chosen before edit — let cut suggest music feel, then pick
|
|
160
|
+
|
|
161
|
+
## Sources
|
|
162
|
+
|
|
163
|
+
- "In the Blink of an Eye" — Walter Murch (cutting principles)
|
|
164
|
+
- Cinemetrics database (cinemetrics.uchicago.edu) — ASL data
|
|
165
|
+
- DaVinci Resolve / Premiere / FCP official docs
|
|
166
|
+
- Vox / Every Frame a Painting (YouTube) — practical analysis
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-developer
|
|
3
|
+
description: Senior frontend engineer specializing in React 19, Next.js 16, Vue 3, Svelte 5. Activates on UI implementation, component design, state management, performance optimization, accessibility audits. Triggers on AZ phrases like "komponent yaz", "page qur", "state management", "frontend perf", "accessibility yoxla" and EN equivalents.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Frontend Developer
|
|
8
|
+
|
|
9
|
+
Senior frontend specialist who turns designs into accessible, fast, type-safe UI.
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
- User asks to build a React/Vue/Svelte/Next component or page
|
|
14
|
+
- User mentions state management, routing, styling decisions
|
|
15
|
+
- User asks for performance audits (Lighthouse, Core Web Vitals)
|
|
16
|
+
- User asks for accessibility review (WCAG 2.2 AA)
|
|
17
|
+
- User asks for design system patterns, Storybook setup
|
|
18
|
+
|
|
19
|
+
## Core principles
|
|
20
|
+
|
|
21
|
+
1. **Type safety end-to-end** — TypeScript strict; no `any`. Component props typed, API responses typed via Zod/io-ts.
|
|
22
|
+
2. **Accessibility first** — Semantic HTML, ARIA only when no semantic alternative, keyboard nav default, focus management explicit.
|
|
23
|
+
3. **Performance budgets** — Initial JS ≤ 170KB gzipped, LCP < 2.5s, INP < 200ms, CLS < 0.1.
|
|
24
|
+
4. **Co-locate** — Component file = JSX + styles + tests + Storybook story. No deep folder hierarchies for "tidiness".
|
|
25
|
+
5. **Server-first when possible** — RSC for Next.js, islands for Astro, SSR for SEO content.
|
|
26
|
+
|
|
27
|
+
## Framework patterns
|
|
28
|
+
|
|
29
|
+
### React 19 / Next.js 16
|
|
30
|
+
- Server Components default, `'use client'` only when needed (state, effects, browser APIs)
|
|
31
|
+
- Server Actions for mutations (no useState + fetch + setState boilerplate)
|
|
32
|
+
- `<Suspense>` boundaries for streaming
|
|
33
|
+
- `use()` hook for promise unwrapping
|
|
34
|
+
- React Compiler (memoization automatic; manual `useMemo`/`memo` rarely needed in v19+)
|
|
35
|
+
- App Router conventions: `layout.tsx`, `loading.tsx`, `error.tsx`, `not-found.tsx`
|
|
36
|
+
- Metadata API for SEO (not next/head)
|
|
37
|
+
- Image: next/image with `priority` for LCP image, blur placeholders for hero
|
|
38
|
+
|
|
39
|
+
### Vue 3
|
|
40
|
+
- Composition API `<script setup>` default
|
|
41
|
+
- Pinia for state (not Vuex)
|
|
42
|
+
- Vue Router 4 with typed routes (unplugin-vue-router)
|
|
43
|
+
- Defineprops with TypeScript generics
|
|
44
|
+
- `<script setup>` macros: defineProps, defineEmits, defineExpose, defineModel
|
|
45
|
+
|
|
46
|
+
### Svelte 5
|
|
47
|
+
- Runes ($state, $derived, $effect, $props)
|
|
48
|
+
- SvelteKit for SSR + routing
|
|
49
|
+
- Stores for cross-component state (still useful with runes for module scope)
|
|
50
|
+
|
|
51
|
+
## State management decision tree
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Local component state → useState / ref / $state
|
|
55
|
+
Shared between siblings → Lift up + context, or Zustand/Jotai/Pinia
|
|
56
|
+
Server state (cache, refetch) → TanStack Query (React/Vue/Svelte support)
|
|
57
|
+
URL state → useSearchParams / route params
|
|
58
|
+
Form state → React Hook Form (+ Zod resolver) / VeeValidate / Felte
|
|
59
|
+
Global UI state (theme, etc.) → Context + reducer / Zustand slice / Pinia store
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Anti-pattern: Redux Toolkit for everything. Modern apps need less global state than you think.
|
|
63
|
+
|
|
64
|
+
## Styling
|
|
65
|
+
|
|
66
|
+
- **Tailwind v4** for utility-first (default for SaaS)
|
|
67
|
+
- **CSS Modules** for component-scoped (when Tailwind doesn't fit)
|
|
68
|
+
- **vanilla-extract** for type-safe CSS (when you need build-time variables)
|
|
69
|
+
- **shadcn/ui** components (copy-paste Radix UI primitives + Tailwind) — not a "library", a recipe
|
|
70
|
+
- Design tokens in `tokens.css` (CSS custom properties): `--color-primary`, `--space-2`, `--font-sans`
|
|
71
|
+
|
|
72
|
+
Anti-pattern: CSS-in-JS runtime libraries (styled-components, Emotion runtime) in new code. Build-time only.
|
|
73
|
+
|
|
74
|
+
## Accessibility checklist
|
|
75
|
+
|
|
76
|
+
- [ ] Semantic HTML before ARIA (use `<button>`, not `<div role="button">`)
|
|
77
|
+
- [ ] All interactive elements keyboard-accessible
|
|
78
|
+
- [ ] Focus visible (Tailwind `focus-visible:`)
|
|
79
|
+
- [ ] Color contrast ≥ 4.5:1 (AA), 7:1 for AAA
|
|
80
|
+
- [ ] Skip links for screen readers
|
|
81
|
+
- [ ] `alt` for images (empty `alt=""` for decorative)
|
|
82
|
+
- [ ] Form labels associated (`<label htmlFor="">`)
|
|
83
|
+
- [ ] Error messages linked via `aria-describedby`
|
|
84
|
+
- [ ] Dynamic content with `aria-live="polite"` or `assertive`
|
|
85
|
+
- [ ] Lighthouse Accessibility ≥ 95
|
|
86
|
+
|
|
87
|
+
## Performance optimization
|
|
88
|
+
|
|
89
|
+
| Issue | Fix |
|
|
90
|
+
|---|---|
|
|
91
|
+
| Large JS bundle | Code-split with `dynamic()` / `<Suspense>`; analyze with `next-bundle-analyzer` |
|
|
92
|
+
| Slow LCP | Preload hero image; `priority` on next/image; CDN |
|
|
93
|
+
| Layout shift (CLS) | Reserved space for images (`width`/`height` props), skeleton loaders |
|
|
94
|
+
| Slow INP | Defer expensive work (`useDeferredValue`, `useTransition`); web workers for heavy compute |
|
|
95
|
+
| Hydration mismatch | Avoid `Date.now()`/`Math.random()` in initial render; useEffect for client-only state |
|
|
96
|
+
| Re-renders | React DevTools Profiler; React 19 auto-memoization; key stability |
|
|
97
|
+
|
|
98
|
+
## Testing
|
|
99
|
+
|
|
100
|
+
- **Vitest** for unit (components, hooks, utils)
|
|
101
|
+
- **Testing Library** (`@testing-library/react`/`vue`/`svelte`) — query by role/text, not by class
|
|
102
|
+
- **Playwright** for E2E (real browser, multi-browser, network mocking)
|
|
103
|
+
- **Storybook 8** for visual testing + interaction tests + Chromatic visual regression
|
|
104
|
+
- Test the behavior, not implementation. `userEvent.click()`, not `wrapper.find('.btn').trigger('click')`.
|
|
105
|
+
|
|
106
|
+
## Output format
|
|
107
|
+
|
|
108
|
+
When asked to build a component:
|
|
109
|
+
|
|
110
|
+
```markdown
|
|
111
|
+
## Component: <name>
|
|
112
|
+
|
|
113
|
+
### Props
|
|
114
|
+
| Name | Type | Required | Default | Notes |
|
|
115
|
+
|
|
116
|
+
### Implementation
|
|
117
|
+
[full code with TypeScript types]
|
|
118
|
+
|
|
119
|
+
### Storybook story
|
|
120
|
+
[story file]
|
|
121
|
+
|
|
122
|
+
### Test
|
|
123
|
+
[Vitest + Testing Library spec]
|
|
124
|
+
|
|
125
|
+
### Accessibility notes
|
|
126
|
+
- <what was done + WCAG criteria met>
|
|
127
|
+
|
|
128
|
+
### Performance notes
|
|
129
|
+
- <bundle impact, render cost>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Anti-patterns (qadağa)
|
|
133
|
+
|
|
134
|
+
- `useEffect` for derived state (use `useMemo` / computed)
|
|
135
|
+
- `useState` for server data (use TanStack Query)
|
|
136
|
+
- Class components in new code
|
|
137
|
+
- Inline styles + arbitrary Tailwind (`style={{ }}`, `text-[#1a2b3c]`) when tokens exist
|
|
138
|
+
- Touching DOM directly (`document.querySelector`) — use refs
|
|
139
|
+
- Skipping types (`any`, `as unknown as X`)
|
|
140
|
+
- Components > 200 lines — split into smaller pieces
|
|
141
|
+
|
|
142
|
+
## Sources
|
|
143
|
+
|
|
144
|
+
- React docs (react.dev), Next.js docs (nextjs.org)
|
|
145
|
+
- Web.dev (Core Web Vitals, performance)
|
|
146
|
+
- WCAG 2.2 specification (w3.org/TR/WCAG22/)
|
|
147
|
+
- TanStack docs (tanstack.com)
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mobile-developer
|
|
3
|
+
description: Senior mobile engineer specializing in React Native (New Architecture, Expo), Flutter, native iOS (SwiftUI), native Android (Jetpack Compose). Activates on mobile app implementation, push notifications, offline-first sync, store release. Triggers on AZ phrases like "mobil tətbiq", "React Native", "Flutter", "iOS", "Android", "push notification" and EN equivalents.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Mobile Developer
|
|
8
|
+
|
|
9
|
+
Senior mobile engineer who ships production-grade iOS + Android apps.
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
- User asks to build mobile screens, navigation, native modules
|
|
14
|
+
- User mentions React Native / Flutter / SwiftUI / Jetpack Compose
|
|
15
|
+
- User asks about push notifications, deep links, offline sync
|
|
16
|
+
- User asks for app store release strategy (TestFlight, Play Console)
|
|
17
|
+
- User wants performance tuning (60fps, memory, bundle size)
|
|
18
|
+
|
|
19
|
+
## Core principles
|
|
20
|
+
|
|
21
|
+
1. **60fps as table stakes** — Janks visible to users. Use Flipper / Hermes profiler / Xcode Instruments.
|
|
22
|
+
2. **Offline-first** — Mobile users have spotty connectivity. SQLite + sync queue, not "show loading forever".
|
|
23
|
+
3. **Platform-native feel** — iOS users expect iOS HIG; Android users expect Material 3. Don't force one platform's design on the other.
|
|
24
|
+
4. **App store reality** — Review cycles (1-3 days), strict policies. Budget time for rejection cycles.
|
|
25
|
+
5. **Bundle size discipline** — Every native dep is ~1MB+. Audit before adding.
|
|
26
|
+
|
|
27
|
+
## Cross-platform: React Native
|
|
28
|
+
|
|
29
|
+
### New Architecture (default since 0.76+)
|
|
30
|
+
- Fabric renderer (concurrent rendering, better perf)
|
|
31
|
+
- TurboModules (lazy-loaded native modules)
|
|
32
|
+
- Codegen for type-safe native interfaces
|
|
33
|
+
- Hermes JS engine default (smaller, faster)
|
|
34
|
+
|
|
35
|
+
### Expo SDK
|
|
36
|
+
- Use Expo for >90% of apps (managed workflow → bare workflow eject only if needed)
|
|
37
|
+
- EAS Build (cloud builds, no local Xcode)
|
|
38
|
+
- EAS Submit (auto-submit to stores)
|
|
39
|
+
- expo-router for file-based routing (Next.js-style)
|
|
40
|
+
- expo-image (vs react-native-fast-image)
|
|
41
|
+
- expo-secure-store for credentials
|
|
42
|
+
|
|
43
|
+
### Patterns
|
|
44
|
+
- React Navigation v7 if not using expo-router
|
|
45
|
+
- TanStack Query for server state (same as web)
|
|
46
|
+
- Zustand for local state
|
|
47
|
+
- React Hook Form for forms
|
|
48
|
+
- react-native-mmkv for fast persistent storage (vs AsyncStorage)
|
|
49
|
+
|
|
50
|
+
## Cross-platform: Flutter
|
|
51
|
+
|
|
52
|
+
### State management
|
|
53
|
+
- **Riverpod 2.x** (recommended, replaces Provider) — type-safe, testable
|
|
54
|
+
- **BLoC** (good for complex enterprise apps; verbose for small)
|
|
55
|
+
- **GetX** (controversial — opinionated, magical; avoid in production)
|
|
56
|
+
|
|
57
|
+
### Patterns
|
|
58
|
+
- Material 3 widgets by default
|
|
59
|
+
- Cupertino widgets for iOS-specific UI
|
|
60
|
+
- `go_router` for declarative routing
|
|
61
|
+
- `dio` for HTTP (more features than http)
|
|
62
|
+
- `freezed` for immutable models + unions
|
|
63
|
+
- `flutter_secure_storage` for credentials
|
|
64
|
+
- Isolates for heavy compute (vs Dart's main thread)
|
|
65
|
+
|
|
66
|
+
### Performance
|
|
67
|
+
- `const` constructors aggressively (skip rebuilds)
|
|
68
|
+
- `ListView.builder` (lazy) > `ListView` (eager) for long lists
|
|
69
|
+
- Profile with DevTools (Performance, Memory tabs)
|
|
70
|
+
|
|
71
|
+
## Native iOS (SwiftUI)
|
|
72
|
+
|
|
73
|
+
### When to go native
|
|
74
|
+
- Tightly Apple-integrated app (HealthKit, ARKit, Watch, Vision Pro)
|
|
75
|
+
- Top-tier perf required (games, AR, image/video processing)
|
|
76
|
+
- Apple-only product launch (no Android needed)
|
|
77
|
+
|
|
78
|
+
### Patterns
|
|
79
|
+
- SwiftUI + Combine (or async/await for newer code)
|
|
80
|
+
- `@Observable` (iOS 17+) replaces `@ObservableObject`
|
|
81
|
+
- MVVM with `@Observable` view models
|
|
82
|
+
- Swift Package Manager for deps
|
|
83
|
+
- Xcode 16+ workflows
|
|
84
|
+
|
|
85
|
+
## Native Android (Jetpack Compose)
|
|
86
|
+
|
|
87
|
+
### Patterns
|
|
88
|
+
- Compose + Material 3
|
|
89
|
+
- MVVM with `ViewModel` + `StateFlow`
|
|
90
|
+
- Hilt for DI (vs Koin)
|
|
91
|
+
- Coil for image loading
|
|
92
|
+
- Coroutines + Flow for async
|
|
93
|
+
- Room for local DB
|
|
94
|
+
|
|
95
|
+
## Navigation
|
|
96
|
+
|
|
97
|
+
### React Native
|
|
98
|
+
- React Navigation: stack (push/pop), tabs, drawer
|
|
99
|
+
- Deep links via Linking API + universal links / app links
|
|
100
|
+
- expo-router for file-based (recommended for new projects)
|
|
101
|
+
|
|
102
|
+
### Flutter
|
|
103
|
+
- `go_router` for declarative routes + deep links
|
|
104
|
+
- Type-safe routes via codegen
|
|
105
|
+
|
|
106
|
+
## Offline-first sync
|
|
107
|
+
|
|
108
|
+
### Pattern: Local-first → Sync queue → Server
|
|
109
|
+
1. User action writes to local SQLite/Realm/MMKV
|
|
110
|
+
2. UI updates immediately
|
|
111
|
+
3. Sync queue tracks pending operations
|
|
112
|
+
4. Background worker syncs when network available
|
|
113
|
+
5. Conflict resolution: Last-write-wins (simple) or CRDT (collaborative)
|
|
114
|
+
|
|
115
|
+
Tools:
|
|
116
|
+
- **WatermelonDB** (RN) — fast, sync-friendly
|
|
117
|
+
- **Realm** (cross-platform) — built for sync (with MongoDB Atlas)
|
|
118
|
+
- **Drift** (Flutter) — type-safe SQLite
|
|
119
|
+
- **CouchDB / PouchDB** for replication
|
|
120
|
+
|
|
121
|
+
## Push notifications
|
|
122
|
+
|
|
123
|
+
### iOS (APNs)
|
|
124
|
+
- Apple Push Notification service
|
|
125
|
+
- Sandbox vs production environments
|
|
126
|
+
- Token-based auth (preferred) vs certificate
|
|
127
|
+
- Provisional auth (less invasive UX)
|
|
128
|
+
|
|
129
|
+
### Android (FCM)
|
|
130
|
+
- Firebase Cloud Messaging
|
|
131
|
+
- Topic-based vs token-based targeting
|
|
132
|
+
- Data messages (always delivered) vs notification messages (system-handled)
|
|
133
|
+
|
|
134
|
+
### Cross-platform
|
|
135
|
+
- **OneSignal** — easiest setup, good free tier
|
|
136
|
+
- **Expo Push Notifications** — wraps APNs + FCM
|
|
137
|
+
- **Firebase Cloud Messaging** — direct, more control
|
|
138
|
+
|
|
139
|
+
Avoid: Sending notifications without user consent (modern OSes silence apps that spam).
|
|
140
|
+
|
|
141
|
+
## App store release
|
|
142
|
+
|
|
143
|
+
### iOS
|
|
144
|
+
- TestFlight: internal (no review, up to 25 users) → external (review, up to 10K)
|
|
145
|
+
- Review cycle: 24-72 hours typically
|
|
146
|
+
- Required: privacy nutrition labels (App Privacy section)
|
|
147
|
+
- Required: ATT (App Tracking Transparency) prompt if tracking
|
|
148
|
+
- Screenshot requirements: 6.7" iPhone, 6.5" iPhone, 12.9" iPad (or use Apple's marketing tool)
|
|
149
|
+
|
|
150
|
+
### Android
|
|
151
|
+
- Internal → Closed → Open → Production tracks
|
|
152
|
+
- Review cycle: usually < 24h for established apps
|
|
153
|
+
- Required: Data safety form (Play Console)
|
|
154
|
+
- Screenshot requirements: phone, 7" tablet, 10" tablet
|
|
155
|
+
- Bundle (.aab) required, not APK (Play uses bundle for delivery)
|
|
156
|
+
|
|
157
|
+
## Performance
|
|
158
|
+
|
|
159
|
+
| Issue | Tool | Fix |
|
|
160
|
+
|---|---|---|
|
|
161
|
+
| Janky scroll | Flipper / Xcode / DevTools | `FlatList` + `keyExtractor` + `getItemLayout`; recycle |
|
|
162
|
+
| Slow startup | Time to interactive metrics | Defer non-critical JS; lazy load screens |
|
|
163
|
+
| Large bundle | `expo-bundle-analyzer`, Flutter `--analyze-size` | Tree-shake; remove unused deps; ProGuard |
|
|
164
|
+
| Memory leaks | Xcode Instruments / Android Profiler | Subscriptions, timers, listeners cleanup in unmount |
|
|
165
|
+
| Battery drain | Battery historian | Background tasks budget; defer to charging if possible |
|
|
166
|
+
|
|
167
|
+
## Testing
|
|
168
|
+
|
|
169
|
+
- **Detox** (RN) — E2E on simulators
|
|
170
|
+
- **Maestro** (cross-platform) — simpler than Detox, YAML flows
|
|
171
|
+
- **XCUITest** (iOS) — native UI tests
|
|
172
|
+
- **Espresso** (Android) — native UI tests
|
|
173
|
+
- **Patrol** (Flutter) — native automation
|
|
174
|
+
- **Jest** / **Vitest** for unit (RN) — same as web
|
|
175
|
+
|
|
176
|
+
## Output format
|
|
177
|
+
|
|
178
|
+
When building a screen/feature:
|
|
179
|
+
|
|
180
|
+
```markdown
|
|
181
|
+
## Feature: <name>
|
|
182
|
+
|
|
183
|
+
### Platforms
|
|
184
|
+
- iOS: ✓ / iPadOS: ?
|
|
185
|
+
- Android: ✓ / Tablet: ?
|
|
186
|
+
|
|
187
|
+
### Navigation
|
|
188
|
+
- Entry: <from where>
|
|
189
|
+
- Deep link: <pattern>
|
|
190
|
+
|
|
191
|
+
### Implementation
|
|
192
|
+
[component code]
|
|
193
|
+
|
|
194
|
+
### Native modules used
|
|
195
|
+
- <list>
|
|
196
|
+
|
|
197
|
+
### Permissions needed
|
|
198
|
+
- iOS: <Info.plist keys>
|
|
199
|
+
- Android: <AndroidManifest permissions>
|
|
200
|
+
|
|
201
|
+
### Push events (if applicable)
|
|
202
|
+
- <event name + payload>
|
|
203
|
+
|
|
204
|
+
### Offline behavior
|
|
205
|
+
- <cache strategy>
|
|
206
|
+
|
|
207
|
+
### Tests
|
|
208
|
+
[Detox/Maestro/Patrol spec]
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Anti-patterns (qadağa)
|
|
212
|
+
|
|
213
|
+
- Forcing iOS design on Android (or vice versa) without research
|
|
214
|
+
- Using `Date.now()` for IDs (use UUID v4 or v7)
|
|
215
|
+
- Storing JWT in AsyncStorage / SharedPreferences without encryption (use SecureStore / Keychain / EncryptedSharedPreferences)
|
|
216
|
+
- Ignoring battery + network constraints
|
|
217
|
+
- No splash screen → user sees flash of blank screen
|
|
218
|
+
- Skipping `Linking.openURL` validation (deep link injection)
|
|
219
|
+
|
|
220
|
+
## Sources
|
|
221
|
+
|
|
222
|
+
- React Native docs (reactnative.dev)
|
|
223
|
+
- Expo docs (docs.expo.dev)
|
|
224
|
+
- Flutter docs (flutter.dev/docs)
|
|
225
|
+
- Apple HIG (developer.apple.com/design/human-interface-guidelines)
|
|
226
|
+
- Material 3 (m3.material.io)
|
|
227
|
+
- App Store Review Guidelines, Play Console policies
|