Skip to content
321 linesCodeBlameRaw
1import { type RouteConfig, index, route } from "@react-router/dev/routes";
2
3export default [
4 index("routes/home.tsx"),
5 route("login", "routes/login.tsx"),
6 // The second step of signing in, for an account with two-factor authentication.
7 route("login/two-factor", "routes/login-two-factor.tsx"),
8 route("register", "routes/register.tsx"),
9 // An invite link: who sent it, then sign-up or joining. `invite` is reserved.
10 route("invite/:code", "routes/invite.tsx"),
11 route("logout", "routes/logout.tsx"),
12 route("verify", "routes/verify.tsx"),
13 // Where an account confirms its email address, with the code from the
14 // email; every other page sends it here until it has (lib/confirm-gate.ts).
15 route("confirm-email", "routes/confirm-email.tsx"),
16 route("forgot", "routes/forgot.tsx"),
17 route("reset", "routes/reset.tsx"),
18 route("device", "routes/device.tsx"),
19 route("oauth/authorize", "routes/oauth-authorize.tsx"),
20 route("new", "routes/new.tsx"),
21 // GitHub: signing in with it, and bringing repositories across through
22 // g1t's GitHub App. `auth` and `integrations` are reserved names.
23 route("new/github", "routes/new-github.tsx"),
24 route("auth/github", "routes/auth-github.ts"),
25 route("auth/github/callback", "routes/auth-github-callback.tsx"),
26 route("auth/github/username", "routes/auth-github-username.tsx"),
27 route("integrations/github/install", "routes/github-install.ts"),
28 route("integrations/github/setup", "routes/github-setup.tsx"),
29 // Your own settings: one page each, so links can name the one they mean.
30 // `/settings` goes to the first; an old link's `#anchor` to its page.
31 route("settings", "routes/settings/layout.tsx", [
32 index("routes/settings/index.tsx"),
33 route("profile", "routes/settings/profile.tsx"),
34 route("emails", "routes/settings/emails.tsx"),
35 route("notifications", "routes/settings/notifications.tsx"),
36 route("invites", "routes/settings/invites.tsx"),
37 route("keys", "routes/settings/keys.tsx"),
38 // Your access tokens: the list, a new one, and each one's page.
39 route("tokens", "routes/settings/tokens.tsx"),
40 route("tokens/new", "routes/settings/token-new.tsx"),
41 route("tokens/:id", "routes/settings/token.tsx"),
42 route("github", "routes/settings/github.tsx"),
43 route("applications", "routes/settings/applications.tsx"),
44 route("integrations", "routes/settings/integrations.tsx"),
45 route("two-factor", "routes/settings/two-factor.tsx"),
46 route("security-log", "routes/settings/security-log.tsx"),
47 route("account", "routes/settings/account.tsx"),
48 ]),
49 // The account menu's header: name, primary email and invites left.
50 route("settings/menu.json", "routes/settings-menu-json.ts"),
51 // People, apart from workspaces: `u` is a reserved name.
52 route("u/:username", "routes/user.tsx"),
53 // The card that opens over a person's name or avatar (lib/hovercard.ts).
54 // `-` is no workspace's name, so nothing else is ever found here.
55 route("-/hovercard/user/:username", "routes/hovercard-user.ts"),
56 // Live notifications: each tab's feed socket, and the person's
57 // notification settings as JSON (services/notify).
58 route("-/live", "routes/notify/live.ts"),
59 // A page opened with an access token asks here for each socket's
60 // short-lived ticket (lib/socket-ticket.ts).
61 route("-/live/ticket", "routes/notify/ticket.ts"),
62 route("-/notify", "routes/notify/api.ts"),
63 route("explore", "routes/explore.tsx", { id: "explore" }),
64 route("pricing", "routes/pricing.tsx"),
65 route("search", "routes/search.tsx"),
66 // Each person's inbox, and what its panel in the top bar fetches.
67 route("inbox", "routes/inbox.tsx"),
68 route("inbox.json", "routes/inbox-json.ts"),
69 // What the command palette shows as someone types.
70 route("search.json", "routes/search-json.ts"),
71 route("workspaces/new", "routes/workspace/new.tsx"),
72 // Workspace invitations waiting for the person's answer. `invitations` is reserved.
73 route("invitations", "routes/invitations.tsx"),
74 // People to invite, as the People page's invite form searches them.
75 route("-/people.json", "routes/people-json.ts"),
76 // Trust pages: reserved names, like the rest above.
77 route("policies", "routes/policies.tsx"),
78 route("policies/:policy", "routes/policy.tsx"),
79 route("security", "routes/security.tsx"),
80 route("support", "routes/support.tsx"),
81 // Status moved to status.g1t.sh (apps/status); old links go there.
82 route("status", "routes/status.tsx"),
83 route("status.json", "routes/status-json.ts"),
84 route(".well-known/security.txt", "routes/security-txt.ts"),
85 // For search engines: what may be crawled, and a map of the public pages.
86 route("robots.txt", "routes/robots-txt.ts"),
87 route("sitemap.xml", "routes/sitemap-xml.ts"),
88 // Releases of the self-hosted runner and the g1t CLI, from R2.
89 route("downloads/:tool/*", "routes/downloads-runner.ts"),
90 // A workspace's own pages sit under `-`, which no repository can be named.
91 route(":owner", "routes/workspace/layout.tsx", [
92 index("routes/workspace/overview.tsx"),
93 // Its pages, each in the sidebar: Overview (above), Projects, People, Insights; Teams and Packages below.
94 route("-/projects", "routes/workspace/projects.tsx"),
95 route("-/people", "routes/workspace/people.tsx"),
96 route("-/insights", "routes/workspace/tab-soon.tsx", { id: "routes/workspace/insights" }),
97 // Pinning its projects, for the person signed in.
98 route("-/pins", "routes/workspace/pins.ts"),
99 // Pages that moved: Members is People, and the overview is the workspace.
100 route("-/members", "routes/workspace/moved.ts", { id: "routes/workspace/moved-members" }),
101 // Code's Overview: Mission control's code panels, for this workspace.
102 route("-/overview", "routes/workspace/code-overview.tsx"),
103 // The workspace itself, at a glance: members, plan and spend.
104 route("-/workspace", "routes/workspace/workspace-overview.tsx"),
105 // Teams: the list, a new one, and each team's pages.
106 route("-/teams", "routes/workspace/teams.tsx"),
107 route("-/teams/new", "routes/workspace/team-new.tsx"),
108 route("-/teams/:team", "routes/workspace/team/layout.tsx", [
109 index("routes/workspace/team/members.tsx"),
110 route("teams", "routes/workspace/team/teams.tsx"),
111 route("repositories", "routes/workspace/team/repositories.tsx"),
112 route("settings", "routes/workspace/team/settings.tsx"),
113 ]),
114 // The workspace's own access tokens: the list, a new one, and each one's page.
115 route("-/tokens", "routes/workspace/tokens.tsx"),
116 route("-/tokens/new", "routes/workspace/token-new.tsx"),
117 route("-/tokens/:id", "routes/workspace/token.tsx"),
118 // Its rules for members' personal access tokens, and approving them.
119 route("-/personal-access-tokens", "routes/workspace/personal-access-tokens.tsx"),
120 route("-/usage", "routes/workspace/usage.tsx"),
121 route("-/gateway", "routes/workspace/gateway.tsx"),
122 route("-/billing", "routes/workspace/billing.tsx"),
123 route("-/billing/entries", "routes/workspace/statement-entries.ts"),
124 route("-/billing/statement.csv", "routes/workspace/statement-csv.ts"),
125 // The integrations directory, and the setup page for each kind of
126 // provider connection: models, alerts, trackers (lib/integration-sections).
127 route("-/integrations", "routes/workspace/integrations-directory.tsx"),
128 route("-/integrations/:section", "routes/workspace/integrations.tsx"),
129 route("-/webhooks", "routes/workspace/webhooks.tsx"),
130 // The workspace's own emoji, for chat (components/emoji).
131 route("-/emoji", "routes/workspace/emoji.tsx"),
132 route("-/secrets", "routes/workspace/secrets.tsx"),
133 route("-/runners", "routes/workspace/runners.tsx"),
134 route("-/actions", "routes/workspace/actions-settings.tsx"),
135 route("-/packages", "routes/workspace/packages.tsx"),
136 route("-/packages/:ecosystem/*", "routes/workspace/package.tsx"),
137 route("-/settings", "routes/workspace/settings.tsx"),
138 // What members may do in chat: channels, emoji, default channels.
139 route("-/settings/chat", "routes/workspace/chat-settings.tsx"),
140 route("-/repositories", "routes/workspace/repositories.tsx"),
141 // Agents mode: the overview (budget, sessions, roster, spend) first, then
142 // each of the workspace's own agents and its sessions (docs/WORKSPACE.md).
143 // `new` is no agent's handle.
144 route("-/agents", "routes/workspace/agents/layout.tsx", [
145 index("routes/workspace/agents.tsx"),
146 route("new", "routes/workspace/agents/new.tsx"),
147 route(":handle", "routes/workspace/agents/agent.tsx", [
148 index("routes/workspace/agents/sessions.tsx"),
149 route("sessions/:id", "routes/workspace/agents/session.tsx"),
150 route("memory", "routes/workspace/agents/memory.tsx"),
151 route("routines", "routes/workspace/agents/routines.tsx"),
152 route("spend", "routes/workspace/agents/spend.tsx"),
153 route("activity", "routes/workspace/agents/activity.tsx"),
154 route("profile", "routes/workspace/agents/profile.tsx"),
155 ]),
156 ]),
157 // Chat mode: channels by name, direct messages by id, and what the page
158 // calls as it runs: the live socket and the JSON for sending and reading.
159 route("-/chat/live", "routes/workspace/chat/live.ts"),
160 route("-/chat/api", "routes/workspace/chat/api.ts"),
161 // A person's card in Chat: their profile and teams here.
162 route("-/chat/person/:username", "routes/workspace/chat/person.ts"),
163 route("-/chat", "routes/workspace/chat/layout.tsx", [
164 index("routes/workspace/chat/index.tsx"),
165 route("browse", "routes/workspace/chat/browse.tsx"),
166 route("dm/:id", "routes/workspace/chat/channel.tsx", { id: "routes/workspace/chat/dm" }),
167 route(":channel", "routes/workspace/chat/channel.tsx"),
168 ]),
169 // Artifacts mode (docs/ARTIFACTS_MODE.md; code says "folio"): what its
170 // pages call as they run (an artifact's live socket, JSON, comments,
171 // uploads, export), then Home, making one, templates, the trash, the
172 // spaces, and each artifact by its address. Addresses are flat and end
173 // in the id, so renaming or moving one keeps links working.
174 route("-/artifacts/live", "routes/workspace/folios/live.ts"),
175 route("-/artifacts/api", "routes/workspace/folios/api.ts"),
176 route("-/artifacts/threads/:folio/*", "routes/workspace/folios/threads.ts"),
177 route("-/artifacts/upload", "routes/workspace/folios/upload.ts"),
178 route("-/artifacts/export", "routes/workspace/folios/export.ts"),
179 route("-/artifacts", "routes/workspace/folios/layout.tsx", [
180 index("routes/workspace/folios/home.tsx"),
181 route("new/:kind", "routes/workspace/folios/new.tsx"),
182 route("templates", "routes/workspace/folios/templates.tsx"),
183 route("trash", "routes/workspace/folios/trash.tsx"),
184 // Artifacts possibly out of date, and a project's docs folder, read-only.
185 route("stale", "routes/workspace/folios/stale.tsx"),
186 route("spaces", "routes/workspace/folios/spaces.tsx"),
187 route("spaces/new", "routes/workspace/folios/space-new.tsx"),
188 route("spaces/:space", "routes/workspace/folios/space.tsx"),
189 route("spaces/:space/settings", "routes/workspace/folios/space-settings.tsx"),
190 route("repo/:repoOwner/:repoName/*", "routes/workspace/folios/repo-file.tsx"),
191 route(":folio", "routes/workspace/folios/folio.tsx"),
192 route(":folio/history", "routes/workspace/folios/history.tsx"),
193 ]),
194 // Home for a member without Code, and what Code's pages say to them
195 // (docs/WORKSPACE.md, "Members without Code").
196 route("-/home", "routes/workspace/home.tsx"),
197 route("-/code-access", "routes/workspace/code-access.tsx"),
198 route("-/memory", "routes/workspace/memory.tsx"),
199 route("-/context", "routes/workspace/context.tsx"),
200 route("-/security", "routes/workspace/security.tsx"),
201 route("-/security/patterns", "routes/workspace/security-patterns.tsx"),
202 route("-/security/bypass-requests", "routes/workspace/security-bypass.tsx"),
203 route("-/security/settings", "routes/workspace/security-settings.tsx"),
204 route("-/audit", "routes/workspace/audit.tsx"),
205 route("-/audit/export", "routes/workspace/audit-export.ts"),
206 route("-/guardrails", "routes/workspace/guardrails.tsx"),
207 route("-/rules", "routes/workspace/rules.tsx"),
208 route("-/rules/:id", "routes/workspace/ruleset.tsx"),
209 // What the workspace will have across its projects.
210 route("-/soon/:feature", "routes/workspace/soon.tsx"),
211 ]),
212 // Why a line is the way it is, fetched by the blame view.
213 route(":owner/:repo/why/:hash", "routes/repo/why.ts"),
214 // A project's agent runs as JSON, and stopping or messaging one.
215 route(":owner/:repo/agents.json", "routes/repo/agents-live.ts"),
216 // Its branch names, for changing the branch a pull request merges into.
217 route(":owner/:repo/branches.json", "routes/repo/branch-names.ts"),
218 // What a project's agent runs did, from the audit log, for the Agent panel.
219 route(":owner/:repo/audit.json", "routes/repo/audit-live.ts"),
220 // An invitation to a repository, answered by someone who cannot see it yet.
221 route(":owner/:repo/invitations", "routes/repo/invitations.tsx"),
222 // The Files page's About as JSON, asked again while it is first worked out.
223 route(":owner/:repo/about.json", "routes/repo/about-json.ts"),
224 // Starring it, from the header's Star button.
225 route(":owner/:repo/star", "routes/repo/star.ts"),
226 // Subscribing to its issues and pull requests, and watching it.
227 route(":owner/:repo/notifications", "routes/repo/notifications.ts"),
228 // A starter CI workflow, opened as a pull request (components/add-ci.tsx).
229 route(":owner/:repo/add-ci", "routes/repo/add-ci.ts"),
230 // A screenshot of a project's production, for its overview.
231 route(":owner/:repo/production.jpg", "routes/repo/production-screenshot.ts"),
232 // A file as it is, sent on to the usercontent origin (lib/usercontent.ts).
233 route(":owner/:repo/raw/:ref/*", "routes/repo/raw.ts"),
234 // A project: its overview first, its repository's code under Code. The
235 // 1:1 project of a repository has the repository's name, so every
236 // repository address below keeps working.
237 route(":owner/:repo", "routes/repo/layout.tsx", [
238 index("routes/repo/overview.tsx"),
239 route("code", "routes/repo/code.tsx"),
240 route("tree/:ref/*", "routes/repo/tree.tsx"),
241 route("blob/:ref/*", "routes/repo/blob.tsx"),
242 route("archive/*", "routes/repo/archive.ts"),
243 route("commits", "routes/repo/commits.tsx"),
244 route("branches", "routes/repo/branches.tsx"),
245 route("tags", "routes/repo/tags.tsx"),
246 route("releases", "routes/repo/releases.tsx"),
247 route("releases/new", "routes/repo/release-new.tsx"),
248 route("releases/tag/*", "routes/repo/release.tsx"),
249 route("contributors", "routes/repo/contributors.tsx"),
250 route("activity", "routes/repo/activity.tsx"),
251 route("stargazers", "routes/repo/stargazers.tsx"),
252 route("compare/*", "routes/repo/compare.tsx", { id: "routes/repo/compare-range" }),
253 route("compare", "routes/repo/compare.tsx"),
254 route("commit/:hash", "routes/repo/commit.tsx"),
255 // A check run reported on a commit: its report, annotations and buttons.
256 route("checks/:id", "routes/repo/check-run.tsx"),
257 route("labels", "routes/repo/labels.tsx"),
258 route("milestones", "routes/repo/milestones.tsx"),
259 route("milestones/:number", "routes/repo/milestone.tsx"),
260 route("issues", "routes/repo/issues.tsx"),
261 route("issues/new", "routes/repo/issue-new.tsx"),
262 route("issues/:number", "routes/repo/issue.tsx"),
263 route("pulls", "routes/repo/pulls.tsx"),
264 route("pulls/new", "routes/repo/pull-new.tsx"),
265 route("pull/:number", "routes/repo/pull.tsx"),
266 route("queue", "routes/repo/queue.tsx"),
267 route("agents", "routes/repo/agents.tsx"),
268 route("usage", "routes/repo/usage.tsx"),
269 route("agents/runs/:id", "routes/repo/agents-run.tsx"),
270 route("sessions", "routes/repo/sessions.tsx"),
271 route("sessions/:number", "routes/repo/session.tsx"),
272 route("memory", "routes/repo/memory.tsx"),
273 route("actions", "routes/repo/actions.tsx"),
274 route("actions/runs/:id", "routes/repo/actions-run.tsx"),
275 route("actions/runs/:id/artifacts/:name", "routes/repo/actions-artifact.ts"),
276 route("actions/jobs/:job/log", "routes/repo/actions-log.ts"),
277 route("actions/jobs/:job/log.txt", "routes/repo/actions-job-log-download.ts"),
278 route("actions/runs/:id/logs.zip", "routes/repo/actions-logs-download.ts"),
279 route("actions/workflows/:file/badge.svg", "routes/repo/actions-badge.ts"),
280 route("deployments", "routes/repo/deployments.tsx"),
281 route("deployments/:id", "routes/repo/deployment.tsx"),
282 // Security: an overview, then a page for each part. Old links to
283 // `security?tab=…` are sent on by the overview.
284 route("security", "routes/repo/security-overview.tsx"),
285 route("security/secret-scanning", "routes/repo/security-secrets.tsx"),
286 route("security/secret-scanning/patterns", "routes/repo/security-patterns.tsx"),
287 route("security/secret-scanning/:id", "routes/repo/security-secret.tsx"),
288 route("security/code-scanning", "routes/repo/security-code.tsx"),
289 route("security/code-scanning/setup", "routes/repo/security-code-setup.ts"),
290 route("security/code-scanning/:number", "routes/repo/security-code-alert.tsx"),
291 route("security/vulnerabilities", "routes/repo/security.tsx"),
292 route("security/dependency-graph", "routes/repo/security-graph.tsx"),
293 route("security/dependency-graph/sbom.json", "routes/repo/security-sbom.ts"),
294 route("security/dependency-updates", "routes/repo/security-updates.tsx"),
295 route("security/pulls/:number", "routes/repo/security-pull.tsx"),
296 route("security/settings", "routes/repo/security-settings.tsx"),
297 route("plans", "routes/repo/plans.tsx"),
298 route("plans/:id", "routes/repo/plan.tsx"),
299 route("settings", "routes/repo/settings.tsx"),
300 route("settings/repository", "routes/repo/settings-repository.tsx"),
301 route("settings/mirroring", "routes/repo/settings-mirroring.tsx"),
302 route("settings/access", "routes/repo/settings-access.tsx"),
303 route("settings/keys", "routes/repo/settings-deploy-keys.tsx"),
304 route("settings/branches", "routes/repo/settings-branches.tsx"),
305 route("settings/rules", "routes/repo/settings-rules.tsx"),
306 route("settings/rules/:id", "routes/repo/settings-ruleset.tsx"),
307 route("settings/webhooks", "routes/repo/webhooks.tsx"),
308 route("settings/secrets", "routes/repo/secrets.tsx"),
309 route("settings/actions", "routes/repo/settings-actions.tsx"),
310 route("settings/environments", "routes/repo/settings-environments.tsx"),
311 route("settings/runners", "routes/repo/settings-runners.tsx"),
312 route("settings/deployments", "routes/repo/settings-deployments.tsx"),
313 route("settings/domains", "routes/repo/settings-domains.tsx"),
314 route("settings/guardrails", "routes/repo/settings-guardrails.tsx"),
315 route("settings/agents", "routes/repo/settings-agents.tsx"),
316 // What the project will have: one page for each Soon in its menu.
317 route("soon/:feature", "routes/repo/soon.tsx"),
318 ]),
319 // Anything else: a 404 that still knows who is signed in.
320 route("*", "routes/not-found.tsx"),
321] satisfies RouteConfig;