Framework Detection
When you connect a GitHub repository, Stackpad analyzes your project to detect the framework and configure the build automatically. No Dockerfile or build configuration is needed for supported frameworks.
Supported frameworks
| Framework | Detection | Default port |
|---|---|---|
| Next.js | next in dependencies + next.config.* | 3000 |
| Remix | @remix-run/node in dependencies | 3000 |
| Astro | astro in dependencies | 4321 |
| Nuxt | nuxt in dependencies | 3000 |
| SvelteKit | @sveltejs/kit in dependencies | 3000 |
| Express | express in dependencies | 3000 |
| Hono | hono in dependencies | 3000 |
| Static site | No server framework detected | 80 |
How detection works
Stackpad reads your package.json (and framework-specific config files like next.config.js) to determine:
- Framework type — which build strategy and Dockerfile template to use
- Package manager — from the lockfile (
pnpm-lock.yaml,yarn.lock, orpackage-lock.json) - Build command — from the
buildscript inpackage.json - Start command — from the
startscript or framework defaults - Output mode — server-rendered or static
Next.js specifics
For Next.js applications, Stackpad detects:
- Standalone output mode (recommended) — if
output: 'standalone'is set innext.config.js, Stackpad uses it for a smaller image - Default output — if standalone isn’t configured, the full
.nextdirectory is used - Static export — if
output: 'export'is set, the app is served as a static site
Static sites
If no server framework is detected, Stackpad treats your project as a static site. It looks for build output in common directories:
dist/build/out/public/
The static files are served with a lightweight web server.
Monorepo support
Stackpad detects pnpm workspaces and lets you specify a root directory for your service. When a root directory is set:
- Dependencies are installed from the workspace root
- The build runs in the specified directory
- Only the relevant package is included in the final image
Custom Dockerfiles
If auto-detection doesn’t fit your needs, you can use a template to deploy pre-configured stacks for popular software.
What’s next?
- Git push deploy — understand the full deployment pipeline
- Templates — deploy pre-configured stacks for popular software