Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Add dev container

Jonathan ARNAULTa9c7f178600a
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 00000000..6ff8dc9e
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -0,0 +1,51 @@
+FROM node:24-bookworm
+
+# Install basic development tools
+RUN apt update && apt install -y less man-db sudo
+
+RUN apt install -y \
+ xvfb \
+ fonts-noto-color-emoji \
+ fonts-unifont \
+ libfontconfig1 \
+ libfreetype6 \
+ xfonts-scalable \
+ fonts-liberation \
+ fonts-ipafont-gothic \
+ fonts-wqy-zenhei \
+ fonts-tlwg-loma-otf \
+ fonts-freefont-ttf \
+ libasound2 \
+ libatk-bridge2.0-0 \
+ libatk1.0-0 \
+ libatspi2.0-0 \
+ libcairo2 \
+ libcups2 \
+ libdbus-1-3 \
+ libdrm2 \
+ libgbm1 \
+ libglib2.0-0 \
+ libnspr4 \
+ libnss3 \
+ libpango-1.0-0 \
+ libx11-6 \
+ libxcb1 \
+ libxcomposite1 \
+ libxdamage1 \
+ libxext6 \
+ libxfixes3 \
+ libxkbcommon0 \
+ libxrandr2
+
+# Ensure default `node` user has access to `sudo`
+ARG USERNAME=node
+RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
+ && chmod 0440 /etc/sudoers.d/$USERNAME
+
+# Set `DEVCONTAINER` environment variable to help with orientation
+ENV DEVCONTAINER=true
+
+RUN mkdir -p /home/node/.cache/ms-playwright && chown node:node /home/node/.cache/ms-playwright
+
+VOLUME /home/node/.cache/ms-playwright
+VOLUME /tmp
diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json
new file mode 100644
index 00000000..1556bf78
--- /dev/null
+++ b/.devcontainer/devcontainer-lock.json
@@ -0,0 +1,14 @@
+{
+ "features": {
+ "ghcr.io/devcontainers-extra/features/claude-code:2": {
+ "version": "2.0.0",
+ "resolved": "ghcr.io/devcontainers-extra/features/claude-code@sha256:37b0d444a704021ee5f6d24242a4621bf337867d110e4e3c06b863a3a78122ac",
+ "integrity": "sha256:37b0d444a704021ee5f6d24242a4621bf337867d110e4e3c06b863a3a78122ac"
+ },
+ "ghcr.io/devcontainers-extra/features/neovim-apt-get:1": {
+ "version": "1.0.20",
+ "resolved": "ghcr.io/devcontainers-extra/features/neovim-apt-get@sha256:99663f4dfdfac03321caa2f72e64132a43ae778e7cc2da2681e6a50e4f071038",
+ "integrity": "sha256:99663f4dfdfac03321caa2f72e64132a43ae778e7cc2da2681e6a50e4f071038"
+ }
+ }
+}
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 00000000..529f449a
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,35 @@
+// See https://containers.dev/implementors/json_reference/ for configuration reference
+{
+ "name": "Atomic CRM",
+ "build": {
+ "dockerfile": "Dockerfile"
+ },
+ "remoteUser": "node",
+ "features": {
+ "ghcr.io/devcontainers-extra/features/claude-code:2": {},
+ "ghcr.io/devcontainers-extra/features/neovim-apt-get:1": {}
+ },
+ "postAttachCommand": "make install-playwright-browsers",
+ "mounts": [
+ {
+ "type": "bind",
+ "source": "${localEnv:HOME}/.gitconfig",
+ "target": "/home/node/.gitconfig,ro"
+ },
+ {
+ "type": "bind",
+ "source": "${localEnv:HOME}/.bash_aliases",
+ "target": "/home/node/.bash_aliases,ro"
+ },
+ {
+ "type": "bind",
+ "source": "${localEnv:HOME}/.claude.json",
+ "target": "/home/node/.claude.json,ro"
+ },
+ {
+ "type": "bind",
+ "source": "${localEnv:HOME}/.claude",
+ "target": "/home/node/.claude"
+ }
+ ]
+}
diff --git a/makefile b/makefile
index 5ff8eae0..1361d9d3 100644
--- a/makefile
+++ b/makefile
@@ -14,7 +14,10 @@ help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
install: package.json ## install dependencies
- npm install;
+ npm install
+
+install-playwright-browsers: install ## install the playwright browsers (chromium, firefox, webkit)
+ npx playwright install chromium
start-supabase: ## start supabase locally
npx supabase start