feat(phase1a): admin-sdk base, audit helper, project seed, panel pages

- src/lib/audit.ts + src/lib/admin-sdk/base.ts (typed HTTP + auto audit)
- prisma/seed.ts seeds 5 projects (all inactive)
- pages: /projects, /projects/[key], /audit, /operations, /events, /settings
- components/panel-shell.tsx shared layout
- entrypoint runs seed after db push
This commit is contained in:
Semih
2026-05-13 10:33:18 +00:00
parent 5aca3934ca
commit d189206f06
14 changed files with 712 additions and 3 deletions

29
apps/web/prisma/seed.ts Normal file
View File

@@ -0,0 +1,29 @@
import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
const projects = [
{ key: "sase", name: "Sase.tr", description: "VIN/chassis lookup + auto parts catalog", active: false },
{ key: "catvicer", name: "Catvicer", description: "Multi-tenant catering SaaS", active: false },
{ key: "kokpit", name: "Kokpit", description: "Internal ops dashboard", active: false },
{ key: "otoyedekparca", name: "otoyedekparca.co", description: "Auto parts marketplace", active: false },
{ key: "eryaman", name: "Eryaman Evleri TYY", description: "Residence portal", active: false },
];
async function main() {
for (const p of projects) {
await prisma.project.upsert({
where: { key: p.key },
update: { name: p.name, description: p.description },
create: p,
});
}
console.log(`seeded ${projects.length} projects`);
}
main()
.then(() => prisma.$disconnect())
.catch((e) => {
console.error(e);
return prisma.$disconnect().finally(() => process.exit(1));
});