diff --git a/README.md b/README.md new file mode 100644 index 0000000..14f8066 --- /dev/null +++ b/README.md @@ -0,0 +1,108 @@ +# Project Tracker + +A self-hosted project tracking web app. Dark-themed, minimal, fast. + +**Live:** https://projects.ledrew.me + +--- + +## Stack + +- **Backend:** Node.js + Express + better-sqlite3 +- **Frontend:** Vanilla JS + CSS (no framework, no build step) +- **Web Server:** nginx (reverse proxy + static files) +- **Database:** SQLite (single file, no server process) + +--- + +## Features + +- List all projects with priority badges +- Filter by status: All / Active / Backlog / On Hold / Completed +- Drill-down detail panel — click any project to view/edit +- Create new projects via modal form +- Fields: Name, Priority, URL, Notes, Status, Owner, Tags +- Fully responsive sidebar layout +- Dark GitHub-inspired theme + +--- + +## API + +| Method | Endpoint | Description | +|--------|----------|-------------| +| GET | `/api/projects` | List all projects | +| GET | `/api/projects/:id` | Get single project | +| POST | `/api/projects` | Create project | +| PUT | `/api/projects/:id` | Update project | +| DELETE | `/api/projects/:id` | Delete project | + +### Body (POST/PUT) + +```json +{ + "name": "Project Name", + "priority": "High|Med-High|Medium|Low", + "url": "https://...", + "notes": "Description...", + "status": "Active|Backlog|On Hold|Completed", + "owner": "Ada", + "tags": "tag1,tag2" +} +``` + +--- + +## Deploy + +```bash +# 1. Install Node.js 20 +wget -q https://nodejs.org/dist/v20.18.0/node-v20.18.0-linux-x64.tar.gz +tar -xzf node-v20.18.0-linux-x64.tar.gz +mv node-v20.18.0-linux-x64 /usr/local/node +ln -sf /usr/local/node/bin/{node,npm} /usr/bin/ + +# 2. Install nginx +apt-get update && apt-get install -y nginx + +# 3. Copy files +mkdir -p /opt/project-tracker/{backend,data,frontend} +cp backend/* /opt/project-tracker/backend/ +cp frontend/* /opt/project-tracker/frontend/ +cp nginx.conf /etc/nginx/sites-available/project-tracker + +# 4. Install deps +cd /opt/project-tracker/backend && npm install + +# 5. Start services +systemctl daemon-reload +systemctl enable project-tracker nginx +systemctl start project-tracker nginx +``` + +Or run `deploy.sh` on a fresh Debian system. + +--- + +## File Structure + +``` +project-tracker/ +├── backend/ +│ ├── server.js # Express API + SQLite +│ └── package.json +├── frontend/ +│ ├── index.html # SPA (dark theme) +│ └── favicon.png +├── nginx.conf # Reverse proxy +└── deploy.sh # One-shot deploy script +``` + +--- + +## Notes + +- API runs on port 3000, nginx proxies `/api/` and serves static files on port 80 +- Database file: `/opt/project-tracker/data/projects.db` +- No authentication on the API — intended for internal use behind a reverse proxy +- CORS is open for development; restrict in production if needed