Files
indee-demo/.cursor/rules/master-philosophy.mdc
Dorian 0bb1bcc5f9 Initial commit: IndeeHub decentralized streaming platform
Built a complete Netflix-style streaming interface for IndeeHub's decentralized media platform with real film content.

Features:
- Vue 3 + TypeScript + Vite setup with hot module reloading
- Netflix-inspired UI with hero section and horizontal scrolling content rows
- Glass morphism design system with custom Tailwind configuration
- 20+ real IndeeHub films organized into 6 categories (Bitcoin, Documentaries, Drama, etc.)
- Full-featured video player component with custom controls
- Mobile-responsive design with bottom navigation
- Nostr integration ready (nostr-tools, relay pool, NIP-71 support)
- Pinia state management for content
- MCP tools configured (Filesystem, Memory, Nostr, Puppeteer)

Components:
- Browse.vue: Main streaming interface with hero and content rows
- ContentRow.vue: Horizontal scrolling film cards with navigation arrows
- VideoPlayer.vue: Custom video player with play/pause, seek, volume, fullscreen
- MobileNav.vue: Bottom tab navigation for mobile devices

Tech Stack:
- Frontend: Vue 3 (Composition API), TypeScript
- Build: Vite 7
- Styling: Tailwind CSS with custom theme
- State: Pinia 3
- Router: Vue Router 4.6
- Protocol: Nostr (nostr-tools 2.22)

Design:
- 4px grid spacing system
- Glass morphism UI components
- Netflix-style hero section with featured content
- Smooth animations and hover effects
- Mobile-first responsive breakpoints
- Dark theme with custom color palette

Content:
- 20+ IndeeHub films with titles, descriptions, categories
- Bitcoin documentaries: God Bless Bitcoin, Dirty Coin, Searching for Satoshi
- Independent films and documentaries
- Working Unsplash CDN images for thumbnails and backdrops

Ready for deployment to Umbrel, Start9, and Archy nodes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-02 22:19:47 +00:00

110 lines
3.5 KiB
Plaintext

---
description: Core front-end development philosophy and principles
alwaysApply: true
---
# Master Front-End Development Philosophy
## Core Mission
Build the best front-end code ever made by combining modern frameworks, utility-first CSS, systematic design thinking, and flawless execution.
## Philosophical Pillars
### 1. Mobile-First, Everywhere-Perfect
- Every component works flawlessly on mobile, tablet, and desktop
- Mobile is the foundation, not an afterthought
- Touch targets, viewport management, and safe areas are first-class citizens
### 2. Consistency is Sacred
- Mobile and desktop versions show **identical content and functionality** unless explicitly designed otherwise
- Design tokens ensure visual consistency across all breakpoints
- User experience never diverges accidentally between screen sizes
**Verification Before Shipping:**
- ✅ Same navigation items on mobile and desktop
- ✅ Same content sections visible
- ✅ Same buttons and CTAs available
- ✅ Only layout and presentation differ
### 3. Theme-First Architecture
- Applications are built with theming as a core architectural decision from day one
- Themes are CSS-based with reactive state management
- Dark mode and light mode are equals, not primary/secondary
**CRITICAL THEME RULE**: Header, sidebar, and main background must use the same fill color.
### 4. Utility-First, Component-Second
- Tailwind CSS utilities in templates for maximum flexibility
- Component classes only for truly reusable patterns
- Extract components when you repeat, not before
### 5. Performance as a Feature
- **Bundle Size**: < 200KB gzipped
- **LCP**: < 2.5s
- **FID**: < 100ms
- CSS transforms for GPU acceleration
- Lazy loading and code splitting by default
### 6. Design System as Foundation
- Typography scale, spacing scale, and color palettes defined upfront
- **4px base grid system** for mathematical harmony
- Consistent component patterns documented
### 7. Accessibility is Non-Negotiable
- **WCAG AA compliance minimum**
- Keyboard navigation works everywhere
- Screen reader friendly
- **4.5:1 contrast ratio** for normal text
- **44x44px minimum touch targets**
### 8. Real Users, Real Devices
- Test on actual phones and tablets
- Consider network conditions (3G, 4G, WiFi)
- Handle offline states gracefully
- Progressive enhancement over graceful degradation
## Success Metrics
### Code Quality
- ✅ Can a new developer understand the codebase in under 1 hour?
- ✅ Does the app work perfectly on a 5-year-old phone?
- ✅ Is mobile/desktop consistency maintained automatically?
### User Experience
- ✅ Does it feel native on every device?
- ✅ Does the interface respond instantly to user input?
- ✅ Load in under 2s on desktop, under 5s on mobile 3G
## Anti-Patterns to Avoid
### ❌ Desktop-First Thinking
Never build desktop first and "make it responsive later"
### ❌ Inconsistent Experiences
Mobile users should never get a degraded experience
### ❌ Hardcoded Values
Use design tokens, variables, and systematic scales
### ❌ Ignoring Performance
Every kilobyte matters, every millisecond counts
### ❌ Accessibility as Afterthought
Build accessible from day one, not as a retrofit
### ❌ Skipping Documentation
Code without documentation is technical debt
## The Ultimate Goal
**When someone uses your application:**
- "This feels incredibly polished"
- "Everything just works"
- "This looks beautiful on my device"
**When a developer reads your code:**
- "This is so well organized"
- "I understand exactly what's happening"
- "Adding features will be straightforward"