adds user accounts, service requests, dashboard, admin panel, better layout, db+altcha+auth support

This commit is contained in:
Aidan 2025-07-07 20:01:59 -04:00
parent dfbc3cade9
commit 0043a5bf3c
40 changed files with 3981 additions and 188 deletions

22
app/api/captcha/route.ts Normal file
View file

@ -0,0 +1,22 @@
import { createChallenge } from "altcha-lib";
import { NextResponse } from "next/server";
const hmacKey = process.env.ALTCHA_SECRET;
async function getChallenge() {
if (!hmacKey) {
console.error("ALTCHA_SECRET is not set")
return NextResponse.json({ error: "Internal server error" }, { status: 500 })
}
const challenge = await createChallenge({
hmacKey,
maxNumber: 1400000,
})
return NextResponse.json(challenge)
}
export async function GET() {
return getChallenge()
}