feat: scaffold monorepo with shared, server, and client packages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 18:09:07 -05:00
commit 39c19568c1
11 changed files with 2399 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
node_modules/
dist/
.vite/

16
client/index.html Normal file
View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DFlike</title>
<style>
* { margin: 0; padding: 0; }
body { background: #000; overflow: hidden; }
</style>
</head>
<body>
<div id="game"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

19
client/package.json Normal file
View File

@@ -0,0 +1,19 @@
{
"name": "@dflike/client",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"dependencies": {
"@dflike/shared": "*",
"phaser": "^3.80.0",
"socket.io-client": "^4.7.0"
},
"devDependencies": {
"typescript": "^5.4.0",
"vite": "^5.4.0"
}
}

16
client/tsconfig.json Normal file
View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"outDir": "dist",
"rootDir": "src",
"paths": {
"@dflike/shared": ["../shared/src"]
}
},
"include": ["src"],
"references": [{ "path": "../shared" }]
}

13
client/vite.config.ts Normal file
View File

@@ -0,0 +1,13 @@
import { defineConfig } from 'vite';
import path from 'path';
export default defineConfig({
resolve: {
alias: {
'@dflike/shared': path.resolve(__dirname, '../shared/src'),
},
},
server: {
port: 3000,
},
});

2270
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

5
package.json Normal file
View File

@@ -0,0 +1,5 @@
{
"name": "dflike",
"private": true,
"workspaces": ["shared", "server", "client"]
}

21
server/package.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "@dflike/server",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx watch src/main.ts",
"start": "tsx src/main.ts",
"test": "vitest run",
"test:watch": "vitest"
},
"dependencies": {
"@dflike/shared": "*",
"socket.io": "^4.7.0"
},
"devDependencies": {
"tsx": "^4.7.0",
"typescript": "^5.4.0",
"vitest": "^2.0.0"
}
}

16
server/tsconfig.json Normal file
View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"outDir": "dist",
"rootDir": "src",
"paths": {
"@dflike/shared": ["../shared/src"]
}
},
"include": ["src"],
"references": [{ "path": "../shared" }]
}

7
shared/package.json Normal file
View File

@@ -0,0 +1,7 @@
{
"name": "@dflike/shared",
"version": "0.1.0",
"private": true,
"main": "src/index.ts",
"types": "src/index.ts"
}

13
shared/tsconfig.json Normal file
View File

@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"declaration": true,
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}