docs: add Quick Install (VS Code, Claude Code extension, install-all.sh); add install-all.sh fresh-machine setup script

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 23:41:01 -04:00
co-authored by Claude Opus 5.5
parent d357edd4a6
commit d67aa75c42
2 changed files with 146 additions and 1 deletions
+39 -1
View File
@@ -36,9 +36,47 @@ sudo systemctl stop sshd && sudo systemctl disable sshd
---
## ⚡ Quick Install (Fresh Machine)
Do these three things in order. The script in step C runs Steps 2–14 and 16 of the Setup Guide below for you.
### A — Install VS Code (manually)
1. In a browser, go to https://code.visualstudio.com/download and download the **.deb** (Debian/Ubuntu) file
2. Install it from a terminal:
```sh
sudo apt install -y ~/Downloads/code_*.deb
# Verify
code --version
```
### B — Add the Claude Code extension in VS Code
1. Open VS Code
2. Open the Extensions panel (`Ctrl+Shift+X`)
3. Search for **Claude Code** (published by Anthropic) and click **Install**
4. Click the Claude icon in the sidebar and sign in
### C — Run the install script
Clone the repository to `~/Desktop/DentalManagement09` if it isn't there yet (needs git: `sudo apt install -y git`), then run:
```sh
cd ~/Desktop/DentalManagement09
bash install-all.sh
```
Enter your password when it asks. The script installs Node.js, Python, Chrome, PostgreSQL, Redis, rclone and nginx; installs the Node and Python dependencies; creates any missing `.env` files (existing ones are kept); sets up the database; and creates the desktop shortcuts. It is safe to re-run.
Still done by hand afterwards: the Security Setup above, Step 1 (auto-login / keyring), Step 12a (Cloudflare subdomain), the LAN HTTPS certificate (the script only enables the nginx site once that certificate exists), and the optional Steps 17–18.
---
## 🖥️ Setup Guide (Fresh Machine)
Follow these steps in order after cloning the repository.
Follow these steps in order after cloning the repository. (Steps 2–14 and 16 are automated by `install-all.sh` — see Quick Install above.)
### Step 1 — Enable auto-login (LXQt / SDDM)
Executable
+107
View File
@@ -0,0 +1,107 @@
#!/bin/bash
# =============================================================
# Dental Manager — fresh-machine install (README Steps 4–14, 16)
# Run in a terminal: bash install-all.sh
# It asks for your sudo password once at the start.
# Safe to re-run: every step skips what's already done.
# =============================================================
set -e
cd "$(dirname "$0")"
PROJECT_DIR="$(pwd)"
step() { echo ""; echo "=============================="; echo " $1"; echo "=============================="; }
sudo -v # ask for password up front
# keep sudo alive while the script runs
while true; do sudo -n true; sleep 50; kill -0 "$$" || exit; done 2>/dev/null &
step "Base tools (curl, wget, git)"
sudo apt-get update
sudo apt-get install -y curl wget ca-certificates git
step "STEP 4 — Node.js 20"
if command -v node >/dev/null && node -v | grep -q '^v2[0-9]'; then
echo "Node already installed: $(node -v)"
else
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
fi
node -v; npm -v
step "STEP 5 — Python (+ venv, pip)"
sudo apt-get install -y python3 python3-pip python3-venv
python3 --version
step "STEP 6 — Google Chrome"
if command -v google-chrome >/dev/null; then
echo "Chrome already installed"
else
wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/google-chrome-stable.deb
sudo apt-get install -y /tmp/google-chrome-stable.deb
fi
google-chrome --version
step "STEP 7 — PostgreSQL"
sudo apt-get install -y postgresql postgresql-contrib
sudo systemctl enable postgresql
sudo systemctl start postgresql
sudo -u postgres psql -tc "SELECT 1 FROM pg_database WHERE datname='dentalapp'" | grep -q 1 \
|| sudo -u postgres psql -c "CREATE DATABASE dentalapp OWNER postgres;"
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'mypassword';"
sudo sed -i 's/scram-sha-256/md5/g' /etc/postgresql/*/main/pg_hba.conf
sudo systemctl restart postgresql
PGPASSWORD=mypassword psql -U postgres -d dentalapp -h 127.0.0.1 -c 'SELECT 1' >/dev/null && echo "✓ PostgreSQL login works"
step "STEP 8 — Redis"
sudo apt-get install -y redis-server
sudo systemctl enable redis-server
sudo systemctl start redis-server
redis-cli ping
step "STEP 9 — rclone"
bash scripts/install-rclone.sh
step "STEP 10 — Node.js dependencies"
npm install
step "STEP 11 — Python dependencies (venvs)"
npm run setup:python
step "STEP 12 — .env files (only the missing ones; existing ones are kept)"
for f in packages/db/prisma/.env apps/Frontend/.env apps/Backend/.env \
apps/PatientDataExtractorService/.env apps/SeleniumService/.env apps/PaymentOCRService/.env; do
if [ -f "$f" ]; then echo "keep $f"
else cp "$f.example" "$f" && echo "created $f"; fi
done
step "STEP 13 — Database (migrate, generate, seed)"
npm run db:migrate
npm run db:generate
npm run db:seed
step "STEP 14 — nginx"
sudo apt-get install -y nginx
CERT=$(grep -m1 -oP 'ssl_certificate\s+\K\S+(?=;)' nginx.conf)
if sudo test -f "$CERT"; then
sudo cp nginx.conf /etc/nginx/sites-available/dental-app
sudo ln -sf /etc/nginx/sites-available/dental-app /etc/nginx/sites-enabled/dental-app
sudo rm -f /etc/nginx/sites-enabled/default
sudo nginx -t && sudo systemctl reload nginx
echo "✓ nginx configured"
else
echo "⚠ Skipped enabling the dental-app nginx site: certificate not found at"
echo " $CERT"
echo " Do the README's 'LAN HTTPS Setup' (certbot) first, then re-run this script."
fi
step "STEP 16 — Desktop shortcuts"
bash setup-desktop-shortcut.sh
echo ""
echo "============================================"
echo " Done. To run the app (Step 15):"
echo " Terminal 1: cd $PROJECT_DIR && npm run dev"
echo " Terminal 2: cd $PROJECT_DIR/apps/SeleniumService && .venv/bin/python3 agent.py"
echo " ...or double-click the 'Dental App' desktop shortcut."
echo "============================================"