feat: Set up initial monorepo structure for admin and mobile applications with core configurations and database integration.

This commit is contained in:
2026-02-20 12:58:54 +01:00
parent 5e2d5fb3ae
commit b7f8221095
52 changed files with 2200 additions and 175 deletions

View File

@@ -0,0 +1,50 @@
import { PrismaClient } from '@prisma/client'
import bcrypt from 'bcryptjs'
const prisma = new PrismaClient()
async function main() {
console.log('Seeding superadmin with fresh bcryptjs hash...')
// Generate hash using bcryptjs, rounds=10
const salt = bcrypt.genSaltSync(10)
const hash = bcrypt.hashSync('demo1234', salt)
console.log('Generated hash:', hash)
const superAdminUser = await prisma.user.upsert({
where: { email: 'superadmin@innungsapp.de' },
update: {},
create: {
id: 'superadmin-user-id',
name: 'Super Admin',
email: 'superadmin@innungsapp.de',
emailVerified: true,
},
})
await prisma.account.upsert({
where: { id: 'superadmin-account-id' },
update: {
password: hash
},
create: {
id: 'superadmin-account-id',
accountId: superAdminUser.id,
providerId: 'credential',
userId: superAdminUser.id,
password: hash,
},
})
console.log('Superadmin updated! Email: superadmin@innungsapp.de, Password: demo1234')
}
main()
.catch((e) => {
console.error(e)
process.exit(1)
})
.finally(async () => {
await prisma.$disconnect()
})