Skip to content

Instantly share code, notes, and snippets.

@roshray
Last active April 12, 2026 14:33
Show Gist options
  • Select an option

  • Save roshray/519f73720a97b03a9edc570e17b8a609 to your computer and use it in GitHub Desktop.

Select an option

Save roshray/519f73720a97b03a9edc570e17b8a609 to your computer and use it in GitHub Desktop.
monorepo
// backend/package.json
{
"name": "@ngmi/backend",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "rimraf ./dist && tsc --build ./tsconfig.json",
"start": "node ./dist/index.js",
"types": "tsc --noEmit --project ./tsconfig.json",
"format": "biome check --write src ."
},
"dependencies": {
"@trpc/server": "^11.6.0",
"cors": "^2.8.5",
"express": "^5.1.0",
"zod": "^4.3.6"
},
"devDependencies": {
"@types/cors": "^2.8.19",
"@types/express": "^5.0.4",
"@types/node": "^24.9.1",
"biome": "^0.3.3",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"typescript": "^5.9.3"
}
}
// backend/tsconfig.json
{
"ts-node": {
"files": true,
"transpileOnly": true,
},
"compilerOptions": {
"outDir": "./dist",
"allowJs": true,
"allowSyntheticDefaultImports": true,
"downlevelIteration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"skipLibCheck": true,
"strict": true,
"sourceMap": true,
"resolveJsonModule": true,
"inlineSources": true,
"isolatedDeclarations": false,
"lib": [
"ES2021"
],
"module": "commonjs",
"moduleResolution": "Node",
"target": "es2021"
},
"include": [
"src"
]
}
// monorepo/package.json
{
"name": "monorepo",
"private": true,
"version": "0.0.0",
"scripts": {
"be": "pnpm --filter @monorepo/backend",
"fe": "pnpm --filter @monorepo/frontend",
"dev": "pnpm -r --parallel dev",
"types": "pnpm -r --parallel types"
}
}
/* monorepo/pnpm-workspace.yaml */
packages:
- backend
- frontend
// frontend/tsconfig.app.json
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2022",
"useDefineForClassFields": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"types": ["vite/client"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["src"]
}
// frontend/tsconfig.json
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}
// frontend/tsconfig.node.json
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2023",
"lib": ["ES2023"],
"module": "ESNext",
"types": ["node"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment