Skip to content

g1t/apps/web/app/routes.ts

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