Skip to content
232 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 route("tokens", "routes/settings/tokens.tsx"),
39 route("github", "routes/settings/github.tsx"),
40 route("applications", "routes/settings/applications.tsx"),
41 route("two-factor", "routes/settings/two-factor.tsx"),
42 route("security-log", "routes/settings/security-log.tsx"),
43 route("account", "routes/settings/account.tsx"),
44 ]),
45 // The account menu's header: name, primary email and invites left.
46 route("settings/menu.json", "routes/settings-menu-json.ts"),
47 // People, apart from workspaces: `u` is a reserved name.
48 route("u/:username", "routes/user.tsx"),
49 // The card that opens over a person's name or avatar (lib/hovercard.ts).
50 // `-` is no workspace's name, so nothing else is ever found here.
51 route("-/hovercard/user/:username", "routes/hovercard-user.ts"),
52 route("explore", "routes/explore.tsx", { id: "explore" }),
53 route("pricing", "routes/pricing.tsx"),
54 route("search", "routes/search.tsx"),
55 // Each person's inbox, and what its panel in the top bar fetches.
56 route("inbox", "routes/inbox.tsx"),
57 route("inbox.json", "routes/inbox-json.ts"),
58 // What the command palette shows as someone types.
59 route("search.json", "routes/search-json.ts"),
60 route("workspaces/new", "routes/workspace/new.tsx"),
61 // Trust pages: reserved names, like the rest above.
62 route("policies", "routes/policies.tsx"),
63 route("policies/:policy", "routes/policy.tsx"),
64 route("security", "routes/security.tsx"),
65 route("support", "routes/support.tsx"),
66 // Status moved to status.g1t.sh (apps/status); old links go there.
67 route("status", "routes/status.tsx"),
68 route("status.json", "routes/status-json.ts"),
69 route(".well-known/security.txt", "routes/security-txt.ts"),
70 // Releases of the self-hosted runner and the g1t CLI, from R2.
71 route("downloads/:tool/*", "routes/downloads-runner.ts"),
72 // A workspace's own pages sit under `-`, which no repository can be named.
73 route(":owner", "routes/workspace/layout.tsx", [
74 index("routes/workspace/overview.tsx"),
75 // Its pages, each in the sidebar: Overview (above), Projects, People, Insights; Teams and Packages below.
76 route("-/projects", "routes/workspace/projects.tsx"),
77 route("-/people", "routes/workspace/people.tsx"),
78 route("-/insights", "routes/workspace/tab-soon.tsx", { id: "routes/workspace/insights" }),
79 // Pinning its projects, for the person signed in.
80 route("-/pins", "routes/workspace/pins.ts"),
81 // Pages that moved: Members is People, and the overview is the workspace.
82 route("-/members", "routes/workspace/moved.ts", { id: "routes/workspace/moved-members" }),
83 route("-/overview", "routes/workspace/moved.ts", { id: "routes/workspace/moved-overview" }),
84 // Teams: the list, a new one, and each team's pages.
85 route("-/teams", "routes/workspace/teams.tsx"),
86 route("-/teams/new", "routes/workspace/team-new.tsx"),
87 route("-/teams/:team", "routes/workspace/team/layout.tsx", [
88 index("routes/workspace/team/members.tsx"),
89 route("teams", "routes/workspace/team/teams.tsx"),
90 route("repositories", "routes/workspace/team/repositories.tsx"),
91 route("settings", "routes/workspace/team/settings.tsx"),
92 ]),
93 route("-/tokens", "routes/workspace/tokens.tsx"),
94 // Its rules for members' personal access tokens, and approving them.
95 route("-/personal-access-tokens", "routes/workspace/personal-access-tokens.tsx"),
96 route("-/usage", "routes/workspace/usage.tsx"),
97 route("-/gateway", "routes/workspace/gateway.tsx"),
98 route("-/billing", "routes/workspace/billing.tsx"),
99 route("-/billing/entries", "routes/workspace/statement-entries.ts"),
100 route("-/billing/statement.csv", "routes/workspace/statement-csv.ts"),
101 route("-/integrations", "routes/workspace/integrations.tsx"),
102 route("-/webhooks", "routes/workspace/webhooks.tsx"),
103 route("-/secrets", "routes/workspace/secrets.tsx"),
104 route("-/runners", "routes/workspace/runners.tsx"),
105 route("-/actions", "routes/workspace/actions-settings.tsx"),
106 route("-/packages", "routes/workspace/packages.tsx"),
107 route("-/packages/:ecosystem/*", "routes/workspace/package.tsx"),
108 route("-/settings", "routes/workspace/settings.tsx"),
109 route("-/repositories", "routes/workspace/repositories.tsx"),
110 route("-/agents", "routes/workspace/agents.tsx"),
111 route("-/memory", "routes/workspace/memory.tsx"),
112 route("-/context", "routes/workspace/context.tsx"),
113 route("-/security", "routes/workspace/security.tsx"),
114 route("-/security/patterns", "routes/workspace/security-patterns.tsx"),
115 route("-/security/bypass-requests", "routes/workspace/security-bypass.tsx"),
116 route("-/security/settings", "routes/workspace/security-settings.tsx"),
117 route("-/audit", "routes/workspace/audit.tsx"),
118 route("-/audit/export", "routes/workspace/audit-export.ts"),
119 route("-/guardrails", "routes/workspace/guardrails.tsx"),
120 route("-/rules", "routes/workspace/rules.tsx"),
121 route("-/rules/:id", "routes/workspace/ruleset.tsx"),
122 // What the workspace will have across its projects.
123 route("-/soon/:feature", "routes/workspace/soon.tsx"),
124 ]),
125 // Why a line is the way it is, fetched by the blame view.
126 route(":owner/:repo/why/:hash", "routes/repo/why.ts"),
127 // A project's agent runs as JSON, and stopping or messaging one.
128 route(":owner/:repo/agents.json", "routes/repo/agents-live.ts"),
129 // Its branch names, for changing the branch a pull request merges into.
130 route(":owner/:repo/branches.json", "routes/repo/branch-names.ts"),
131 // What a project's agent runs did, from the audit log, for the Agent panel.
132 route(":owner/:repo/audit.json", "routes/repo/audit-live.ts"),
133 // An invitation to a repository, answered by someone who cannot see it yet.
134 route(":owner/:repo/invitations", "routes/repo/invitations.tsx"),
135 // The Files page's About as JSON, asked again while it is first worked out.
136 route(":owner/:repo/about.json", "routes/repo/about-json.ts"),
137 // Starring it, from the header's Star button.
138 route(":owner/:repo/star", "routes/repo/star.ts"),
139 // Subscribing to its issues and pull requests, and watching it.
140 route(":owner/:repo/notifications", "routes/repo/notifications.ts"),
141 // A starter CI workflow, opened as a pull request (components/add-ci.tsx).
142 route(":owner/:repo/add-ci", "routes/repo/add-ci.ts"),
143 // A screenshot of a project's production, for its overview.
144 route(":owner/:repo/production.jpg", "routes/repo/production-screenshot.ts"),
145 // A project: its overview first, its repository's code under Code. The
146 // 1:1 project of a repository has the repository's name, so every
147 // repository address below keeps working.
148 route(":owner/:repo", "routes/repo/layout.tsx", [
149 index("routes/repo/overview.tsx"),
150 route("code", "routes/repo/code.tsx"),
151 route("tree/:ref/*", "routes/repo/tree.tsx"),
152 route("blob/:ref/*", "routes/repo/blob.tsx"),
153 route("archive/*", "routes/repo/archive.ts"),
154 route("commits", "routes/repo/commits.tsx"),
155 route("branches", "routes/repo/branches.tsx"),
156 route("tags", "routes/repo/tags.tsx"),
157 route("releases", "routes/repo/releases.tsx"),
158 route("releases/new", "routes/repo/release-new.tsx"),
159 route("releases/tag/*", "routes/repo/release.tsx"),
160 route("contributors", "routes/repo/contributors.tsx"),
161 route("activity", "routes/repo/activity.tsx"),
162 route("stargazers", "routes/repo/stargazers.tsx"),
163 route("compare/*", "routes/repo/compare.tsx", { id: "routes/repo/compare-range" }),
164 route("compare", "routes/repo/compare.tsx"),
165 route("commit/:hash", "routes/repo/commit.tsx"),
166 // A check run reported on a commit: its report, annotations and buttons.
167 route("checks/:id", "routes/repo/check-run.tsx"),
168 route("labels", "routes/repo/labels.tsx"),
169 route("milestones", "routes/repo/milestones.tsx"),
170 route("milestones/:number", "routes/repo/milestone.tsx"),
171 route("issues", "routes/repo/issues.tsx"),
172 route("issues/new", "routes/repo/issue-new.tsx"),
173 route("issues/:number", "routes/repo/issue.tsx"),
174 route("pulls", "routes/repo/pulls.tsx"),
175 route("pulls/new", "routes/repo/pull-new.tsx"),
176 route("pull/:number", "routes/repo/pull.tsx"),
177 route("queue", "routes/repo/queue.tsx"),
178 route("agents", "routes/repo/agents.tsx"),
179 route("usage", "routes/repo/usage.tsx"),
180 route("agents/runs/:id", "routes/repo/agents-run.tsx"),
181 route("sessions", "routes/repo/sessions.tsx"),
182 route("sessions/:number", "routes/repo/session.tsx"),
183 route("memory", "routes/repo/memory.tsx"),
184 route("actions", "routes/repo/actions.tsx"),
185 route("actions/runs/:id", "routes/repo/actions-run.tsx"),
186 route("actions/runs/:id/artifacts/:name", "routes/repo/actions-artifact.ts"),
187 route("actions/jobs/:job/log", "routes/repo/actions-log.ts"),
188 route("actions/jobs/:job/log.txt", "routes/repo/actions-job-log-download.ts"),
189 route("actions/runs/:id/logs.zip", "routes/repo/actions-logs-download.ts"),
190 route("actions/workflows/:file/badge.svg", "routes/repo/actions-badge.ts"),
191 route("deployments", "routes/repo/deployments.tsx"),
192 route("deployments/:id", "routes/repo/deployment.tsx"),
193 // Security: an overview, then a page for each part. Old links to
194 // `security?tab=…` are sent on by the overview.
195 route("security", "routes/repo/security-overview.tsx"),
196 route("security/secret-scanning", "routes/repo/security-secrets.tsx"),
197 route("security/secret-scanning/patterns", "routes/repo/security-patterns.tsx"),
198 route("security/secret-scanning/:id", "routes/repo/security-secret.tsx"),
199 route("security/code-scanning", "routes/repo/security-code.tsx"),
200 route("security/code-scanning/setup", "routes/repo/security-code-setup.ts"),
201 route("security/code-scanning/:number", "routes/repo/security-code-alert.tsx"),
202 route("security/vulnerabilities", "routes/repo/security.tsx"),
203 route("security/dependency-graph", "routes/repo/security-graph.tsx"),
204 route("security/dependency-graph/sbom.json", "routes/repo/security-sbom.ts"),
205 route("security/dependency-updates", "routes/repo/security-updates.tsx"),
206 route("security/pulls/:number", "routes/repo/security-pull.tsx"),
207 route("security/settings", "routes/repo/security-settings.tsx"),
208 route("plans", "routes/repo/plans.tsx"),
209 route("plans/:id", "routes/repo/plan.tsx"),
210 route("settings", "routes/repo/settings.tsx"),
211 route("settings/repository", "routes/repo/settings-repository.tsx"),
212 route("settings/access", "routes/repo/settings-access.tsx"),
213 route("settings/keys", "routes/repo/settings-deploy-keys.tsx"),
214 route("settings/branches", "routes/repo/settings-branches.tsx"),
215 route("settings/rules", "routes/repo/settings-rules.tsx"),
216 route("settings/rules/:id", "routes/repo/settings-ruleset.tsx"),
217 route("settings/webhooks", "routes/repo/webhooks.tsx"),
218 route("settings/secrets", "routes/repo/secrets.tsx"),
219 route("settings/actions", "routes/repo/settings-actions.tsx"),
220 route("settings/environments", "routes/repo/settings-environments.tsx"),
221 route("settings/runners", "routes/repo/settings-runners.tsx"),
222 route("settings/deployments", "routes/repo/settings-deployments.tsx"),
223 route("settings/domains", "routes/repo/settings-domains.tsx"),
224 route("settings/dependencies", "routes/repo/settings-dependencies.tsx"),
225 route("settings/guardrails", "routes/repo/settings-guardrails.tsx"),
226 route("settings/agents", "routes/repo/settings-agents.tsx"),
227 // What the project will have: one page for each Soon in its menu.
228 route("soon/:feature", "routes/repo/soon.tsx"),
229 ]),
230 // Anything else: a 404 that still knows who is signed in.
231 route("*", "routes/not-found.tsx"),
232] satisfies RouteConfig;