Skip to content

Project

Source: src/Railway/Project.ts

A Railway.Project is a workspace-scoped namespace. It owns environments and services. Names are unique per workspace.

Alchemy generates a unique name unless you pass one. url is the dashboard URL. A production environment is created with the project — do not recreate it as an Environment resource.

const site = yield* Railway.Project("Site");

Pass name when you need a stable project name. Changing it later updates the project in place.

const site = yield* Railway.Project("Site", {
name: "my-site",
});

description is optional and updates in place.

const site = yield* Railway.Project("Site", {
description: "production web app",
});

Workspace defaults to the current token. Pass workspaceId to pin it.

const site = yield* Railway.Project("Site", {
workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

defaultEnvironmentName is create-only. Railway’s default is production. Extra environments (staging) are a separate Environment resource.

const site = yield* Railway.Project("Site", {
defaultEnvironmentName: "production",
});

Declare the Project once. Pass it into every child. Resource-valued props accept the resource or an Effect producing it.

src/project.ts
import * as Railway from "alchemy/Railway";
export const Site = Railway.Project("Site");