feat: implement app directory routing, authentication flow, and dynamic reporting module

This commit is contained in:
Firman Ramdhani
2026-08-28 15:50:01 +07:00
parent 3e68d12ce4
commit 84e6599b23
28 changed files with 1869 additions and 478 deletions
+35
View File
@@ -0,0 +1,35 @@
import { PrismaClient } from '@prisma/client'
import bcrypt from 'bcryptjs'
const prisma = new PrismaClient()
async function main() {
const superadminUsername = 'superadmin'
const superadminPassword = 'titipin123!'
const hashedPassword = await bcrypt.hash(superadminPassword, 10)
const superadmin = await prisma.user.upsert({
where: { username: superadminUsername },
update: {},
create: {
username: superadminUsername,
name: 'Super Admin',
password: hashedPassword,
role: 'superadmin',
is_active: true,
},
})
console.log({ superadmin })
}
main()
.then(async () => {
await prisma.$disconnect()
})
.catch(async (e) => {
console.error(e)
await prisma.$disconnect()
process.exit(1)
})