App Project Analyzer
When to use
First step of any /apps <target> mission or "turn my app into a mobile/desktop app" request, loaded by app-factory.
Inputs
- Project root. Optional target id.
Procedure
- Call
appfactory action=analyze. - Verify each field by reading the source files:
- Package manager from the lockfile:
package-lock.json(npm),pnpm-lock.yaml(pnpm),yarn.lock(yarn),bun.lockb/bun.lock(bun). Run scripts asnpm run build,pnpm build,yarn build,bun run build. - Frontend:
package.jsondependencies (next,vite,react-scripts,@angular/core,nuxt,@sveltejs/kit,vue) and the version. - Build output:
dist/(Vite),build/(CRA),out/(Next export),dist/<name>/browser(Angular 17+),.output/public(Nuxt generate). - Server features (Next.js):
grepfor"use server",cookies(),headers(),export const dynamic,middleware.ts,app/**/route.ts,pages/api/**,getServerSideProps. - Backend:
requirements.txt/pyproject.toml(FastAPI, Django, Flask),@nestjs/core,express, Next.js API routes. - Auth:
next-auth/@auth/*,@clerk/*,@supabase/*,firebase,passport, JWT libraries; note cookie vs bearer token. - API base URL:
.env.example,.env*keys (NEXT_PUBLIC_API_URL,VITE_API_URL,REACT_APP_API_URL), hardcodedfetch("http.... - Existing folders:
os/,android/,ios/,src-tauri/,capacitor.config.*.
- Package manager from the lockfile:
- Never print secret values from
.envfiles; only key names.
Verification
Every field is backed by a file path or marked none.
Failure modes and fixes
- Monorepo: locate the web app package (
apps/web,packages/*) and analyze it, not the root. - No build script: report it; the plan adds the build only in
os/<target>.
Deliverable
The analysis summary passed to app-compatibility-engine and the report step analysis.
