Select the types of activity you want to include in your feed.
flora is a fast and secure runtime that lets you write discord bots for your servers, with a rich TypeScript SDK, without worrying about running infrastructure. [mirror]
···1010- At the end of each plan, give me a list of unresolved questions to answer, if any. Make the questions extremely concise.
1111- Prefer runtime workflows via `./x` commands.
12121313+## OpenAPI Writing + Naming
1414+1515+### Model Names
1616+1717+- Singular nouns, PascalCase (`Invoice`, `LineItem`, `PaymentMethod`).
1818+- Name by what data represents, not how used (`Address` not `UserAddressInputObject`).
1919+- Use one variant suffix convention consistently:
2020+ - `CreateUserRequest`, `UpdateUserRequest`, `UserResponse` (preferred).
2121+- Avoid redundant prefixes within same service (`Profile`, `Settings`, `Preferences`).
2222+2323+### Local Overrides
2424+2525+- `CreateXRequest` naming is preferred.
2626+- `snake_case` is OK in OpenAPI schemas.
2727+- Non-statement booleans are OK.
2828+- Use "Guild ID" wording in params/descriptions.
2929+- Tag `deployment` only if it represents a singular resource; otherwise use plural.
3030+3131+### Property Names
3232+3333+- Domain concept names, not implementation (`expiresAt` not `exp_timestamp_unix`).
3434+- Booleans read as statements (`isActive`, `hasVerifiedEmail`, `requiresMfa`).
3535+- Dates/times always have a suffix (`createdAt`, `scheduledFor`, `cancelledAt`).
3636+3737+### Descriptions
3838+3939+- Schema descriptions answer “what is this?”.
4040+- Property descriptions answer “what does this mean and what are bounds?”.
4141+- Explicitly state units, null meaning, mutability, constraints, enum meaning.
4242+4343+### Operation Descriptions
4444+4545+- `summary`: short verb phrase.
4646+- `description`: side effects, preconditions, conflict behavior.
4747+4848+### General Writing
4949+5050+- Write for new devs.
5151+- Use present tense (“Returns”, “Creates”).
5252+- Avoid filler. Keep terminology consistent.
5353+1354## Runtime Commands (`./x`)
14551556Use these from repo root:
+4-4
apps/runtime/src/handlers/auth.rs
···2626#[openapi(
2727 paths(login_handler, callback_handler, me_handler),
2828 components(schemas(AuthUser, AuthResponse, crate::handlers::error::ErrorResponse)),
2929- tags((name = "auth", description = "Discord authentication"))
2929+ tags((name = "Auth", description = "Discord authentication"))
3030)]
3131pub struct AuthApi;
3232···7373#[utoipa::path(
7474 get,
7575 path = "/login",
7676- tag = "auth",
7676+ tag = "Auth",
7777 responses(
7878 (status = 302, description = "Redirect to Discord")
7979 )
···9898#[utoipa::path(
9999 get,
100100 path = "/callback",
101101- tag = "auth",
101101+ tag = "Auth",
102102 params(
103103 ("code" = String, Query, description = "Discord authorization code"),
104104 ("state" = String, Query, description = "Opaque state value returned by Discord")
···171171#[utoipa::path(
172172 get,
173173 path = "/me",
174174- tag = "auth",
174174+ tag = "Auth",
175175 responses(
176176 (status = 200, description = "Session is valid", body = AuthResponse),
177177 (status = 401, description = "No active session", body = crate::handlers::error::ErrorResponse)
+23-3
apps/runtime/src/handlers/builds.rs
···2323#[openapi(
2424 paths(create_build_handler, get_build_handler),
2525 components(schemas(CreateBuildResponse, BuildStatusResponse)),
2626- tags((name = "builds", description = "Server-side build pipeline"))
2626+ tags((name = "Builds", description = "Server-side build pipeline"))
2727)]
2828pub struct BuildApi;
2929···3434 .route("/{build_id}/logs", get(stream_build_logs_handler))
3535}
36363737+/// Response returned when a build is created.
3738#[derive(Debug, Serialize, Deserialize, ToSchema)]
3839pub struct CreateBuildResponse {
4040+ /// Build identifier.
3941 pub build_id: String,
4242+ /// Current build status string.
4043 pub status: String,
4144}
42454646+/// Build artifact output paths.
4347#[derive(Debug, Serialize, Deserialize, ToSchema)]
4448pub struct BuildArtifactResponse {
4949+ /// Bundled JavaScript output.
4550 pub bundle: String,
5151+ /// Source map for the bundle.
4652 pub source_map: String,
4753}
48545555+/// Current build status and output.
4956#[derive(Debug, Serialize, Deserialize, ToSchema)]
5057pub struct BuildStatusResponse {
5858+ /// Build identifier.
5159 pub build_id: String,
6060+ /// Guild ID the build targets.
5261 pub guild_id: String,
6262+ /// Entry file path used for the build.
5363 pub entry: String,
6464+ /// Current build status string.
5465 pub status: String,
6666+ /// Build logs, newest last.
5567 pub logs: Vec<String>,
6868+ /// Build start time in RFC3339 (UTC).
5669 #[serde(skip_serializing_if = "Option::is_none")]
5770 pub started_at: Option<String>,
7171+ /// Build completion time in RFC3339 (UTC).
5872 #[serde(skip_serializing_if = "Option::is_none")]
5973 pub finished_at: Option<String>,
7474+ /// Generated build artifacts, if available.
6075 #[serde(skip_serializing_if = "Option::is_none")]
6176 pub artifact: Option<BuildArtifactResponse>,
7777+ /// Error detail when the build fails.
6278 #[serde(skip_serializing_if = "Option::is_none")]
6379 pub error: Option<String>,
6480}
···6682#[utoipa::path(
6783 post,
6884 path = "/",
6969- tag = "builds",
8585+ tag = "Builds",
8686+ summary = "Create a build",
8787+ description = "Queues a server-side build for the provided project archive.",
7088 responses(
7189 (status = 200, description = "Build queued", body = CreateBuildResponse),
7290 (status = 400, description = "Invalid request", body = crate::handlers::error::ErrorResponse),
···146164#[utoipa::path(
147165 get,
148166 path = "/{build_id}",
149149- tag = "builds",
167167+ tag = "Builds",
168168+ summary = "Get build status",
169169+ description = "Returns the current status, logs, and artifacts for a build.",
150170 params(
151171 ("build_id" = String, Path, description = "Build ID")
152172 ),