pr_01m47d15m3e54sn21z27rpy5n9/apps/web/app/routes.ts
| 1 | import { type RouteConfig, index, route } from "@react-router/dev/routes"; |
| 2 | |
| 3 | export default [ |
| 4 | index("routes/home.tsx"), |
| 5 | route("login", "routes/login.tsx"), |
| 6 | route("register", "routes/register.tsx"), |
| 7 | // An invite link: who sent it, then sign-up or joining. `invite` is reserved. |
| 8 | route("invite/:code", "routes/invite.tsx"), |
| 9 | route("logout", "routes/logout.tsx"), |
| 10 | route("verify", "routes/verify.tsx"), |
| 11 | route("forgot", "routes/forgot.tsx"), |
| 12 | route("reset", "routes/reset.tsx"), |
| 13 | route("device", "routes/device.tsx"), |
| 14 | route("oauth/authorize", "routes/oauth-authorize.tsx"), |
| 15 | route("new", "routes/new.tsx"), |
| 16 | // GitHub: signing in with it, and bringing repositories across through |
| 17 | // g1t's GitHub App. `auth` and `integrations` are reserved names. |
| 18 | route("new/github", "routes/new-github.tsx"), |
| 19 | route("auth/github", "routes/auth-github.ts"), |
| 20 | route("auth/github/callback", "routes/auth-github-callback.tsx"), |
| 21 | route("auth/github/username", "routes/auth-github-username.tsx"), |
| 22 | route("integrations/github/install", "routes/github-install.ts"), |
| 23 | route("integrations/github/setup", "routes/github-setup.tsx"), |
| 24 | route("settings", "routes/settings.tsx"), |
| 25 | // People, apart from workspaces: `u` is a reserved name. |
| 26 | route("u/:username", "routes/user.tsx"), |
| 27 | route("explore", "routes/explore.tsx", { id: "explore" }), |
| 28 | route("pricing", "routes/pricing.tsx"), |
| 29 | route("search", "routes/search.tsx"), |
| 30 | // What the command palette shows as someone types. |
| 31 | route("search.json", "routes/search-json.ts"), |
| 32 | route("workspaces/new", "routes/workspace/new.tsx"), |
| 33 | // Trust pages: reserved names, like the rest above. |
| 34 | route("policies", "routes/policies.tsx"), |
| 35 | route("policies/:policy", "routes/policy.tsx"), |
| 36 | route("security", "routes/security.tsx"), |
| 37 | route("support", "routes/support.tsx"), |
| 38 | route("status", "routes/status.tsx"), |
| 39 | // What /status shows and the footer's dot reads, as JSON. |
| 40 | route("status.json", "routes/status-json.ts"), |
| 41 | route(".well-known/security.txt", "routes/security-txt.ts"), |
| 42 | // A workspace's own pages sit under `-`, which no repository can be named. |
| 43 | route(":owner", "routes/workspace/layout.tsx", [ |
| 44 | index("routes/workspace/overview.tsx"), |
| 45 | route("-/people", "routes/workspace/people.tsx"), |
| 46 | route("-/tokens", "routes/workspace/tokens.tsx"), |
| 47 | route("-/usage", "routes/workspace/usage.tsx"), |
| 48 | route("-/billing", "routes/workspace/billing.tsx"), |
| 49 | route("-/billing/entries", "routes/workspace/statement-entries.ts"), |
| 50 | route("-/billing/statement.csv", "routes/workspace/statement-csv.ts"), |
| 51 | route("-/integrations", "routes/workspace/integrations.tsx"), |
| 52 | route("-/webhooks", "routes/workspace/webhooks.tsx"), |
| 53 | route("-/secrets", "routes/workspace/secrets.tsx"), |
| 54 | route("-/settings", "routes/workspace/settings.tsx"), |
| 55 | route("-/repositories", "routes/workspace/repositories.tsx"), |
| 56 | route("-/agents", "routes/workspace/agents.tsx"), |
| 57 | route("-/memory", "routes/workspace/memory.tsx"), |
| 58 | route("-/context", "routes/workspace/context.tsx"), |
| 59 | route("-/security", "routes/workspace/security.tsx"), |
| 60 | route("-/audit", "routes/workspace/audit.tsx"), |
| 61 | route("-/audit/export", "routes/workspace/audit-export.ts"), |
| 62 | route("-/guardrails", "routes/workspace/guardrails.tsx"), |
| 63 | // What the workspace will have across its projects. |
| 64 | route("-/soon/:feature", "routes/workspace/soon.tsx"), |
| 65 | ]), |
| 66 | // Why a line is the way it is, fetched by the blame view. |
| 67 | route(":owner/:repo/why/:hash", "routes/repo/why.ts"), |
| 68 | // A project's agent runs as JSON, and stopping or messaging one. |
| 69 | route(":owner/:repo/agents.json", "routes/repo/agents-live.ts"), |
| 70 | // What a project's agent runs did, from the audit log, for the Agent panel. |
| 71 | route(":owner/:repo/audit.json", "routes/repo/audit-live.ts"), |
| 72 | // An invitation to a repository, answered by someone who cannot see it yet. |
| 73 | route(":owner/:repo/invitations", "routes/repo/invitations.tsx"), |
| 74 | // A screenshot of a project's production, for its overview. |
| 75 | route(":owner/:repo/production.jpg", "routes/repo/production-screenshot.ts"), |
| 76 | // A project: its overview first, its repository's code under Code. The |
| 77 | // 1:1 project of a repository has the repository's name, so every |
| 78 | // repository address below keeps working. |
| 79 | route(":owner/:repo", "routes/repo/layout.tsx", [ |
| 80 | index("routes/repo/overview.tsx"), |
| 81 | route("code", "routes/repo/code.tsx"), |
| 82 | route("tree/:ref/*", "routes/repo/tree.tsx"), |
| 83 | route("blob/:ref/*", "routes/repo/blob.tsx"), |
| 84 | route("commits", "routes/repo/commits.tsx"), |
| 85 | route("commit/:hash", "routes/repo/commit.tsx"), |
| 86 | route("issues", "routes/repo/issues.tsx"), |
| 87 | route("issues/new", "routes/repo/issue-new.tsx"), |
| 88 | route("issues/:number", "routes/repo/issue.tsx"), |
| 89 | route("pulls", "routes/repo/pulls.tsx"), |
| 90 | route("pulls/new", "routes/repo/pull-new.tsx"), |
| 91 | route("pull/:number", "routes/repo/pull.tsx"), |
| 92 | route("queue", "routes/repo/queue.tsx"), |
| 93 | route("agents", "routes/repo/agents.tsx"), |
| 94 | route("agents/runs/:id", "routes/repo/agents-run.tsx"), |
| 95 | route("sessions", "routes/repo/sessions.tsx"), |
| 96 | route("sessions/:number", "routes/repo/session.tsx"), |
| 97 | route("memory", "routes/repo/memory.tsx"), |
| 98 | route("actions", "routes/repo/actions.tsx"), |
| 99 | route("actions/runs/:id", "routes/repo/actions-run.tsx"), |
| 100 | route("actions/runs/:id/artifacts/:name", "routes/repo/actions-artifact.ts"), |
| 101 | route("actions/jobs/:job/log", "routes/repo/actions-log.ts"), |
| 102 | route("deployments", "routes/repo/deployments.tsx"), |
| 103 | route("deployments/:id", "routes/repo/deployment.tsx"), |
| 104 | route("security", "routes/repo/security.tsx"), |
| 105 | route("plans", "routes/repo/plans.tsx"), |
| 106 | route("plans/:id", "routes/repo/plan.tsx"), |
| 107 | route("settings", "routes/repo/settings.tsx"), |
| 108 | route("settings/repository", "routes/repo/settings-repository.tsx"), |
| 109 | route("settings/access", "routes/repo/settings-access.tsx"), |
| 110 | route("settings/branches", "routes/repo/settings-branches.tsx"), |
| 111 | route("settings/webhooks", "routes/repo/webhooks.tsx"), |
| 112 | route("settings/secrets", "routes/repo/secrets.tsx"), |
| 113 | route("settings/deployments", "routes/repo/settings-deployments.tsx"), |
| 114 | route("settings/domains", "routes/repo/settings-domains.tsx"), |
| 115 | route("settings/dependencies", "routes/repo/settings-dependencies.tsx"), |
| 116 | route("settings/guardrails", "routes/repo/settings-guardrails.tsx"), |
| 117 | route("settings/agents", "routes/repo/settings-agents.tsx"), |
| 118 | // What the project will have: one page for each Soon in its menu. |
| 119 | route("soon/:feature", "routes/repo/soon.tsx"), |
| 120 | ]), |
| 121 | // Anything else: a 404 that still knows who is signed in. |
| 122 | route("*", "routes/not-found.tsx"), |
| 123 | ] satisfies RouteConfig; |