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