feat: add fullstack TypeScript template with Docker support
- Created package.json for managing workspaces (frontend and backend) - Added scripts for development, build, testing, and Docker operations - Implemented kill-dev-processes.sh script to terminate development processes gracefully
This commit is contained in:
15
.vscode/extensions.json
vendored
Normal file
15
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"ms-vscode.vscode-typescript-next",
|
||||
"esbenp.prettier-vscode",
|
||||
"ms-vscode.vscode-json",
|
||||
"ms-vscode.vscode-eslint",
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"ms-vscode-remote.remote-containers",
|
||||
"ms-vscode.node-debug2",
|
||||
"ms-vscode.js-debug",
|
||||
"formulahendry.auto-rename-tag",
|
||||
"christian-kohler.path-intellisense",
|
||||
"ms-vscode.vscode-typescript-tslint-plugin"
|
||||
]
|
||||
}
|
||||
7
.vscode/keybindings.json
vendored
Normal file
7
.vscode/keybindings.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"key": "ctrl+shift+q",
|
||||
"command": "workbench.action.tasks.runTask",
|
||||
"args": "🛑 Cleanup Development Processes"
|
||||
}
|
||||
]
|
||||
72
.vscode/launch.json
vendored
Normal file
72
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "🚀 Debug Backend",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "npx",
|
||||
"runtimeArgs": [
|
||||
"ts-node-dev",
|
||||
"--respawn",
|
||||
"--transpile-only",
|
||||
"--no-notify"
|
||||
],
|
||||
"args": ["src/index.ts"],
|
||||
"cwd": "${workspaceFolder}/backend",
|
||||
"env": {
|
||||
"NODE_ENV": "development"
|
||||
},
|
||||
"console": "integratedTerminal",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"sourceMaps": true,
|
||||
"restart": true,
|
||||
"outputCapture": "std",
|
||||
"presentation": {
|
||||
"group": "fullstack",
|
||||
"panel": "new"
|
||||
},
|
||||
"postDebugTask": "🛑 Terminate All Development Processes"
|
||||
},
|
||||
{
|
||||
"name": "🌐 Debug Frontend (Chrome)",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"url": "http://localhost:3000",
|
||||
"webRoot": "${workspaceFolder}/frontend/src",
|
||||
"skipFiles": ["<node_internals>/**"]
|
||||
},
|
||||
{
|
||||
"name": "🔧 Debug Frontend (Edge)",
|
||||
"type": "msedge",
|
||||
"request": "launch",
|
||||
"url": "http://localhost:3000",
|
||||
"webRoot": "${workspaceFolder}/frontend/src",
|
||||
"skipFiles": ["<node_internals>/**"]
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "🚀🌐 Debug Full Stack (Chrome)",
|
||||
"preLaunchTask": "🌐 Frontend",
|
||||
"configurations": ["🚀 Debug Backend", "🌐 Debug Frontend (Chrome)"],
|
||||
"stopAll": true,
|
||||
"presentation": {
|
||||
"hidden": false,
|
||||
"group": "fullstack",
|
||||
"order": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "🚀🔧 Debug Full Stack (Edge)",
|
||||
"preLaunchTask": "🌐 Frontend",
|
||||
"configurations": ["🚀 Debug Backend", "🔧 Debug Frontend (Edge)"],
|
||||
"stopAll": true,
|
||||
"presentation": {
|
||||
"hidden": false,
|
||||
"group": "fullstack",
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
28
.vscode/settings.json
vendored
Normal file
28
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"typescript.preferences.includePackageJsonAutoImports": "auto",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"files.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/dist": true,
|
||||
"**/.git": true,
|
||||
"**/.DS_Store": true
|
||||
},
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/dist": true
|
||||
},
|
||||
"typescript.updateImportsOnFileMove.enabled": "always",
|
||||
"emmet.includeLanguages": {
|
||||
"typescript": "typescriptreact"
|
||||
},
|
||||
"debug.allowBreakpointsEverywhere": true,
|
||||
"debug.node.autoAttach": "on",
|
||||
"terminal.integrated.enablePersistentSessions": false,
|
||||
"terminal.integrated.confirmOnKill": "editor",
|
||||
"task.autoDetect": "off",
|
||||
"task.showDecorations": true
|
||||
}
|
||||
322
.vscode/tasks.json
vendored
Normal file
322
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,322 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Install Backend Dependencies",
|
||||
"type": "shell",
|
||||
"command": "npm",
|
||||
"args": ["install"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/backend"
|
||||
},
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Install Frontend Dependencies",
|
||||
"type": "shell",
|
||||
"command": "npm",
|
||||
"args": ["install"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/frontend"
|
||||
},
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "🖥️ Backend",
|
||||
"type": "shell",
|
||||
"command": "npm",
|
||||
"args": ["run", "dev"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/backend"
|
||||
},
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"group": "dev",
|
||||
"showReuseMessage": false
|
||||
},
|
||||
"problemMatcher": {
|
||||
"pattern": {
|
||||
"regexp": "^.*$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
},
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "^.*ts-node-dev.*$",
|
||||
"endsPattern": "^🚀 Backend Server läuft auf Port \\d+$"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "🌐 Frontend",
|
||||
"type": "shell",
|
||||
"command": "npm",
|
||||
"args": ["start"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/frontend",
|
||||
"env": {
|
||||
"BROWSER": "none"
|
||||
}
|
||||
},
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"group": "dev",
|
||||
"showReuseMessage": false
|
||||
},
|
||||
"problemMatcher": {
|
||||
"owner": "custom",
|
||||
"pattern": {
|
||||
"regexp": "^.*$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
},
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "^.*Starting the development server.*$",
|
||||
"endsPattern": "^.*webpack compiled.*$"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "🛑 Kill Frontend Process",
|
||||
"type": "shell",
|
||||
"command": "pkill",
|
||||
"args": ["-f", "npm start"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/frontend"
|
||||
},
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "🛑 Kill Backend Process",
|
||||
"type": "shell",
|
||||
"command": "pkill",
|
||||
"args": ["-f", "ts-node-dev"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/backend"
|
||||
},
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "📊 Show Development Processes Status",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"echo '📊 Aktuelle Development-Prozesse:'; echo ''; ps aux | grep -E 'npm.*start|react-scripts|ts-node-dev' | grep -v grep | awk '{print \"PID: \" $2 \" - \" $11 \" \" $12 \" \" $13}' || echo 'Keine Development-Prozesse gefunden'"
|
||||
],
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "🛑 Cleanup Development Processes",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"pkill -f 'ts-node-dev' > /dev/null 2>&1 || true; pkill -f 'npm.*start' > /dev/null 2>&1 || true; pkill -f 'react-scripts' > /dev/null 2>&1 || true"
|
||||
],
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": false,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"clear": false,
|
||||
"showReuseMessage": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"isBackground": false,
|
||||
"runOptions": {
|
||||
"reevaluateOnRerun": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "🧹 Post Debug Cleanup",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": ["-c", "/workspace/scripts/post-debug-cleanup.sh"],
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": false,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "new",
|
||||
"clear": false,
|
||||
"showReuseMessage": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"isBackground": false,
|
||||
"runOptions": {
|
||||
"reevaluateOnRerun": true,
|
||||
"runOn": "default"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "🔄 Force Kill All Dev Processes",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"RANDOM_ID=$RANDOM; echo \"Cleanup ID: $RANDOM_ID\" > /dev/null; pkill -9 -f 'ts-node-dev' > /dev/null 2>&1 || true; pkill -9 -f 'npm.*start' > /dev/null 2>&1 || true; pkill -9 -f 'react-scripts' > /dev/null 2>&1 || true"
|
||||
],
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": false,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"clear": false,
|
||||
"showReuseMessage": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "🛑 Terminate All Development Processes",
|
||||
"type": "shell",
|
||||
"command": "/workspace/scripts/kill-dev-processes.sh",
|
||||
"args": [],
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": false,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"clear": false,
|
||||
"showReuseMessage": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"runOptions": {
|
||||
"runOn": "default"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "🛑 Terminate All Development Processes (Verbose)",
|
||||
"type": "shell",
|
||||
"command": "/workspace/scripts/kill-dev-processes.sh",
|
||||
"args": [],
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"clear": true,
|
||||
"showReuseMessage": false
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "🚀 Start Full Stack (Split Terminal)",
|
||||
"dependsOrder": "parallel",
|
||||
"dependsOn": ["🖥️ Backend", "🌐 Frontend"],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "new"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "🔄 Restart Full Stack",
|
||||
"type": "shell",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"/workspace/scripts/kill-dev-processes.sh && sleep 2 && echo '🚀 Starte Full Stack...' && code --command 'workbench.action.tasks.runTask' 'shell: 🚀 Start Full Stack (Split Terminal)'"
|
||||
],
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"clear": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Build Backend",
|
||||
"type": "shell",
|
||||
"command": "npm",
|
||||
"args": ["run", "build"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/backend"
|
||||
},
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared"
|
||||
},
|
||||
"problemMatcher": ["$tsc"]
|
||||
},
|
||||
{
|
||||
"label": "Build Frontend",
|
||||
"type": "shell",
|
||||
"command": "npm",
|
||||
"args": ["run", "build"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/frontend"
|
||||
},
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user