feat: add initial project configuration and smoke tests

- Created pnpm workspace configuration to manage packages.
- Added a placeholder .gitkeep file in the scripts directory.
- Implemented a smoke test script to validate core API and web endpoints.
- Established TypeScript base configuration for consistent compilation settings.
- Introduced Turbo configuration for task management and build processes.
This commit is contained in:
KinSun
2026-03-13 10:30:16 +08:00
commit 9d5616fdc6
68 changed files with 9851 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
datasource db {
provider = "postgresql"
}
generator client {
provider = "prisma-client"
output = "../src/generated/prisma"
moduleFormat = "cjs"
}
// Placeholder model — removed when real models are added in feature plans
model Placeholder {
id String @id @default(uuid())
}

View File

@@ -0,0 +1,43 @@
/**
* Prisma seed script — creates deterministic test data for local development.
*
* Run: npx prisma db seed
* make dev-seed
*
* This is idempotent — safe to run multiple times.
*
* Replace/extend with real seed data when feature models are added.
*/
import { PrismaClient } from '../src/generated/prisma/client';
import { PrismaPg } from '@prisma/adapter-pg';
const adapter = new PrismaPg({ connectionString: process.env['DATABASE_URL']! });
const prisma = new PrismaClient({ adapter });
async function main(): Promise<void> {
console.log('');
console.log('🌱 Seeding davinci-platform dev database...');
console.log('');
// Placeholder — replace when real models exist
const existing = await prisma.placeholder.findFirst();
if (existing) {
console.log(' ⏭ Placeholder record already exists');
} else {
await prisma.placeholder.create({ data: {} });
console.log(' ✅ Placeholder record created');
}
console.log('');
console.log('✅ Seed complete');
console.log('');
}
main()
.catch((e) => {
console.error('❌ Seed failed:', e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});