Step 14: Verify Code

Phase: implement

Context

You have app_files — the complete app ready to deploy. Before deploying, verify everything is correct.

What to do

Review the generated code against this checklist. Fix any issues before deploying.

Verification checklist

API configuration

  • Is API_URL set to https://run402.com?
  • Is ANON_KEY set to the actual anon_key from Step 10?
  • Is service_key absent from frontend code? (It should NEVER be in client-side code)
  • Do all API calls include the apikey header?

Data operations

  • Do table names in API calls match tables_created?
  • Do column names in queries match the actual schema?
  • Are PostgREST filter operators correct? (eq, neq, gt, gte, lt, lte, like, ilike, in, is)
  • Do POST requests include Prefer: return=representation if you need the created row back?

Authentication (if applicable)

  • Does signup call /auth/v1/signup?
  • Does login call /auth/v1/token?grant_type=password?
  • Is the access_token stored (e.g., in localStorage)?
  • Do authenticated requests include Authorization: Bearer {access_token}?
  • Is there a logout flow that clears the token?
  • Are protected UI elements hidden when not logged in?

RLS compatibility

  • If using user_owns_rows: does every INSERT include the user_id (or owner column)?
  • If using public_read: are write operations only done with service_key (admin only)?
  • If using public_read_write: is this acceptable for the app's security model?

UI / UX

  • Does the app display loading states while fetching data?
  • Are errors shown as friendly messages (not raw API errors)?
  • Does it work on mobile if app_spec.ui.mobile_friendly is true?
  • Are interactive elements (buttons, inputs) large enough to tap on mobile?

HTML validity

  • Does index.html start with <!DOCTYPE html>?
  • Are all tags properly closed?
  • Is charset="UTF-8" set?
  • Is viewport meta tag present for mobile?

If any issues are found, fix them in app_files before proceeding.

What to tell the user

"Everything looks good! Deploying your app now..."

Expected output

No new outputs. This step is a verification gate. Only proceed to Step 15 after all checklist items pass.

Memory directive