Files
znakovni.hr/packages/backend/prisma/seed.ts
johnny2211 a11e2acb23 Initial project setup: monorepo structure with frontend and backend
- Set up pnpm workspace with frontend (React + Vite) and backend (Express + Prisma)
- Configure TypeScript, ESLint, and Prettier
- Add Prisma schema for database models (User, Course, Lesson, Progress, etc.)
- Create basic frontend structure with Tailwind CSS and shadcn/ui
- Add environment configuration files
- Update README with project overview and setup instructions
- Complete Phase 0: Project initialization
2026-01-17 11:58:26 +01:00

32 lines
655 B
TypeScript

import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
console.log('🌱 Starting database seed...');
// Create a sample user
const user = await prisma.user.create({
data: {
email: 'demo@znakovni.hr',
displayName: 'Demo User',
authProvider: 'local',
},
});
console.log('✅ Created demo user:', user.email);
// Add sample terms here in future phases
console.log('✅ Seed completed successfully!');
}
main()
.catch((e) => {
console.error('❌ Seed failed:', e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});