# Supported stacks

When you add an app, Coresmith reads the repository and fills in the stack. **Add an app** and the app's page only show the settings that apply to that stack.

## PHP

- Laravel, Symfony and plain PHP.
- **Version:** from `.tool-versions`, or from `require.php` in `composer.json` together with what `composer.lock` allows. You can pick another on the app's page.
- **Extras:** Laravel apps can run a queue worker or Horizon, and the scheduler. The app's page also offers Reverb when the app requires `laravel/reverb`, and Inertia's server-side rendering when the app uses Inertia and has a `build:ssr` script.

## Ruby

- Rails apps (with `bin/rails`), Sinatra apps, and other Rack apps with a `config.ru`, such as Hanami, Roda or Grape. They run on Puma, so `Gemfile.lock` needs the `puma` gem.
- **Version:** from `.tool-versions`, `.ruby-version`, or the `ruby` line in the `Gemfile`.
- **Migrations:** run for Rails apps, and for Sinatra apps that use `sinatra-activerecord`.
- **Extras:** Rails apps can run Sidekiq or Solid Queue.

## JavaScript and TypeScript

- **Runtimes:** Node.js, Bun and Deno. The version comes from `.tool-versions`, `.nvmrc`, `.node-version`, or `engines` and `packageManager` in `package.json`. Deno reads `.tool-versions` or `.dvmrc`.
- **Package managers:** npm, pnpm, Yarn and Bun, picked from the lockfile.
- **Servers:** Next.js, Nuxt, SvelteKit, Astro with its Node adapter, AdonisJS 6, Angular with server-side rendering, and any app whose `start` script runs a server package such as Express, Fastify, Hono, Koa, NestJS or Elysia. **Add an app** names the server it finds, and the app's pages show it with its version, such as Express 5. A start script that runs a server Coresmith doesn't know goes under **Other server**.
- **React, Vue and Svelte:** apps built by Vite, Create React App, Vue CLI or Svelte's Rollup template are served as files, with no server of their own. A path with no file of its own, such as `/orders/42`, gets the app's `index.html`, so links to pages the app routes in the browser work. **Add an app** asks for the web root when the app builds somewhere other than the usual folder, such as `dist` for Vite.
- **AdonisJS:** Coresmith makes an `APP_KEY`, and sets `LOG_LEVEL` to `info` and `SESSION_DRIVER` to `cookie`, which you can change. Add anything else `start/env.ts` requires to the app's environment.

Coresmith won't start a development server. If the start script runs `vite dev`, `next dev`, `nodemon` or similar, **Add an app** says so and suggests a production command. Keep the app in the foreground, with `pm2-runtime` in place of `pm2 start`, and compile TypeScript in the build so the app doesn't compile it on every start.

## Python

- Django, Flask, FastAPI and Starlette, and other apps whose `Procfile` web line starts them with gunicorn or uvicorn.
- **Dependencies:** installed with the tool the repository locks them with: uv for `uv.lock`, Poetry for `poetry.lock`, Pipenv for `Pipfile.lock`, or from `requirements.txt` or `pyproject.toml`. Development dependencies stay out.
- **Version:** from `.tool-versions`, `.python-version`, `requires-python` or Poetry's `python` line in `pyproject.toml`, or `runtime.txt`. When the repository allows it, Coresmith picks Python 3.14 over 3.15, since more packages ship ready-built for it.
- **Django:** Coresmith runs `collectstatic` when the settings set `STATIC_ROOT`, and runs `migrate`. Django answers only for the domains in `ALLOWED_HOSTS`. If your settings list fixed domains without the app's, **Add an app** says so and shows the line to change.
- **Alembic:** apps with `alembic.ini` run `alembic upgrade head`.
- **Extras:** apps that use Celery get Celery worker and Celery beat switches, once Coresmith finds the Celery app in a package's `celery.py`, or in `celery_app.py`, `tasks.py` or `worker.py`.
- Django and Flask apps get a `SECRET_KEY` when you add them.

## Go

- Any Go web app, on plain `net/http` or a framework such as Gin, Echo, Fiber, Chi, Gorilla, Iris, Hertz, Beego, Buffalo, go-zero, Kratos, GoFrame, Huma or Connect, and gRPC services.
- **Version:** from `.tool-versions`, or the `go` and `toolchain` lines in `go.mod`, read as a minimum, as Go does.
- **Which program runs:** every main package in the module builds. The one that starts a server runs as the app. When several do, **Add an app** asks which, and you can type the folder of one Coresmith didn't find. The others are on the app's path by name, for workers and cron jobs. Folders such as `examples`, `tools` and `testdata` are skipped.
- **Port:** the app listens on the port Coresmith gives it in `PORT`. If the code reads another variable, such as `LISTEN_ADDR` or `SERVER_PORT`, Coresmith sets that one too. A port written into the code, or into Beego's or go-zero's config file, is refused when you add the app, with the line to change.
- **Frontends:** a `package.json` beside `go.mod` installs and builds first, so `//go:embed` finds the built files. templ templates generate when `go.mod` requires templ.
- **Migrations:** goose runs before a release goes live when the app's environment sets `GOOSE_DRIVER` and `GOOSE_DBSTRING`.
- Coresmith can't build Encore apps or Revel apps yet.

## Java

- Any Java web app that Maven or Gradle builds into something that runs on its own: Spring Boot, JHipster, Quarkus, Micronaut, Helidon, Dropwizard, Javalin and Vert.x apps, and plain apps whose jar names a `Main-Class`. Kotlin and Groovy apps built the same way work too.
- **Build:** the build skips tests. Maven uses the project's `mvnw` when it has one. Gradle builds need the project's `gradlew`, and a project without one is refused with the command that adds it.
- **Version:** from `.tool-versions`, `.java-version`, `.sdkmanrc` or `system.properties`, or from the build: `java.version` or the compiler release in `pom.xml`, a Gradle toolchain or `sourceCompatibility`, or Kotlin's `jvmToolchain`. Coresmith offers the long-term lines, 25, 21 and 17, and picks the oldest that meets what the build asks for.
- **Port:** each framework gets its port in the variable it reads, such as `SERVER_PORT` for Spring Boot. Other apps read `PORT`. The memory Java may use follows the app's size, through `JAVA_OPTS`, which you can change. Java apps start at the Medium size.
- **JHipster:** monoliths build with the prod profile, and Coresmith makes the JWT secret it expects. Point the app at its database with `SPRING_DATASOURCE_URL`, `SPRING_DATASOURCE_USERNAME` and `SPRING_DATASOURCE_PASSWORD`. Gateways and microservices also need a Consul or Eureka registry, which Coresmith doesn't run.
- **Migrations:** Flyway and Liquibase run when the app starts.
- Coresmith refuses WAR files meant for a servlet container such as Tomcat, and Android apps.

## Static sites

- A repository with `index.html` at its root or in `public/`, or one whose build writes static files, such as Vite without a framework, Angular without server-side rendering, Nuxt's `generate`, SvelteKit's static adapter and Astro without an adapter. **Add an app** calls these **Static**.
- **Build:** a static site with a build step builds with the tool its lockfile names: Bun for `bun.lock` or `bun.lockb`, npm for `package-lock.json`, pnpm for `pnpm-lock.yaml`, Yarn for `yarn.lock`. With no lockfile, it builds with npm. To build with Bun, commit its `bun.lock`.
- **Addresses:** pages work without `.html`, so `/docs/intro` serves `docs/intro.html` or `docs/intro/index.html`. When the site has a `404.html`, visitors to a page that doesn't exist get it.

## Apps in a folder

When a repository holds apps in folders, **Add an app** shows a **Folder** field. It lists each folder, up to three levels down, that holds a `composer.json`, `Gemfile`, `requirements.txt`, `pyproject.toml`, `Pipfile`, `go.mod`, `pom.xml`, `build.gradle`, `package.json`, `deno.json` or `index.html`. The app installs, builds and runs from the folder you pick.

## When Coresmith isn't sure

If the repository leaves a choice open, such as which framework or runtime, the field reads **Pick one**, and you choose. If something would stop the app from running, **Add an app** says what and what to change before you add it.

## Not supported yet

- Other languages, such as Elixir, Rust or .NET.
- Apps inside a JavaScript workspace (npm, pnpm, Yarn or Bun workspaces).
- Docker images.
