BYU Strategy - Marriott School of Business

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

Authentication & Authorization

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)

  1. Unit Tests (70%) - Test individual functions in isolation
  2. Integration Tests (20%) - Test how components work together
  3. 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
  logger.error('Failed to process payment', {
    userId,
    amount,
    error: error.message,
    stack: error.stack
  })

  // 2. Alert if critical
  if (isCritical) {
    alerting.notify(error)
  }

  // 3. Return user-friendly message
  return {
    error: 'Unable to process payment. Please try again.',
    code: 'PAYMENT_FAILED'
  }
}

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(
  userId: string,
  options?: FluencyOptions
): 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

  1. Start broad - โ€œCreate a user authentication systemโ€
  2. Add constraints - โ€œโ€ฆusing Supabase Auth with email/passwordโ€
  3. Request improvements - โ€œAdd rate limiting and better error messagesโ€
  4. 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


๐ŸŽ 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
app.post('/api/register', async (req, res) => {
  // 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({
  email, password
})
// Supabase handles: hashing, verification email, session, everything

Traditional Data Access (Manual Security):

// You must remember to check permissions
app.get('/api/user-data', async (req, res) => {
  // 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