Find classmates in a lecture and choose seats together. Built with Next.js 16 (App Router and Partial Prerendering), Neon Postgres, and Better Auth with Discord login.
Requires Bun, Node.js 24, a Neon Postgres database, and a Discord OAuth application.
- Run
bun installand copy.env.exampleto.env. - Set
POSTGRES_DATABASE_URL,DISCORD_CLIENT_ID, andDISCORD_CLIENT_SECRET. GenerateBETTER_AUTH_SECRETwithopenssl rand -base64 32. SetBETTER_AUTH_URL=http://localhost:3000locally andBETTER_AUTH_URL=https://kolega-finder.lufy.czin production. - In the Discord Developer Portal, add both OAuth2 redirects:
http://localhost:3000/api/auth/callback/discordandhttps://kolega-finder.lufy.cz/api/auth/callback/discord. - Run
bun run db:authand thenbun run db:schemaagainst the fresh database. - Run
bun run devand openhttp://localhost:3000.
Keep .env private. Set the same environment variables in production; use a distinct production auth secret. Better Auth manages its tables, while db/schema.sql defines lectures and seats. Seat uniqueness is enforced by Postgres.
bun run typecheck, bun run lint, bun run test, and bun run build.