g1t/apps/web/app/routes.ts

148 lines8,150 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("invites", "routes/settings/invites.tsx"),
31 route("keys", "routes/settings/keys.tsx"),
32 route("tokens", "routes/settings/tokens.tsx"),
33 route("github", "routes/settings/github.tsx"),
34 route("applications", "routes/settings/applications.tsx"),
35 route("security-log", "routes/settings/security-log.tsx"),
36 ]),
37 // The account menu's header: name, primary email and invites left.
38 route("settings/menu.json", "routes/settings-menu-json.ts"),
39 // People, apart from workspaces: `u` is a reserved name.
40 route("u/:username", "routes/user.tsx"),
41 route("explore", "routes/explore.tsx", { id: "explore" }),
42 route("pricing", "routes/pricing.tsx"),
43 route("search", "routes/search.tsx"),
44 // What the command palette shows as someone types.
45 route("search.json", "routes/search-json.ts"),
46 route("workspaces/new", "routes/workspace/new.tsx"),
47 // Trust pages: reserved names, like the rest above.
48 route("policies", "routes/policies.tsx"),
49 route("policies/:policy", "routes/policy.tsx"),
50 route("security", "routes/security.tsx"),
51 route("support", "routes/support.tsx"),
52 // Status moved to status.g1t.sh (apps/status); old links go there.
53 route("status", "routes/status.tsx"),
54 route("status.json", "routes/status-json.ts"),
55 route(".well-known/security.txt", "routes/security-txt.ts"),
56 // Releases of the self-hosted runner and the g1t CLI, from R2.
57 route("downloads/:tool/*", "routes/downloads-runner.ts"),
58 // A workspace's own pages sit under `-`, which no repository can be named.
59 route(":owner", "routes/workspace/layout.tsx", [
60 index("routes/workspace/overview.tsx"),
61 route("-/people", "routes/workspace/people.tsx"),
62 route("-/tokens", "routes/workspace/tokens.tsx"),
63 route("-/usage", "routes/workspace/usage.tsx"),
64 route("-/billing", "routes/workspace/billing.tsx"),
65 route("-/billing/entries", "routes/workspace/statement-entries.ts"),
66 route("-/billing/statement.csv", "routes/workspace/statement-csv.ts"),
67 route("-/integrations", "routes/workspace/integrations.tsx"),
68 route("-/webhooks", "routes/workspace/webhooks.tsx"),
69 route("-/secrets", "routes/workspace/secrets.tsx"),
70 route("-/runners", "routes/workspace/runners.tsx"),
71 route("-/packages", "routes/workspace/packages.tsx"),
72 route("-/packages/:ecosystem/*", "routes/workspace/package.tsx"),
73 route("-/settings", "routes/workspace/settings.tsx"),
74 route("-/repositories", "routes/workspace/repositories.tsx"),
75 route("-/agents", "routes/workspace/agents.tsx"),
76 route("-/memory", "routes/workspace/memory.tsx"),
77 route("-/context", "routes/workspace/context.tsx"),
78 route("-/security", "routes/workspace/security.tsx"),
79 route("-/audit", "routes/workspace/audit.tsx"),
80 route("-/audit/export", "routes/workspace/audit-export.ts"),
81 route("-/guardrails", "routes/workspace/guardrails.tsx"),
82 // What the workspace will have across its projects.
83 route("-/soon/:feature", "routes/workspace/soon.tsx"),
84 ]),
85 // Why a line is the way it is, fetched by the blame view.
86 route(":owner/:repo/why/:hash", "routes/repo/why.ts"),
87 // A project's agent runs as JSON, and stopping or messaging one.
88 route(":owner/:repo/agents.json", "routes/repo/agents-live.ts"),
89 // What a project's agent runs did, from the audit log, for the Agent panel.
90 route(":owner/:repo/audit.json", "routes/repo/audit-live.ts"),
91 // An invitation to a repository, answered by someone who cannot see it yet.
92 route(":owner/:repo/invitations", "routes/repo/invitations.tsx"),
93 // A starter CI workflow, opened as a pull request (components/add-ci.tsx).
94 route(":owner/:repo/add-ci", "routes/repo/add-ci.ts"),
95 // A screenshot of a project's production, for its overview.
96 route(":owner/:repo/production.jpg", "routes/repo/production-screenshot.ts"),
97 // A project: its overview first, its repository's code under Code. The
98 // 1:1 project of a repository has the repository's name, so every
99 // repository address below keeps working.
100 route(":owner/:repo", "routes/repo/layout.tsx", [
101 index("routes/repo/overview.tsx"),
102 route("code", "routes/repo/code.tsx"),
103 route("tree/:ref/*", "routes/repo/tree.tsx"),
104 route("blob/:ref/*", "routes/repo/blob.tsx"),
105 route("archive/*", "routes/repo/archive.ts"),
106 route("commits", "routes/repo/commits.tsx"),
107 route("branches", "routes/repo/branches.tsx"),
108 route("tags", "routes/repo/tags.tsx"),
109 route("commit/:hash", "routes/repo/commit.tsx"),
110 route("issues", "routes/repo/issues.tsx"),
111 route("issues/new", "routes/repo/issue-new.tsx"),
112 route("issues/:number", "routes/repo/issue.tsx"),
113 route("pulls", "routes/repo/pulls.tsx"),
114 route("pulls/new", "routes/repo/pull-new.tsx"),
115 route("pull/:number", "routes/repo/pull.tsx"),
116 route("queue", "routes/repo/queue.tsx"),
117 route("agents", "routes/repo/agents.tsx"),
118 route("agents/runs/:id", "routes/repo/agents-run.tsx"),
119 route("sessions", "routes/repo/sessions.tsx"),
120 route("sessions/:number", "routes/repo/session.tsx"),
121 route("memory", "routes/repo/memory.tsx"),
122 route("actions", "routes/repo/actions.tsx"),
123 route("actions/runs/:id", "routes/repo/actions-run.tsx"),
124 route("actions/runs/:id/artifacts/:name", "routes/repo/actions-artifact.ts"),
125 route("actions/jobs/:job/log", "routes/repo/actions-log.ts"),
126 route("deployments", "routes/repo/deployments.tsx"),
127 route("deployments/:id", "routes/repo/deployment.tsx"),
128 route("security", "routes/repo/security.tsx"),
129 route("plans", "routes/repo/plans.tsx"),
130 route("plans/:id", "routes/repo/plan.tsx"),
131 route("settings", "routes/repo/settings.tsx"),
132 route("settings/repository", "routes/repo/settings-repository.tsx"),
133 route("settings/access", "routes/repo/settings-access.tsx"),
134 route("settings/branches", "routes/repo/settings-branches.tsx"),
135 route("settings/webhooks", "routes/repo/webhooks.tsx"),
136 route("settings/secrets", "routes/repo/secrets.tsx"),
137 route("settings/runners", "routes/repo/settings-runners.tsx"),
138 route("settings/deployments", "routes/repo/settings-deployments.tsx"),
139 route("settings/domains", "routes/repo/settings-domains.tsx"),
140 route("settings/dependencies", "routes/repo/settings-dependencies.tsx"),
141 route("settings/guardrails", "routes/repo/settings-guardrails.tsx"),
142 route("settings/agents", "routes/repo/settings-agents.tsx"),
143 // What the project will have: one page for each Soon in its menu.
144 route("soon/:feature", "routes/repo/soon.tsx"),
145 ]),
146 // Anything else: a 404 that still knows who is signed in.
147 route("*", "routes/not-found.tsx"),
148] satisfies RouteConfig;