Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Add docs folder with versioning and contributing guides
Adam Eivy896cfcea4869
diff --git a/PLAN.md b/PLAN.mdindex c51071b31e..cede657acc 100644--- a/PLAN.md+++ b/PLAN.md@@ -34,28 +34,9 @@ pm2 logs- [x] M5: AI providers + headless executor- [x] M6: Dev tools (history, command runner)-### Code Guidelines-- **No `window.alert` or `window.confirm`** - Use inline confirmation components or toast notifications for better UX-- Favor functional components and hooks over class components-- Use Tailwind for all styling-- **Linkable routes for all views** - Tabbed pages, sub-pages, edit/add forms should have distinct URL routes (e.g., `/devtools/history`, `/devtools/processes`) so users can bookmark and share links--### Git Workflow-- **`dev`** - Development branch, all features branch from here-- **`main`** - Production branch, releases only--### Versioning (Major.Release.Build)-- **Major** - Manually incremented for breaking changes-- **Release** (minor) - Auto-incremented when merging dev → main-- **Build** (patch) - Auto-incremented on every successful dev CI run--**Automated Flow:**-1. Push to `dev` → CI runs tests → on success, auto-bump patch (0.2.0 → 0.2.1)-2. Create PR from `dev` to `main` → CI runs tests-3. Merge PR → Release workflow:- - Tags current version (v0.2.5)- - Creates GitHub release with changelog- - Preps dev for next release (0.2.5 → 0.3.0)+### Documentation+- [Contributing Guide](./docs/CONTRIBUTING.md) - Code guidelines, git workflow+- [Versioning & Releases](./docs/VERSIONING.md) - Version format, release process---diff --git a/README.md b/README.mdindex 49f42e93ac..25bf63f126 100644--- a/README.md+++ b/README.md@@ -49,9 +49,15 @@ PortOS/├── server/ # Express.js API (port 5554)├── data/ # Runtime data (gitignored)├── data.sample/ # Sample configurations+├── docs/ # Documentation└── ecosystem.config.cjs # PM2 configuration```+## Documentation++- [Contributing Guide](./docs/CONTRIBUTING.md) - Development setup, code guidelines+- [Versioning & Releases](./docs/VERSIONING.md) - Version format, release process+## PM2 Commands```bashdiff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.mdnew file mode 100644index 0000000000..c83020b175--- /dev/null+++ b/docs/CONTRIBUTING.md@@ -0,0 +1,104 @@+# Contributing Guide++## Development Setup++```bash+# Clone and install+git clone https://github.com/atomantic/PortOS.git+cd PortOS+npm run install:all++# Start development+npm run dev++# Or with PM2+pm2 start ecosystem.config.cjs+```++## Code Guidelines++### General++- Favor functional programming over classes+- Keep code DRY (Don't Repeat Yourself)+- Follow YAGNI (You Aren't Gonna Need It)++### Frontend (React)++- Use functional components and hooks+- Use Tailwind CSS for all styling+- **No `window.alert` or `window.confirm`** - Use inline confirmation components or toast notifications+- **Linkable routes for all views** - Tabbed pages, sub-pages, and forms should have distinct URL routes for bookmarking/sharing++### Routing Pattern++```jsx+// Good - linkable routes+/devtools/history+/devtools/runner+/devtools/processes++// Bad - state-based tabs (not linkable)+/devtools (with local state for active tab)+```++### Backend (Express)++- Use Zod for request validation+- No shell interpolation - use spawn with arg arrays+- Command execution uses allowlist for security++## Git Workflow++See [VERSIONING.md](./VERSIONING.md) for full details.++### Quick Reference++1. Work on `dev` branch+2. Push triggers CI → auto-bumps build number+3. Create PR `dev` → `main` for releases+4. Merge triggers release creation + version prep++### Commit Messages++Use conventional commit format:++```+feat: add new feature+fix: resolve bug+build: version/CI changes+docs: documentation updates+refactor: code restructuring+```++## Project Structure++```+PortOS/+├── client/ # React + Vite frontend (port 5555)+│ └── src/+│ ├── components/+│ ├── pages/+│ └── services/+├── server/ # Express.js API (port 5554)+│ ├── routes/+│ ├── services/+│ └── lib/+├── data/ # Runtime data (gitignored)+├── docs/ # Documentation+└── .github/workflows # CI/CD+```++## Testing++```bash+# Run server tests+cd server && npm test++# Watch mode+cd server && npm run test:watch+```++## API Documentation++See [README.md](../README.md#api-endpoints) for API endpoint reference.diff --git a/docs/VERSIONING.md b/docs/VERSIONING.mdnew file mode 100644index 0000000000..3a7aa4ed65--- /dev/null+++ b/docs/VERSIONING.md@@ -0,0 +1,109 @@+# Versioning & Release Process++## Version Format++PortOS uses semantic versioning with the format **Major.Release.Build**:++| Component | Description | When Incremented |+|-----------|-------------|------------------|+| **Major** | Breaking changes | Manually by maintainer |+| **Release** | New features/releases | Auto on merge to `main` |+| **Build** | Development iterations | Auto on push to `dev` |++Example progression: `0.2.0` → `0.2.1` → `0.2.2` → (release) → `0.3.0`++## Branches++| Branch | Purpose |+|--------|---------|+| `main` | Production releases only |+| `dev` | Active development |++## Automated Workflow++### On Push to `dev`++1. CI runs tests and linting+2. If tests pass, GitHub Actions auto-increments the **Build** number+3. Commits with `[skip ci]` to avoid infinite loops++```+Push commit → CI passes → Auto-commit: "build: bump version to 0.2.1 [skip ci]"+```++### On Merge `dev` → `main`++1. Release workflow triggers+2. Creates git tag with current version (e.g., `v0.2.5`)+3. Generates GitHub release with changelog+4. Preps `dev` branch for next release cycle:+ - Increments **Release** number+ - Resets **Build** to 0+ - Example: `0.2.5` → `0.3.0`++## Manual Steps++### Regular Development++```bash+# Work on dev branch+git checkout dev+git pull++# Make changes, commit, push+git add .+git commit -m "feat: add new feature"+git push+# CI will auto-bump: 0.2.0 → 0.2.1+```++### Creating a Release++```bash+# Ensure dev is up to date+git checkout dev+git pull++# Create PR from dev to main (via GitHub UI or CLI)+gh pr create --base main --head dev --title "Release v0.2.X"++# After PR is merged:+# - GitHub creates tag v0.2.X+# - GitHub creates release with changelog+# - dev branch is auto-updated to 0.3.0+```++### Major Version Bump++For breaking changes, manually update before merging:++```bash+git checkout dev++# Update all package.json files+npm version 1.0.0 --no-git-tag-version+cd client && npm version 1.0.0 --no-git-tag-version && cd ..+cd server && npm version 1.0.0 --no-git-tag-version && cd ..++git add -A+git commit -m "build: prep v1.0.0 major release [skip ci]"+git push++# Then create PR to main+```++## CI Skip++Use `[skip ci]` in commit messages to prevent CI from running:++- Auto-version bump commits include this automatically+- Use manually when making non-code changes (docs, etc.)++## Files Updated by Automation++The following files are updated by GitHub Actions:++- `/package.json`+- `/package-lock.json`+- `/client/package.json`+- `/server/package.json`