Magic Apps
Frameworks and detection
Which frameworks Magic Apps detects and runs, and what some of them need from you.
When you create an app, Dcubix reads the repository and names its framework. The build uses Railpack, which installs the language, the dependencies and a start command. If the repository has a Dockerfile, it is built with that instead; see Dockerfile.
Supported frameworks
Deployed and serving on Magic Apps:
| Framework | Notes |
|---|---|
| Django, FastAPI, Flask, FastHTML | |
| Next.js (server rendering) | npm, and Nx with pnpm |
| Nuxt, SvelteKit (Node) | |
| TanStack Start | Default and Nitro |
| Rails, Rack | Needs RAILS_ENV, RACK_ENV and SECRET_KEY_BASE; detection proposes them |
| Laravel, plain PHP | Needs DB_CONNECTION at build time; detection proposes it |
| Phoenix | Needs PHX_SERVER and SECRET_KEY_BASE; detection proposes them |
| ASP.NET | |
| Rocket | Listens on 8000 unless ROCKET_PORT is set; detection proposes it |
| npm, pnpm and Yarn workspaces, Turborepo | Set the root directory if the app isn’t at the top of the repository |
| React Router v7, Remix | With a Dockerfile in the repository |
| Static files | Served by Caddy |
Any repository with a Dockerfile |
A single EXPOSE sets the port |
Go, Java (Maven and Gradle), Rust, Deno, Bun, Gleam and C++ projects also build and run.
Detected, not yet tested
Express, Fastify, NestJS and Astro with its Node adapter are detected, but haven’t been through our deploy tests yet. Remix before v7, Qwik City, Angular SSR, SolidStart and Analog on Node, and Hono on @hono/node-server are detected as Node.js.
If the start command Railpack picks is wrong for your app, set your own in a Procfile.
App or site?
A framework that can be served as a static site or at the edge is usually better as a Serverless Site: it’s served from every location and costs less. Magic Apps is for anything that needs a long-running server process.
Python versions
Railpack installs a prebuilt Python. Pin a minor version, such as 3.12 in .python-version, rather than an exact patch release.
Not every patch release has a prebuilt interpreter. When one is missing, the build compiles Python from source on its own and says so in the log. It works, but the build takes about three times as long.
Dependency files saved as UTF-16 are read correctly. This is what PowerShell’s pip freeze > requirements.txt writes.
Framework notes
Rails
Without RAILS_ENV=production, Rails runs in development mode and answers every request with 403. Rails also needs SECRET_KEY_BASE in production. Detection proposes all three variables, with a generated secret.
Laravel
Laravel caches its configuration at build time, so DB_CONNECTION has to be set as a build variable. With DB_CONNECTION=pgsql, the image also gets the Postgres driver. Dcubix runs php artisan migrate as the release command, with config:clear first.
Workers and the scheduler should rebuild the cache with the runtime variables before they start:
worker: php artisan optimize && exec php artisan queue:work
scheduler: php artisan optimize && exec php artisan schedule:workPhoenix
Set PHX_SERVER=true and a SECRET_KEY_BASE. Detection proposes both.