Engineering Checklist
World-Class Engineering Checklist
A practical guide for building production-grade software. Use this when prompting AI or reviewing your own work.
๐๏ธ Architecture & Design
Before Writing Code
System Design Principles
Example prompt for AI: > โDesign a database schema for [feature]. Include relationships, indexes, and explain your choices. Consider how this scales to 100k users.โ
๐ Security
Common Vulnerabilities (OWASP Top 10)
Example prompt for AI: > โReview this API endpoint for security vulnerabilities. Check for: SQL injection, XSS, authentication bypass, and rate limiting.โ
โ Testing
Test Pyramid (Bottom to Top)
- Unit Tests (70%) - Test individual functions in isolation
- Integration Tests (20%) - Test how components work together
- E2E Tests (10%) - Test user flows through the entire app
What to Test
Coverage Goals
Example prompt for AI: > โWrite comprehensive tests for this function. Include: happy path, edge cases (null, empty, large inputs), and error handling. Use Jest.โ
๐ Error Handling
Never Fail Silently
Error Handling Strategy
try {
await riskyOperation()
catch (error) {
} // 1. Log the error with context
.error('Failed to process payment', {
logger,
userId,
amount: error.message,
error: error.stack
stack
})
// 2. Alert if critical
if (isCritical) {
.notify(error)
alerting
}
// 3. Return user-friendly message
return {
: 'Unable to process payment. Please try again.',
error: 'PAYMENT_FAILED'
code
} }
Example prompt for AI: > โAdd comprehensive error handling to this code. Log errors with context, return user-friendly messages, and implement retry logic for network failures.โ
๐ Performance
Frontend Performance
Backend Performance
Performance Budgets
Example prompt for AI: > โOptimize this code for performance. Look for: N+1 queries, missing indexes, unnecessary API calls, and opportunities for caching.โ
๐ Code Quality
Clean Code Principles
Code Review Checklist
TypeScript Best Practices
Example prompt for AI: > โRefactor this code for readability and maintainability. Use meaningful names, break into smaller functions, add type safety, and remove code duplication.โ
๐ Documentation
What to Document
Good Documentation Format
/**
* Calculates the user's fluency score based on word mastery.
*
* Algorithm: Weighted average of all four skills (listen, read, write, speak)
* with higher weight given to productive skills (write, speak).
*
* @param userId - The user's unique identifier
* @param options - Optional filtering (date range, CEFR level)
* @returns Fluency score from 0-100
* @throws {DatabaseError} If unable to fetch user data
*
* @example
* const score = await calculateFluencyScore('user-123')
* console.log(score) // 78.5
*/
async function calculateFluencyScore(
: string,
userId?: FluencyOptions
options: Promise<number> )
Example prompt for AI: > โAdd JSDoc comments to all functions explaining purpose, parameters, return values, and edge cases. Include examples where helpful.โ
๐ DevOps & Deployment
CI/CD Pipeline
Monitoring & Observability
Database Best Practices
Example prompt for AI: > โCreate a GitHub Actions workflow that: runs tests, checks linting, builds the app, and deploys to Vercel on merge to main.โ
๐ฏ User Experience
Perceived Performance
Accessibility (a11y)
Mobile Responsiveness
Example prompt for AI: > โImprove this componentโs UX: add loading/error states, make it keyboard accessible, ensure WCAG AA compliance, and optimize for mobile.โ
๐ Maintenance & Scalability
Code Maintenance
Scaling Checklist
Technical Debt Management
Example prompt for AI: > โReview this codebase for technical debt. Identify: dead code, outdated dependencies, missing tests, performance bottlenecks, and security issues.โ
๐ Prompting AI Effectively
Good Prompt Structure
Context: [What you're building, tech stack, constraints]
Task: [Specific thing you want done]
Requirements: [Constraints, standards, must-haves]
Format: [How you want the output]
Example:
"I'm building a Next.js app with TypeScript and Supabase.
Create an API route that:
- Fetches user profile data from Supabase
- Implements proper error handling
- Includes rate limiting (10 req/min per user)
- Has comprehensive tests
- Follows TypeScript strict mode
Return: The route.ts file, test file, and explanation of security considerations."
Iterative Refinement
- Start broad - โCreate a user authentication systemโ
- Add constraints - โโฆusing Supabase Auth with email/passwordโ
- Request improvements - โAdd rate limiting and better error messagesโ
- Ask for review - โReview this for security vulnerabilitiesโ
Ask for Reasoning
- โExplain why you chose this approach over alternativesโ
- โWhat are the trade-offs of this solution?โ
- โHow would this scale to 1M users?โ
- โWhat could go wrong with this implementation?โ
๐ Quick Reference: AI Prompt Templates
For New Features
Create [feature] for [app type] using [tech stack].
Requirements:
- [Business requirement 1]
- [Business requirement 2]
- Error handling with user-friendly messages
- TypeScript with strict types
- Comprehensive tests (unit + integration)
- Performance optimized for [scale]
- Secure against [specific threats]
Include: Implementation, tests, and documentation.
For Code Review
Review this code for:
1. Security vulnerabilities
2. Performance issues
3. Code quality and maintainability
4. Missing error handling
5. Test coverage gaps
6. Accessibility issues
Provide specific suggestions with code examples.
For Debugging
This code is failing with: [error message]
Context:
- What I expect: [expected behavior]
- What's happening: [actual behavior]
- What I've tried: [debugging steps]
Tech stack: [frameworks/versions]
Help me:
1. Identify root cause
2. Fix the issue
3. Add tests to prevent regression
4. Improve error handling
For Optimization
Optimize this code for [performance/readability/maintainability].
Current issues:
- [Specific problem 1]
- [Specific problem 2]
Constraints:
- Must maintain [requirement]
- Cannot change [constraint]
Provide: Refactored code + explanation of improvements + performance benchmarks.
For Testing
Write comprehensive tests for this [function/component/API].
Cover:
- Happy path
- Edge cases (null, empty, large inputs)
- Error scenarios
- Security concerns
Use [testing framework] and aim for 90%+ coverage.
๐ฏ Production-Ready Checklist
Before deploying to production, verify:
Functionality
Performance
Security
Reliability
Quality
Documentation
๐ก Remember
Perfect is the enemy of shipped.
Use this checklist as a guide, not a gate. Early-stage products can ship with: - Basic error handling (not comprehensive monitoring) - Core feature tests (not 100% coverage) - Good-enough performance (not perfectly optimized)
But NEVER compromise on: - Security - Data integrity - User privacy - Core functionality
The Path: 1. Ship MVP โ Learn from users 2. Add monitoring โ Learn what breaks 3. Improve quality โ Iterate based on data 4. Scale thoughtfully โ When you have product-market fit
Start with good habits: - Write tests for critical paths - Handle errors gracefully - Document as you go - Review your own code before asking AI to
World-class engineers arenโt perfect. Theyโre disciplined, thoughtful, and always learning.
๐ Additional Resources
- OWASP Top 10 - Security vulnerabilities
- Web.dev - Performance and best practices
- Refactoring.Guru - Code patterns and anti-patterns
- 12 Factor App - Building SaaS applications
- System Design Primer - Scalability
๐ What Supabase Handles For You
Supabase is a Backend-as-a-Service (BaaS) that eliminates ~40% of typical backend work.
โ You Donโt Need To Build:
Database Infrastructure
- โ PostgreSQL setup & management - No server provisioning, updates, or patches
- โ Connection pooling - Handles thousands of concurrent connections efficiently
- โ Automatic backups - Daily backups on paid plans (you just need to verify restore works)
- โ Replication & high availability - Built-in redundancy (on production plans)
- โ Database migrations - Version control for schema changes (you write SQL, Supabase tracks it)
Authentication System
- โ User registration & login - Email/password, magic links, OAuth (Google, GitHub, etc.)
- โ Password hashing - bcrypt automatically applied
- โ Session management - JWT tokens, refresh tokens, automatic expiry
- โ Email verification - Built-in email confirmation flow
- โ Password reset - Secure reset token generation and validation
- โ Social auth - Pre-built integrations with 20+ providers
- โ Multi-factor authentication - TOTP support out of the box
Security Features
- โ Row Level Security (RLS) - Database-level access control (you write policies, Supabase enforces)
- โ SQL injection protection - Parameterized queries by default
- โ HTTPS/TLS - All connections encrypted
- โ API key management - Separate anon and service role keys
- โ CORS configuration - Cross-origin request handling
Storage & File Management
- โ Object storage - S3-compatible file storage (images, videos, audio)
- โ Image transformations - Resize, crop, optimize on-the-fly
- โ CDN delivery - Fast global file delivery
- โ Access control - Public/private buckets with RLS policies
Real-time Features
- โ Database subscriptions - Listen to INSERT, UPDATE, DELETE events
- โ WebSocket management - Real-time connections handled automatically
- โ Presence - Track online users (channels feature)
- โ Broadcasting - Send messages between clients
APIs
- โ Auto-generated REST API - Every table gets CRUD endpoints automatically
- โ Auto-generated GraphQL - Optional GraphQL interface
- โ OpenAPI documentation - Swagger docs auto-generated from schema
Developer Experience
- โ Database GUI - Visual table editor, query builder
- โ SQL editor - Run queries directly in dashboard
- โ Logs viewer - See all database queries and errors
- โ Schema visualization - Visual ERD diagrams
- โ Local development - Supabase CLI for offline work
โ ๏ธ You Still Need To Handle:
Application Logic
- โ Business rules - Supabase stores data; you define whatโs valid
- โ Complex workflows - Multi-step processes need custom API routes
- โ Third-party integrations - OpenAI, Stripe, etc. are your responsibility
- โ Data transformations - Supabase returns raw data; you format it for UI
Quality Assurance
- โ Testing - Write your own tests for RLS policies, API endpoints, edge cases
- โ Monitoring - Add Sentry or similar for application errors
- โ Performance optimization - Create indexes, optimize queries, add caching
Advanced Features
- โ Rate limiting - Implement in your API routes (not built into Supabase)
- โ Complex caching - Redis or similar for computed results
- โ Background jobs - Queue systems for long-running tasks
- โ Advanced search - Full-text search needs manual setup or external service
๐ฐ What This Saves You
Without Supabase, youโd need to build/manage:
Traditional Stack:
โโโ PostgreSQL server setup (1-2 days)
โโโ Auth system (1-2 weeks)
โ โโโ User registration/login
โ โโโ Password reset flow
โ โโโ Email verification
โ โโโ Session management
โ โโโ OAuth integrations
โโโ File upload system (3-5 days)
โ โโโ Storage service (S3/GCS)
โ โโโ Upload handlers
โ โโโ Access control
โ โโโ CDN setup
โโโ Real-time infrastructure (1 week)
โ โโโ WebSocket server
โ โโโ Pub/sub system
โ โโโ Connection management
โโโ API layer (1 week)
โ โโโ CRUD endpoints
โ โโโ Input validation
โ โโโ API documentation
โโโ DevOps (ongoing)
โโโ Database backups
โโโ Security patches
โโโ Scaling infrastructure
โโโ Monitoring
Total: 4-6 weeks of engineering work
With Supabase:
Your Responsibilities:
โโโ Define database schema (1-2 days)
โโโ Write RLS policies (1-2 days)
โโโ Configure auth providers (1-2 hours)
โโโ Set up storage buckets (1 hour)
โโโ Build your application logic
Total: 3-5 days of engineering work
Time saved: ~85% on infrastructure/backend basics
๐ฏ Best Practices with Supabase
Do This:
- โ Use RLS policies - Never bypass with service role key in client code
- โ Create indexes - Supabase doesnโt auto-index (except primary keys)
- โ Write migrations - Track all schema changes in SQL files
- โ Test RLS policies - Verify users canโt access unauthorized data
- โ Use TypeScript types - Generate types from your schema
- โ Monitor query performance - Check slow query logs in dashboard
- โ Separate environments - Use different projects for dev/staging/prod
Donโt Do This:
- โ Use service role key in frontend - Bypasses all RLS security
- โ Store secrets in database - Use Supabase Vault or environment variables
- โ Skip migrations - Manual schema changes break deployments
- โ Ignore RLS - โIโll add security laterโ = security breach waiting to happen
- โ Over-fetch data - Select only columns you need
- โ Forget indexes - Unindexed queries slow down as data grows
๐ Supabase-Specific Checklist
Before going to production: - [ ] RLS enabled on all tables - No public access without policies - [ ] Policies tested - Verify users canโt access othersโ data - [ ] Indexes created - On foreign keys, commonly queried columns - [ ] Backups verified - Test restoring from backup - [ ] Storage buckets configured - Public vs private correctly set - [ ] Auth providers working - Test all login methods - [ ] Environment variables set - Anon key (client), Service key (server only) - [ ] Connection limits understood - Know your planโs limits - [ ] Migrations in version control - All schema changes tracked
๐ง Example: What You Write vs What Supabase Handles
Traditional Backend (You Write Everything):
// 200+ lines of auth code
.post('/api/register', async (req, res) => {
app// 1. Validate email format
// 2. Check if email exists
// 3. Hash password with bcrypt
// 4. Generate verification token
// 5. Send verification email
// 6. Store user in database
// 7. Create session
// 8. Return JWT token
})
With Supabase (You Write This):
// 3 lines
const { data, error } = await supabase.auth.signUp({
, password
email
})// Supabase handles: hashing, verification email, session, everything
Traditional Data Access (Manual Security):
// You must remember to check permissions
.get('/api/user-data', async (req, res) => {
app// 1. Verify JWT token
// 2. Extract user ID from token
// 3. Query database with user ID filter
// 4. Check if user owns the data
// 5. Return data or 403 error
})
With Supabase RLS (Automatic Security):
-- Write once, enforced forever
CREATE POLICY "Users can only see their own data"
ON user_data FOR SELECT
USING (auth.uid() = user_id);
// Client code - RLS automatically enforces security
const { data } = await supabase
.from('user_data')
.select('*')
// User CANNOT access other users' data, even if they try
Last Updated: October 2025