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,20 @@
{
"name": "@davinci/shared",
"version": "0.1.0-alpha.0",
"description": "Davinci Platform — shared types, DTOs, and constants",
"author": "Galaxis",
"private": true,
"license": "UNLICENSED",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc -p tsconfig.json",
"test": "vitest run",
"test:unit": "vitest run",
"test:cov": "vitest run --coverage"
},
"devDependencies": {
"typescript": "^5.7.0",
"vitest": "^3.0.0"
}
}

View File

@@ -0,0 +1,9 @@
import { describe, it, expect } from 'vitest';
import { APP_NAME } from '../index.js';
describe('@davinci/shared', () => {
it('exports APP_NAME constant', () => {
expect(APP_NAME).toBeDefined();
expect(APP_NAME).toBe('Davinci Platform');
});
});

View File

@@ -0,0 +1 @@
export const APP_NAME = 'Davinci Platform';

View File

@@ -0,0 +1 @@
export { APP_NAME } from './constants/index.js';

View File

@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"declaration": true,
"composite": true
},
"include": ["src"],
"exclude": ["dist", "node_modules", "**/*.test.ts"]
}

View File

@@ -0,0 +1,8 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
},
});