feat(auth): add Discord OAuth sign-in and user timezones

Add persistent user and session storage, protected profile requests, and React sign-in controls. Capture and preserve each user's timezone, and load development and production configuration before migrations and server startup.
This commit is contained in:
syntaxbullet
2026-09-04 08:29:48 +02:00
parent 29bf75760b
commit d3cbf2f7dc
22 changed files with 997 additions and 24 deletions

View File

@@ -1,15 +1,9 @@
import { Hono } from "hono";
import { sql } from "drizzle-orm";
import { db } from "./db";
import { createApi } from "./api";
import { readAuthConfig } from "./auth/config";
import index from "./index.html";
const app = new Hono();
app.get("/api/health", c => {
db.get(sql`SELECT 1`);
return c.json({ status: "ok" });
});
app.notFound(c => c.json({ error: "Not found" }, 404));
const app = createApi(db, readAuthConfig());
const server = Bun.serve({
hostname: "127.0.0.1",