docs: clarify TypeScript paradigm as pragmatic imperative over OOP

This commit is contained in:
john-okeefe committed 2026-02-03 08:52:42 -05:00
1 parent e36320bb2c
commit bac7ba8a75
1 file changed
+9 -3
+9 -3
View File
@@ -17,7 +17,10 @@
- ❌ **NEVER modify backend/API for frontend features without user confirmation** - ❌ **NEVER modify backend/API for frontend features without user confirmation**
- ❌ **NEVER use custom CSS** - TailwindCSS classes only - ❌ **NEVER use custom CSS** - TailwindCSS classes only
- ❌ **NEVER use JavaScript** - convert all to TypeScript - ❌ **NEVER use JavaScript** - convert all to TypeScript
- ❌ **NEVER use object-oriented programming patterns in TypeScript** - avoid classes, inheritance, and OOP bloat; use functional/other paradigms - ❌ **NEVER use Object-Oriented Programming** (no classes, inheritance, or this-capture)
- ✅ **DO use procedural/imperative style** as your default
- ✅ **DO borrow functional techniques** when they simplify code
- ✅ **DO avoid ideological purity** - the best paradigm is the one that fits the problem
- ❌ **NEVER add new Dockerfiles without user confirmation - ❌ **NEVER add new Dockerfiles without user confirmation
- ❌ **NEVER fetch initial data via AJAX on page load** - use server-side rendering instead - ❌ **NEVER fetch initial data via AJAX on page load** - use server-side rendering instead
- ❌ **NEVER break progressive enhancement** - pages must work without JavaScript - ❌ **NEVER break progressive enhancement** - pages must work without JavaScript
@@ -113,7 +116,10 @@ VERIFY → Compile successfully
### Frontend & Styling ### Frontend & Styling
- ✅ Always use **TailwindCSS classes** for all styling - ✅ Always use **TailwindCSS classes** for all styling
- ✅ Convert all JavaScript to **TypeScript** - ✅ Convert all JavaScript to **TypeScript**
- ✅ Avoid OOP patterns - prefer functional/other paradigms - ✅ **Never use Object-Oriented Programming** (no classes, inheritance, or this-capture)
- ✅ **Use procedural/imperative style** as your default
- ✅ **Borrow functional techniques** when they simplify code
- ✅ **Avoid ideological purity** - the best paradigm is the one that fits the problem
- ✅ **Render initial data server-side** in Go templates for fast page loads - ✅ **Render initial data server-side** in Go templates for fast page loads
- ✅ **Use JavaScript/HTMX for CRUD operations** (create, update, delete) - ✅ **Use JavaScript/HTMX for CRUD operations** (create, update, delete)
- ✅ **Ensure progressive enhancement** - pages work without JavaScript - ✅ **Ensure progressive enhancement** - pages work without JavaScript
@@ -207,7 +213,7 @@ VERIFY → Compile successfully
- **Styling**: TailwindCSS (no custom CSS) - **Styling**: TailwindCSS (no custom CSS)
- **Language**: TypeScript (no JavaScript) - **Language**: TypeScript (no JavaScript)
- **Templates**: HTMX with server-side rendering - **Templates**: HTMX with server-side rendering
- **Patterns**: Functional/other (no OOP) - **Patterns**: Procedural/imperative with functional techniques where helpful (no OOP)
### Containerization ### Containerization
- **Runtime**: Podman (not Docker) - **Runtime**: Podman (not Docker)