Framework and deployment checklists
Reference material for the productionize-app skill. Apply the block that matches the app’s framework (during Step 3) and the block that matches the deployment target (during Step 4).
Framework-specific optimizations
Flutter
- Store tokens and credentials in
flutter_secure_storage; reserveshared_preferencesfor non-sensitive flags and cache metadata. - Configure explicit
connectTimeoutandreceiveTimeoutonDioorhttp.Client, mapping timeout and non-2xx responses to typed UI error states. - Use
constconstructors,ListView.builder(orSliverList) for unbounded lists, and verify frame timings in--profilemode. - Audit platform configs: iOS
Info.plistprivacy usage strings (NS*UsageDescription) and AndroidAndroidManifest.xmlminimal permissions plusisMinifyEnabled = true(R8/ProGuard) for release builds. - Wire route and form state restoration (
RestorationMixinor routerrestorationScopeId) so OS background kills recover cleanly.
React/Next.js
- Wrap route subtrees with React Error Boundaries (
error.tsxin Next.js App Router or an explicitErrorBoundary) andSuspensefallbacks so render crashes do not blank the app. - Keep server state in a dedicated cache layer (TanStack Query, SWR, or Next.js
fetchcache) with explicitstaleTime, boundedretrycounts, andAbortControllercancellation on unmount; keep client UI state minimal and scoped. - Code-split heavy routes/widgets via
React.lazyornext/dynamicand verify bundle size with@next/bundle-analyzerorvite-bundle-visualizer. - Confirm
tsc --noEmitand production build (next build/vite build) pass with zero errors and noconsole.lognoise left in hot render paths. - Set page
title,description, OpenGraph tags, canonical URLs,robots.txt, andsitemap.xmlfor public routes.
Node.js
- Register a terminal Express/Fastify error middleware that logs structured error details internally and returns sanitized JSON (omitting stack traces when
NODE_ENV=production). - Enable
helmet(or equivalent headers:Strict-Transport-Security,X-Content-Type-Options: nosniff,Content-Security-Policy), restrict CORS to an explicit origin allowlist, and apply request rate limiting (express-rate-limitor@fastify/rate-limit). - Configure bounded database pool sizes (
max,idleTimeoutMillis,connectionTimeoutMillis) and statement timeouts. - Expose
GET /healthz(process liveness) andGET /readyz(dependency check returning200or503), plus gracefulSIGTERM/SIGINTshutdown draining open connections. - Validate
process.envat startup withzod,envalid, orvalibot, exiting non-zero immediately if required keys are missing or malformed.
Python
- Configure structured JSON logging (
structlogor a JSONlogging.Formatter) with request/correlation IDs, and handle uncaught exceptions in a single framework exception handler that hides tracebacks in production. - Validate request payloads and startup environment config with
pydantic/pydantic-settingsso invalid inputs return422/400and missing env vars fail fast on boot. - Set explicit timeouts on all
httpx/requestscalls and configure SQLAlchemy/DB pool limits (pool_size,max_overflow,pool_pre_ping=True); eliminate N+1 queries usingselectinload/joinedloadwhere needed. - Add bounded TTL caching (Redis or
cachetools) for expensive read-heavy queries with explicit invalidation keys. - Run under a production ASGI/WSGI server (
uvicorn/gunicornwith configured worker count, no--reload) and enforcepytest,ruff, andmypy/pyrightin CI.
Deployment preparation
TestFlight (iOS)
- Increment
CFBundleVersion(build number) and verify bundle identifier matches App Store Connect. - Confirm distribution signing certificate and provisioning profile succeed in
xcodebuild -exportArchive(or Fastlanematch/gym). - Verify
Info.plistincludesITSAppUsesNonExemptEncryptionand all required privacy usage descriptions. - Archive and upload dSYM symbols for crash symbolication.
- Validate and upload the
.ipaviaxcrun altool/xcrun notarytoolor Fastlanepilotwith zero App Store Connect validation errors.
Google Play (Android)
- Build a signed release Android App Bundle (
./gradlew bundleRelease) using an upload keystore stored outside the repository. - Increment
versionCode, confirmtargetSdkVersionmeets current Play Store policy, and verifyandroid:debuggable="false". - Audit
AndroidManifest.xmlto strip unused permissions and verify R8/ProGuard shrinking (isMinifyEnabled = true) with mapping files archived for crash deobfuscation. - Smoke-test the release
.aab(viabundletoolor Play Internal Testing) across at least oneminSdkVersionand one current-API device/emulator.
Web deployment (Vercel/Netlify/AWS)
- Verify the production build command succeeds cleanly in CI with separate preview and production environment variable sets.
- Confirm custom domain DNS, valid TLS certificate, automatic HTTP-to-HTTPS redirect, and
Strict-Transport-Securityheader. - Set
Cache-Control: public, max-age=31536000, immutableon content-hashed static assets and revalidation (no-cacheor shorts-maxage) on HTML entry points. - Verify custom
404/500pages, SPA/SSR routing rewrites, and uptime/error alerting (e.g., Sentry, CloudWatch, or provider alerts).
Container deployment (Docker/Kubernetes)
- Use a multi-stage
Dockerfilewith pinned base image version/digest,.dockerignoreexcluding.git,.env, and tests, and a non-root runtimeUSER. - Define Docker
HEALTHCHECKand KuberneteslivenessProbe,readinessProbe, and explicitresources.requestsandresources.limits. - Inject secrets at runtime via Kubernetes
Secretor an external secret manager (zero secrets baked into image layers orENVdefaults). - Verify the container handles
SIGTERMand exits0withinterminationGracePeriodSeconds, and emits JSON logs tostdout/stderr. - Validate horizontal scaling with at least 2 replicas (confirming stateless request handling or shared session/cache storage).