Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history

app.tsx

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

app.tsxBlame103 lines · 1 contributor
79136bbClaude1import { Hono } from "hono";
2import { logger } from "hono/logger";
3import { cors } from "hono/cors";
4import { Layout } from "./views/layout";
5import gitRoutes from "./routes/git";
6import apiRoutes from "./routes/api";
7import authRoutes from "./routes/auth";
8import settingsRoutes from "./routes/settings";
9import issueRoutes from "./routes/issues";
10import repoSettings from "./routes/repo-settings";
11import compareRoutes from "./routes/compare";
0074234Claude12import pullRoutes from "./routes/pulls";
13import editorRoutes from "./routes/editor";
c81ab7aClaude14import forkRoutes from "./routes/fork";
15import webhookRoutes from "./routes/webhooks";
16import exploreRoutes from "./routes/explore";
17import tokenRoutes from "./routes/tokens";
79136bbClaude18import webRoutes from "./routes/web";
19
20const app = new Hono();
21
22// Middleware
23app.use("*", logger());
24app.use("/api/*", cors());
25
26// Git Smart HTTP protocol routes (must be before web routes)
27app.route("/", gitRoutes);
28
29// REST API
30app.route("/", apiRoutes);
31
32// Auth routes (register, login, logout)
33app.route("/", authRoutes);
34
35// Settings routes (profile, SSH keys)
36app.route("/", settingsRoutes);
37
c81ab7aClaude38// API tokens
39app.route("/", tokenRoutes);
40
79136bbClaude41// Repo settings (description, visibility, delete)
42app.route("/", repoSettings);
43
c81ab7aClaude44// Webhooks management
45app.route("/", webhookRoutes);
46
79136bbClaude47// Compare view (branch diffs)
48app.route("/", compareRoutes);
49
50// Issue tracker
51app.route("/", issueRoutes);
52
0074234Claude53// Pull requests
54app.route("/", pullRoutes);
55
c81ab7aClaude56// Fork
57app.route("/", forkRoutes);
58
0074234Claude59// Web file editor
60app.route("/", editorRoutes);
61
c81ab7aClaude62// Explore page
63app.route("/", exploreRoutes);
64
79136bbClaude65// Web UI (catch-all, must be last)
66app.route("/", webRoutes);
67
68// Global 404
69app.notFound((c) => {
70 return c.html(
71 <Layout title="Not Found">
72 <div class="empty-state">
73 <h2>404</h2>
74 <p>Page not found.</p>
75 <a href="/" style="margin-top: 12px; display: inline-block">
76 Go home
77 </a>
78 </div>
79 </Layout>,
80 404
81 );
82});
83
84// Global error handler
85app.onError((err, c) => {
86 console.error("[error]", err);
87 return c.html(
88 <Layout title="Error">
89 <div class="empty-state">
90 <h2>Something went wrong</h2>
91 <p>An unexpected error occurred.</p>
92 {process.env.NODE_ENV !== "production" && (
93 <pre style="margin-top: 16px; text-align: left; font-size: 12px; color: var(--red)">
94 {err.message}
95 </pre>
96 )}
97 </div>
98 </Layout>,
99 500
100 );
101});
102
103export default app;