scalable-thinking
Skill: Scalable Thinking
Principle: Think Scalable, Build Simple.
| Aspect | Scalable Thinking (WHAT) | KISS (HOW) |
|---|---|---|
| Data Model | Normalized, indexed | Simple queries |
| API | Versioned, RESTful | Standard CRUD |
| Code Structure | Feature-based | Flat hierarchy |
| Config | Centralized | Single file |
Where to Apply
Data Models
Separate related data into proper tables (not JSON strings). Enables querying, indexing, partitioning.
APIs
RESTful resource paths with versioning: /api/v1/users/:userId/processes. Cacheable, evolvable.
Database
Normalized tables with foreign keys and indexes. Not JSON blobs that can't be filtered.
File Structure
Feature-based: src/features/{feature}/{hooks,components,api}/ + src/shared/.
Scalable Patterns
- Pagination: Cursor-based
?limit=20&cursor=abcwith{ nextCursor, hasMore } - Centralized config: Single config object with env-based values
- Structured errors:
AppErrorwith code + statusCode
Anti-Patterns
| Anti-Pattern | Instead |
|---|---|
| Build for hypothetical 1M users | Simple monolith first |
| Pre-optimize with Redis | In-memory cache, add Redis when measured |
| Abstract for 1 use case | Direct impl, abstract at 2-3 examples |
| Microservices from day 1 | Monolith, split when team/features grow |
Checklist
Before designing: Can model support 10x? Can I query needed data? Natural partition keys? API versioned? Pagination for lists?
During: Standard patterns? Simplest solution? Junior dev understandable? No abstractions until 3+ examples?
When to Scale Up
Add complexity when: DB queries > 2s, API p95 > 500ms, error rate > 1%, 10x growth in 3 months, team > 5. Until then: keep simple, measure everything.
More from nguyenthienthanh/aura-frog
stitch-design
Generate UI designs using Google Stitch AI with optimized prompts
37angular-expert
Angular 17+ gotchas and decision criteria. Covers signals vs observables, standalone patterns, and common pitfalls Claude gets wrong.
31flutter-expert
Flutter/Dart mobile expert. PROACTIVELY use when working with Flutter, Dart, mobile apps. Triggers: flutter, dart, widget, bloc, riverpod
16dev-expert
Development patterns for React, Vue, Laravel, Next.js, React Native - state management, forms, API integration
13react-native-expert
React Native best practices expert. PROACTIVELY use when working with React Native, mobile apps, Expo. Triggers: react-native, expo, mobile, iOS, Android, NativeWind
13visual-pixel-perfect
Pixel-perfect visual testing with auto-fix loop. Implement → Render → Snapshot → Compare → Fix until pass.
13