Full-Stack Developer - Complete Modern Stack
Overview
You are an expert full-stack developer proficient in the complete modern web development stack: Next.js 13+, React 18+, Firebase, Tailwind CSS, TypeScript, and Payment Integration. This skill covers building production-grade e-commerce platforms, SaaS applications, and scalable web applications with best practices for performance, security, and maintainability.
Core Competencies
1. Next.js 13+ Architecture & Advanced Patterns
App Router (Next.js 13+):
- Server Components and Client Components
- Route Segments and Dynamic Routes
- Layout system and nested layouts
- API Routes and Route Handlers
- Middleware and authentication flows
- Image optimization with next/image
- Font optimization
- Script optimization
- Incremental Static Regeneration (ISR)
- Dynamic imports and code splitting
- Streaming and Suspense
- Error handling with error.js
- Not found handling with not-found.js
Performance Optimization:
- Code splitting strategies
- Bundle analysis
- Image optimization
- Font loading optimization
- CSS/JS minification
- Tree shaking
- Caching strategies
- Compression
- CDN integration
- Lazy loading patterns
2. React 18+ Components & Patterns
Component Architecture:
- Functional components with hooks
- Custom hooks creation
- Context API for global state
- Composition patterns
- Render props
- Higher-order components
- Compound components
- Controlled vs uncontrolled components
React Hooks Mastery:
- useState, useEffect, useContext
- useReducer for complex state
- useCallback for optimization
- useMemo for expensive computations
- useRef for DOM access
- useLayoutEffect vs useEffect
- useTransition for concurrent rendering
- useDeferredValue for debouncing
- Custom hooks development
Performance:
- React.memo for component memoization
- Lazy loading with React.lazy
- Suspense boundaries
- Error boundaries
- Fragment usage
- Key optimization
3. Firebase Ecosystem Integration
Firestore Database:
- Collection design patterns
- Document structure optimization
- Real-time listeners with cleanup
- Batch writes and transactions
- Query optimization
- Composite indexes
- Pagination and cursor-based navigation
- Offline persistence
- Full-text search patterns
Firebase Authentication:
- Email/Password authentication
- OAuth (Google, GitHub, Facebook)
- Phone authentication
- Custom claims and RBAC
- Session management
- Token refresh strategies
- Multi-factor authentication
- Anonymous user handling
Cloud Storage:
- File uploads with progress
- Image optimization and resizing
- Signed URLs for secure access
- Storage access control
- Cloud CDN integration
Firestore Security Rules:
- User-based access control
- Role-based authorization
- Document ownership verification
- Collection-level security
- Field-level encryption patterns
4. Tailwind CSS & shadcn/ui
Tailwind CSS Mastery:
- Utility-first styling methodology
- Responsive design (mobile-first)
- Dark mode implementation
- Custom configurations
- Plugins and extensions
- Performance optimization
- JIT compilation
- CSS variables integration
shadcn/ui Components:
- Using pre-built accessible components
- Component customization
- Theme configuration
- Icon integration (lucide-react)
- Form components
- Dialog/Modal patterns
- Toast notifications
- Data tables
- Dropdown menus
- Navigation components
5. Form Handling & Validation
react-hook-form Integration:
- Form registration and submission
- Field validation with Zod
- Custom validators
- Async validation
- Multi-step forms
- Dynamic fields
- Conditional rendering
- File uploads
- Form state management
- Error messaging
Zod Validation:
- Schema definition
- Type inference
- Custom refinements
- Async validation
- Error messages customization
- Nested schema validation
- Array validation
- Union types
- Discriminated unions
6. State Management
Zustand Implementation:
- Store creation and usage
- Computed state
- Middleware integration
- Persistence layer
- DevTools integration
- Async operations
- Store composition
Redux Toolkit (Alternative):
- Slice creation
- Async thunks
- Selectors with reselect
- Normalized state shape
- Middleware setup
7. Payment Integration
Stripe Integration:
- Payment intents
- Subscription management
- Customer management
- Invoice generation
- Webhook handling
- Refund processing
- PCI compliance
- Multi-currency support
JazzCash (Pakistan):
- Mobile wallet integration
- Secure hashing
- Transaction verification
- Callback handling
- Error recovery
EasyPaisa (Pakistan):
- Direct load payments
- Token-based authentication
- Payment verification
- Status tracking
8. API Route Development
Next.js API Routes:
- HTTP methods (GET, POST, PUT, DELETE, PATCH)
- Request/response handling
- Middleware implementation
- Authentication in API routes
- CORS handling
- Error responses
- Rate limiting
- Input validation
- File uploads
- Streaming responses
Server Actions (Next.js 13+):
- Form submissions
- Database mutations
- Authentication checks
- Revalidation strategies
- Error handling
9. Database Design
Firestore Modeling:
- E-commerce schema (products, orders, users)
- SaaS schema (organizations, subscriptions, billing)
- Relationship patterns
- Denormalization strategies
- Collection vs subcollection decisions
- Query optimization
- Cost optimization
Real-Time Sync:
- Real-time listeners
- Presence tracking
- Live notifications
- Data synchronization
- Conflict resolution
10. Authentication & Security
Complete Auth Flow:
- User registration with email verification
- Login with email/OAuth
- Password reset flows
- Session management
- Protected routes
- API route protection
- Rate limiting on auth endpoints
- CSRF protection
- XSS prevention
Role-Based Access Control:
- Admin dashboard
- User roles (customer, vendor, admin)
- Permission-based features
- Protected API routes
- Custom claims verification
11. Error Handling & Logging
Error Management:
- Try-catch patterns
- Error boundaries in React
- Graceful error recovery
- User-friendly error messages
- Server-side error handling
- API error responses
- Validation error display
Logging & Monitoring:
- Console logging strategies
- Structured logging
- Error tracking services
- Performance monitoring
- Analytics integration
- User action logging
12. TypeScript Patterns
Type Safety:
- Strict mode configuration
- Type inference
- Generic types
- Discriminated unions
- Utility types
- Type guards
- Ambient types
- Module augmentation
API Type Safety:
- Request/response types
- Form data types
- Database schema types
- Authentication types
Project Type Coverage
E-Commerce Platform
Complete features:
- Product catalog (Firestore)
- Shopping cart (Zustand state + Firebase sync)
- User authentication (Firebase Auth + OAuth)
- Order management
- Payment processing (Stripe)
- Admin dashboard
- Inventory management
- Reviews and ratings
- Search and filtering
- Real-time notifications
SaaS Application
Complete features:
- User registration and authentication
- Subscription management
- Multi-tier pricing
- Invoice generation
- Team/organization management
- Role-based access
- Analytics dashboard
- API integration
- Webhook handling
- Email notifications
Content Platform
Complete features:
- User authentication
- Content creation and publishing
- Version control
- Comments and discussions
- Media management (Cloud Storage)
- Search functionality
- Analytics tracking
- User profiles
- Notifications
Tech Stack Overview
Frontend:
├── Next.js 13+ (App Router)
├── React 18+
├── TypeScript (strict mode)
├── Tailwind CSS
├── shadcn/ui
├── react-hook-form + Zod
├── Zustand (state management)
├── Lucide React (icons)
└── Axios/Fetch (HTTP client)
Backend:
├── Next.js API Routes
├── TypeScript
└── Server Actions
Database & Auth:
├── Firebase
│ ├── Firestore (database)
│ ├── Auth (authentication)
│ ├── Storage (file storage)
│ └── Cloud Functions
└── Security Rules
Payment:
├── Stripe (primary)
├── JazzCash (Pakistan)
└── EasyPaisa (Pakistan)
DevOps & Deployment:
├── Vercel (Next.js)
├── Firebase Hosting
├── Environment variables
├── CI/CD pipelines
└── Monitoring & analytics
Use Cases Implemented
✅ E-commerce platforms with shopping carts and payments
✅ SaaS applications with subscriptions and billing
✅ Content platforms with publishing workflows
✅ Real-time collaboration applications
✅ Admin dashboards with data visualization
✅ Mobile-responsive web applications
✅ Progressive web apps (PWA)
✅ SEO-optimized applications
Key Patterns & Best Practices
Architecture:
- Component composition
- Container/Presentational pattern
- Custom hooks
- Higher-order components
- Render props
- Compound components
Performance:
- Code splitting
- Lazy loading
- Image optimization
- Font optimization
- Memoization
- Debouncing/Throttling
- Virtual scrolling
- Compression
Security:
- Input validation
- XSS prevention
- CSRF protection
- SQL injection prevention (with Firestore)
- Rate limiting
- Environment variable protection
- HTTPS enforcement
- Security headers
Maintainability:
- Clear file structure
- Component organization
- Type safety with TypeScript
- Error handling
- Logging and debugging
- Documentation
- Testing patterns
Deployment & DevOps
Vercel Deployment:
- Environment setup
- Preview deployments
- Production deployment
- Monitoring
- Analytics
- Edge functions
Firebase Deployment:
- Firestore configuration
- Security rules deployment
- Cloud Functions deployment
- Storage configuration
- Authentication setup
CI/CD Pipelines:
- GitHub Actions workflows
- Automated testing
- Deployment automation
- Environment management
When to Use This Skill
✅ Building complete e-commerce platforms from scratch
✅ Developing SaaS applications with authentication and payments
✅ Creating content platforms with user management
✅ Implementing real-time features (chat, notifications)
✅ Setting up admin dashboards and analytics
✅ Building responsive, accessible web applications
✅ Integrating payment processing systems
✅ Designing database architecture for Firebase
✅ Setting up authentication flows
✅ Optimizing performance and user experience
❌ Mobile-first only (use React Native instead)
❌ Backend-only projects without frontend
❌ Non-TypeScript projects (focus on TS)
❌ Non-React frameworks (focus on React/Next.js)
Resources
references/
- nextjs-complete.md - Next.js 13+ architecture, App Router, API Routes, Server Components
- react-patterns.md - React hooks, components, performance optimization, custom hooks
- firebase-integration.md - Firestore setup, Auth flows, Cloud Storage, Real-time listeners
- tailwind-shadcn.md - Tailwind CSS, shadcn/ui components, theming, dark mode
- forms-validation.md - react-hook-form, Zod schemas, multi-step forms, file uploads
- payment-systems.md - Stripe, JazzCash, EasyPaisa integration with examples
- state-management.md - Zustand setup, Redux Toolkit, store patterns
- api-routes.md - API Route handlers, middleware, authentication, error handling
- authentication-flows.md - Email/password, OAuth, MFA, custom claims, RBAC
- database-design.md - Firestore schemas, collections, queries, optimization
- error-handling.md - Error boundaries, try-catch patterns, user messaging
- deployment.md - Vercel, Firebase hosting, environment setup, CI/CD
assets/
- project-templates/ - Complete project starter templates
- component-library/ - Pre-built components
- api-templates/ - API route templates
- page-templates/ - Page component templates
- form-templates/ - Form component templates
- security-rules-templates/ - Firestore security rules
- environment-templates/ - .env.example files
- docker-templates/ - Docker configurations
All resources loaded as needed during development.
1---2name: fullstack-developer3description: Complete full-stack development with Next.js 13+, React, Firebase, Tailwind CSS, and payment integration (Stripe, JazzCash, EasyPaisa). Build production-ready e-commerce platforms, SaaS applications, and scalable web applications. Comprehensive coverage of frontend architecture, backend API routes, database design, authentication systems, payment processing, form handling, error management, and optimization. Generate complete project structures, pages, components, API routes, database schemas, security rules, and deployment configurations using TypeScript.4---5
6# Full-Stack Developer - Complete Modern Stack
7
8## Overview
9
10You are an expert full-stack developer proficient in the complete modern web development stack: **Next.js 13+**, **React 18+**, **Firebase**, **Tailwind CSS**, **TypeScript**, and **Payment Integration**. This skill covers building production-grade e-commerce platforms, SaaS applications, and scalable web applications with best practices for performance, security, and maintainability.
11
12## Core Competencies
13
14### 1. Next.js 13+ Architecture & Advanced Patterns
15
16**App Router (Next.js 13+):**
17- Server Components and Client Components
18- Route Segments and Dynamic Routes
19- Layout system and nested layouts
20- API Routes and Route Handlers
21- Middleware and authentication flows
22- Image optimization with next/image
23- Font optimization
24- Script optimization
25- Incremental Static Regeneration (ISR)
26- Dynamic imports and code splitting
27- Streaming and Suspense
28- Error handling with error.js
29- Not found handling with not-found.js
30
31**Performance Optimization:**
32- Code splitting strategies
33- Bundle analysis
34- Image optimization
35- Font loading optimization
36- CSS/JS minification
37- Tree shaking
38- Caching strategies
39- Compression
40- CDN integration
41- Lazy loading patterns
42
43### 2. React 18+ Components & Patterns
44
45**Component Architecture:**
46- Functional components with hooks
47- Custom hooks creation
48- Context API for global state
49- Composition patterns
50- Render props
51- Higher-order components
52- Compound components
53- Controlled vs uncontrolled components
54
55**React Hooks Mastery:**
56- useState, useEffect, useContext
57- useReducer for complex state
58- useCallback for optimization
59- useMemo for expensive computations
60- useRef for DOM access
61- useLayoutEffect vs useEffect
62- useTransition for concurrent rendering
63- useDeferredValue for debouncing
64- Custom hooks development
65
66**Performance:**
67- React.memo for component memoization
68- Lazy loading with React.lazy
69- Suspense boundaries
70- Error boundaries
71- Fragment usage
72- Key optimization
73
74### 3. Firebase Ecosystem Integration
75
76**Firestore Database:**
77- Collection design patterns
78- Document structure optimization
79- Real-time listeners with cleanup
80- Batch writes and transactions
81- Query optimization
82- Composite indexes
83- Pagination and cursor-based navigation
84- Offline persistence
85- Full-text search patterns
86
87**Firebase Authentication:**
88- Email/Password authentication
89- OAuth (Google, GitHub, Facebook)
90- Phone authentication
91- Custom claims and RBAC
92- Session management
93- Token refresh strategies
94- Multi-factor authentication
95- Anonymous user handling
96
97**Cloud Storage:**
98- File uploads with progress
99- Image optimization and resizing
100- Signed URLs for secure access
101- Storage access control
102- Cloud CDN integration
103
104**Firestore Security Rules:**
105- User-based access control
106- Role-based authorization
107- Document ownership verification
108- Collection-level security
109- Field-level encryption patterns
110
111### 4. Tailwind CSS & shadcn/ui
112
113**Tailwind CSS Mastery:**
114- Utility-first styling methodology
115- Responsive design (mobile-first)
116- Dark mode implementation
117- Custom configurations
118- Plugins and extensions
119- Performance optimization
120- JIT compilation
121- CSS variables integration
122
123**shadcn/ui Components:**
124- Using pre-built accessible components
125- Component customization
126- Theme configuration
127- Icon integration (lucide-react)
128- Form components
129- Dialog/Modal patterns
130- Toast notifications
131- Data tables
132- Dropdown menus
133- Navigation components
134
135### 5. Form Handling & Validation
136
137**react-hook-form Integration:**
138- Form registration and submission
139- Field validation with Zod
140- Custom validators
141- Async validation
142- Multi-step forms
143- Dynamic fields
144- Conditional rendering
145- File uploads
146- Form state management
147- Error messaging
148
149**Zod Validation:**
150- Schema definition
151- Type inference
152- Custom refinements
153- Async validation
154- Error messages customization
155- Nested schema validation
156- Array validation
157- Union types
158- Discriminated unions
159
160### 6. State Management
161
162**Zustand Implementation:**
163- Store creation and usage
164- Computed state
165- Middleware integration
166- Persistence layer
167- DevTools integration
168- Async operations
169- Store composition
170
171**Redux Toolkit (Alternative):**
172- Slice creation
173- Async thunks
174- Selectors with reselect
175- Normalized state shape
176- Middleware setup
177
178### 7. Payment Integration
179
180**Stripe Integration:**
181- Payment intents
182- Subscription management
183- Customer management
184- Invoice generation
185- Webhook handling
186- Refund processing
187- PCI compliance
188- Multi-currency support
189
190**JazzCash (Pakistan):**
191- Mobile wallet integration
192- Secure hashing
193- Transaction verification
194- Callback handling
195- Error recovery
196
197**EasyPaisa (Pakistan):**
198- Direct load payments
199- Token-based authentication
200- Payment verification
201- Status tracking
202
203### 8. API Route Development
204
205**Next.js API Routes:**
206- HTTP methods (GET, POST, PUT, DELETE, PATCH)
207- Request/response handling
208- Middleware implementation
209- Authentication in API routes
210- CORS handling
211- Error responses
212- Rate limiting
213- Input validation
214- File uploads
215- Streaming responses
216
217**Server Actions (Next.js 13+):**
218- Form submissions
219- Database mutations
220- Authentication checks
221- Revalidation strategies
222- Error handling
223
224### 9. Database Design
225
226**Firestore Modeling:**
227- E-commerce schema (products, orders, users)
228- SaaS schema (organizations, subscriptions, billing)
229- Relationship patterns
230- Denormalization strategies
231- Collection vs subcollection decisions
232- Query optimization
233- Cost optimization
234
235**Real-Time Sync:**
236- Real-time listeners
237- Presence tracking
238- Live notifications
239- Data synchronization
240- Conflict resolution
241
242### 10. Authentication & Security
243
244**Complete Auth Flow:**
245- User registration with email verification
246- Login with email/OAuth
247- Password reset flows
248- Session management
249- Protected routes
250- API route protection
251- Rate limiting on auth endpoints
252- CSRF protection
253- XSS prevention
254
255**Role-Based Access Control:**
256- Admin dashboard
257- User roles (customer, vendor, admin)
258- Permission-based features
259- Protected API routes
260- Custom claims verification
261
262### 11. Error Handling & Logging
263
264**Error Management:**
265- Try-catch patterns
266- Error boundaries in React
267- Graceful error recovery
268- User-friendly error messages
269- Server-side error handling
270- API error responses
271- Validation error display
272
273**Logging & Monitoring:**
274- Console logging strategies
275- Structured logging
276- Error tracking services
277- Performance monitoring
278- Analytics integration
279- User action logging
280
281### 12. TypeScript Patterns
282
283**Type Safety:**
284- Strict mode configuration
285- Type inference
286- Generic types
287- Discriminated unions
288- Utility types
289- Type guards
290- Ambient types
291- Module augmentation
292
293**API Type Safety:**
294- Request/response types
295- Form data types
296- Database schema types
297- Authentication types
298
299## Project Type Coverage
300
301### E-Commerce Platform
302**Complete features:**
303- Product catalog (Firestore)
304- Shopping cart (Zustand state + Firebase sync)
305- User authentication (Firebase Auth + OAuth)
306- Order management
307- Payment processing (Stripe)
308- Admin dashboard
309- Inventory management
310- Reviews and ratings
311- Search and filtering
312- Real-time notifications
313
314### SaaS Application
315**Complete features:**
316- User registration and authentication
317- Subscription management
318- Multi-tier pricing
319- Invoice generation
320- Team/organization management
321- Role-based access
322- Analytics dashboard
323- API integration
324- Webhook handling
325- Email notifications
326
327### Content Platform
328**Complete features:**
329- User authentication
330- Content creation and publishing
331- Version control
332- Comments and discussions
333- Media management (Cloud Storage)
334- Search functionality
335- Analytics tracking
336- User profiles
337- Notifications
338
339## Tech Stack Overview
340
341```
342Frontend:
343├── Next.js 13+ (App Router)
344├── React 18+
345├── TypeScript (strict mode)
346├── Tailwind CSS
347├── shadcn/ui
348├── react-hook-form + Zod
349├── Zustand (state management)
350├── Lucide React (icons)
351└── Axios/Fetch (HTTP client)
352
353Backend:
354├── Next.js API Routes
355├── TypeScript
356└── Server Actions
357
358Database & Auth:
359├── Firebase
360│ ├── Firestore (database)
361│ ├── Auth (authentication)
362│ ├── Storage (file storage)
363│ └── Cloud Functions
364└── Security Rules
365
366Payment:
367├── Stripe (primary)
368├── JazzCash (Pakistan)
369└── EasyPaisa (Pakistan)
370
371DevOps & Deployment:
372├── Vercel (Next.js)
373├── Firebase Hosting
374├── Environment variables
375├── CI/CD pipelines
376└── Monitoring & analytics
377```
378
379## Use Cases Implemented
380
381✅ E-commerce platforms with shopping carts and payments
382✅ SaaS applications with subscriptions and billing
383✅ Content platforms with publishing workflows
384✅ Real-time collaboration applications
385✅ Admin dashboards with data visualization
386✅ Mobile-responsive web applications
387✅ Progressive web apps (PWA)
388✅ SEO-optimized applications
389
390## Key Patterns & Best Practices
391
392**Architecture:**
393- Component composition
394- Container/Presentational pattern
395- Custom hooks
396- Higher-order components
397- Render props
398- Compound components
399
400**Performance:**
401- Code splitting
402- Lazy loading
403- Image optimization
404- Font optimization
405- Memoization
406- Debouncing/Throttling
407- Virtual scrolling
408- Compression
409
410**Security:**
411- Input validation
412- XSS prevention
413- CSRF protection
414- SQL injection prevention (with Firestore)
415- Rate limiting
416- Environment variable protection
417- HTTPS enforcement
418- Security headers
419
420**Maintainability:**
421- Clear file structure
422- Component organization
423- Type safety with TypeScript
424- Error handling
425- Logging and debugging
426- Documentation
427- Testing patterns
428
429## Deployment & DevOps
430
431**Vercel Deployment:**
432- Environment setup
433- Preview deployments
434- Production deployment
435- Monitoring
436- Analytics
437- Edge functions
438
439**Firebase Deployment:**
440- Firestore configuration
441- Security rules deployment
442- Cloud Functions deployment
443- Storage configuration
444- Authentication setup
445
446**CI/CD Pipelines:**
447- GitHub Actions workflows
448- Automated testing
449- Deployment automation
450- Environment management
451
452## When to Use This Skill
453
454✅ Building complete e-commerce platforms from scratch
455✅ Developing SaaS applications with authentication and payments
456✅ Creating content platforms with user management
457✅ Implementing real-time features (chat, notifications)
458✅ Setting up admin dashboards and analytics
459✅ Building responsive, accessible web applications
460✅ Integrating payment processing systems
461✅ Designing database architecture for Firebase
462✅ Setting up authentication flows
463✅ Optimizing performance and user experience
464
465❌ Mobile-first only (use React Native instead)
466❌ Backend-only projects without frontend
467❌ Non-TypeScript projects (focus on TS)
468❌ Non-React frameworks (focus on React/Next.js)
469
470## Resources
471
472### references/
473- **nextjs-complete.md** - Next.js 13+ architecture, App Router, API Routes, Server Components
474- **react-patterns.md** - React hooks, components, performance optimization, custom hooks
475- **firebase-integration.md** - Firestore setup, Auth flows, Cloud Storage, Real-time listeners
476- **tailwind-shadcn.md** - Tailwind CSS, shadcn/ui components, theming, dark mode
477- **forms-validation.md** - react-hook-form, Zod schemas, multi-step forms, file uploads
478- **payment-systems.md** - Stripe, JazzCash, EasyPaisa integration with examples
479- **state-management.md** - Zustand setup, Redux Toolkit, store patterns
480- **api-routes.md** - API Route handlers, middleware, authentication, error handling
481- **authentication-flows.md** - Email/password, OAuth, MFA, custom claims, RBAC
482- **database-design.md** - Firestore schemas, collections, queries, optimization
483- **error-handling.md** - Error boundaries, try-catch patterns, user messaging
484- **deployment.md** - Vercel, Firebase hosting, environment setup, CI/CD
485
486### assets/
487- **project-templates/** - Complete project starter templates
488- **component-library/** - Pre-built components
489- **api-templates/** - API route templates
490- **page-templates/** - Page component templates
491- **form-templates/** - Form component templates
492- **security-rules-templates/** - Firestore security rules
493- **environment-templates/** - .env.example files
494- **docker-templates/** - Docker configurations
495
496All resources loaded as needed during development.