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:
2025-05-29 08:03:49 +00:00
commit c40b069ab9
41 changed files with 36870 additions and 0 deletions

25
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
FROM node:18
# Install git and other useful tools
RUN apt-get update && apt-get install -y \
git \
curl \
vim \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /workspace
# Install global packages
RUN npm install -g typescript ts-node nodemon
# Create user with same UID as host (for file permissions)
ARG USERNAME=node
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupmod --gid $USER_GID $USERNAME \
&& usermod --uid $USER_UID --gid $USER_GID $USERNAME \
&& chown -R $USER_UID:$USER_GID /home/$USERNAME
USER $USERNAME

View File

@@ -0,0 +1,42 @@
{
"name": "Fotodrucker Full Stack",
"build": {
"dockerfile": "Dockerfile"
},
"workspaceFolder": "/workspace",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.vscode-typescript-next",
"esbenp.prettier-vscode",
"ms-vscode.vscode-json",
"bradlc.vscode-tailwindcss",
"ms-vscode.vscode-eslint",
"ms-vscode-remote.remote-containers"
],
"settings": {
"typescript.preferences.includePackageJsonAutoImports": "auto",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
},
"postCreateCommand": "cd backend && npm install && cd ../frontend && npm install",
"forwardPorts": [3000, 3001, 9229, 9230],
"portsAttributes": {
"3000": {
"label": "Frontend (React)",
"onAutoForward": "openBrowser"
},
"3001": {
"label": "Backend (Express)"
},
"9229": {
"label": "Backend Debug Port"
},
"9230": {
"label": "Frontend Debug Port"
}
}
}

View File

@@ -0,0 +1,16 @@
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/workspace:cached
ports:
- "3000:3000"
- "3001:3001"
- "9229:9229"
- "9230:9230"
command: sleep infinity
working_dir: /workspace