A comprehensive guide to using Project Nexus for AI-powered project management and automation.
- Quick Start
- Core Concepts
- Installation
- First Steps
- Creating Projects
- Working with Roadmaps
- Chat Threads & Templates
- File Workspace
- Terminal Access
- CLI Management
- Advanced Features
# 1. Install dependencies
pnpm install
# 2. Set up database (optional - uses in-memory store if not configured)
echo "DATABASE_URL=postgresql://user:pass@localhost:5432/nexus" > .env
# 3. Initialize system (creates storage, admin user)
./nexus-cli setup --admin-password admin123
# 4. Start backend
pnpm --filter nexus-backend dev
# 5. Start frontend (in another terminal)
pnpm --filter nexus-frontend dev
# 6. Open browser
# Visit http://localhost:3000
# Login with: admin / admin123
# 7. Create your first project
# Click "+ New Project" in the UI
# Name: "Hello World"
# Category: "Tutorial"
# 8. Create a roadmap
# Click project → "+ New Roadmap"
# Title: "Getting Started"
# 9. Create a chat
# Click roadmap → "+ New Chat"
# Start chatting with the AI!Projects are top-level containers that group related work. Each project has:
- Name - Descriptive title
- Category - Organizational grouping (Development, Research, etc.)
- Status - Current state (active, paused, archived, done)
- Theme - Visual color scheme
- Git Storage - Each project gets its own git repository
Example Use Cases:
- Software development projects
- Research initiatives
- Documentation efforts
- Automation workflows
Roadmaps (called "Roadmap Lists" internally) organize work within a project. Each roadmap contains:
- Title - What this roadmap accomplishes
- Tags - Keywords for filtering/organization
- Progress - 0-100% completion tracking
- Meta-Chat - Special chat that summarizes child chat statuses
- Child Chats - Individual chat threads for specific tasks
Example Roadmap Structure:
Project: "E-Commerce Platform"
├── Roadmap: "Backend API" (80% complete)
│ ├── Chat: "User Authentication"
│ ├── Chat: "Product Catalog"
│ └── Chat: "Payment Integration"
├── Roadmap: "Frontend UI" (45% complete)
│ ├── Chat: "Dashboard Design"
│ └── Chat: "Shopping Cart"
└── Roadmap: "Deployment" (20% complete)
└── Chat: "Docker Setup"
Chats are individual conversation threads with AI assistants. Each chat has:
- Goal - What the chat aims to accomplish
- Status - Current state (idle, in_progress, done, failed)
- Progress - Percentage completion (0-100%)
- Template - Optional template defining AI behavior
- Messages - Conversation history
- Workspace - Dedicated file directory for this chat
Chat Features:
- Real-time AI conversation
- File operations (create, edit, read files)
- Terminal access (run commands)
- Message navigation (jump between user messages)
- Status tracking with JSON protocol
Templates define AI assistant behavior and capabilities. Templates include:
- System Prompt - Instructions for the AI
- Goal - Default chat goal
- JavaScript Logic - Custom status computation
- JSON Required - Whether chat must report structured status
- Metadata - Additional configuration
Example Template:
{
"title": "Code Reviewer",
"goal": "Review code for quality and best practices",
"systemPrompt": "You are an expert code reviewer...",
"javascriptLogic": "context.result.progress = Math.min(100, context.json.linesReviewed / context.json.totalLines * 100);",
"jsonRequired": true
}- Node.js 20+ (for TypeScript, Next.js)
- pnpm 9+ (package manager)
- PostgreSQL 15+ (optional - uses in-memory store if not configured)
- Git (for project storage)
# Clone repository
git clone <your-repo-url>
cd AgentManager
# Install all dependencies
pnpm installCreate .env files:
Backend (.env in project root):
# Database (optional - uses in-memory if not set)
DATABASE_URL=postgresql://user:password@localhost:5432/nexus
# Storage location (optional - defaults to ./apps/backend/data/projects)
PROJECTS_ROOT=/path/to/projects
# Server settings
PORT=3001
HOST=0.0.0.0Frontend (apps/frontend/.env.local):
# Backend API URL
NEXT_PUBLIC_API_URL=http://localhost:3001
# Demo credentials (optional - for auto-login during development)
NEXT_PUBLIC_DEMO_USERNAME=admin
NEXT_PUBLIC_DEMO_PASSWORD=admin123# Create storage directories, initialize database, create admin user
./nexus-cli setup --admin-password your_secure_password
# Verify health
./nexus-cli health# Terminal 1: Start backend
pnpm --filter nexus-backend dev
# Terminal 2: Start frontend
pnpm --filter nexus-frontend dev
# Visit http://localhost:3000Visit http://localhost:3000 and login with:
- Username:
admin - Password: (whatever you set during setup)
Or use keyfile authentication by uploading a token file.
- Click "+ New Project" in the Projects column
- Fill in details:
- Name: "My First Project"
- Category: "Learning"
- Status: "active"
- Click Create
- Click on your new project
- Click "+ New Roadmap" in the Roadmaps column
- Fill in:
- Title: "Getting Started"
- Tags: learning, tutorial
- Click Create
- Click on your new roadmap
- Click "+ New Chat" in the Chats column
- Options:
- Empty Chat - Start from scratch
- From Template - Use a pre-defined template
- Type a message and hit Enter!
- Click "+ New Project" button
- Fill in form:
Name: "Web Scraper Tool" Category: "Development" Status: "active" Description: "Build a web scraping utility" - Click Create
# Projects are created via UI, but CLI can initialize storage
./nexus-cli project list
./nexus-cli project init -i <project-id>By Project Type:
- Development projects: "Frontend", "Backend", "Infrastructure"
- Research projects: "Literature Review", "Experiments", "Analysis"
- Documentation: "User Guide", "API Docs", "Architecture"
By Phase:
- "Phase 1: Planning"
- "Phase 2: Implementation"
- "Phase 3: Testing"
By Feature:
- "Authentication System"
- "Payment Gateway"
- "Reporting Dashboard"
- Select a project
- Click "+ New Roadmap"
- Fill in:
- Title: "Authentication System"
- Tags: backend, security, auth
- Meta-chat is created automatically
The meta-chat is a special chat that:
- Summarizes status of all child chats in the roadmap
- Automatically updates when child chats report status
- Can be used to coordinate multiple chats
- Has no workspace (uses project workspace)
Example Meta-Chat Flow:
1. Create roadmap "API Development"
2. Create child chats: "Auth", "Database", "Endpoints"
3. Each child chat reports JSON status
4. Meta-chat aggregates: "API Development is 65% complete"
Sequential Tasks:
Roadmap: "Deployment Pipeline"
├── Chat 1: "Setup CI/CD" (done ✓)
├── Chat 2: "Configure Staging" (in_progress 75%)
└── Chat 3: "Production Deploy" (idle)
Parallel Workstreams:
Roadmap: "Mobile App"
├── Chat: "iOS Implementation" (in_progress 60%)
├── Chat: "Android Implementation" (in_progress 55%)
└── Chat: "Backend API" (in_progress 80%)
Iterative Development:
Roadmap: "Feature Development"
├── Chat: "Sprint 1" (done ✓)
├── Chat: "Sprint 2" (done ✓)
└── Chat: "Sprint 3" (in_progress 30%)
Empty Chat:
1. Click "+ New Chat"
2. Select "Empty"
3. Enter title and optional goal
4. Start chatting
From Template:
1. Click "+ New Chat"
2. Select "From Template"
3. Choose template (e.g., "Code Reviewer")
4. Template's system prompt and goal are applied
5. Start chatting
- User Messages - Your input
- Assistant Messages - AI responses
- System Messages - Status updates, errors
- Meta Messages - Aggregated status from child chats
- Prev/Next Buttons - Jump between user messages
- Auto-Scroll - Maintains position when at bottom
- Smooth Scrolling - Visual feedback during navigation
Type / to see available commands:
/help- Show all commands/status- Show current chat status and progress/meta- Navigate to parent meta-chat/clear- Clear chat history (local only)
- Rename - Right-click → Rename
- Merge - Right-click → Merge (combine with another chat)
- Open Folder - Right-click → Open Folder (view workspace)
-
Click "Templates" tab in context panel
-
Click "+ Create Template"
-
Fill in basic info:
Title: "Bug Fixer" Goal: "Identify and fix bugs in the codebase" JSON Required: ✓ -
Expand "Advanced" section:
// System Prompt You are an expert debugger. Analyze code, identify bugs, and propose fixes. Always report progress as JSON. // JavaScript Logic (for progress computation) if (context.json.status === 'analyzing') { context.result.progress = 25; } else if (context.json.status === 'fixing') { context.result.progress = 50; } else if (context.json.status === 'testing') { context.result.progress = 75; } else if (context.json.status === 'done') { context.result.progress = 100; } context.result.status = context.json.status;
-
Click Create
When jsonRequired: true, chats must report structured status:
Assistant Response Format:
{
"status": "in_progress",
"progress": 65,
"details": "Implemented authentication, working on authorization"
}JavaScript Logic Context:
// Available in template's javascriptLogic
context.json; // Parsed JSON from assistant
context.result; // Output (modify status/progress)
context.chat; // Chat metadata
context.message; // Current messageStatus Values:
idle- Not startedin_progress- Workingdone- Completed successfullyfailed- Encountered error
Each chat has a dedicated workspace directory for file operations.
/data/projects/
└── <project-id>/
└── roadmaps/
└── <roadmap-id>/
└── chats/
└── <chat-id>/
├── chat.json # Chat metadata
├── messages.jsonl # Message history
└── workspace/ # File workspace ← THIS
├── file1.txt
├── script.py
└── data/
└── output.csv
- Click "Code" tab in main panel
- View file tree on left
- Click file to view/edit
- Click "Save" to write changes
Read File:
You: Can you read config.json?
AI: [reads workspace/config.json]
Write File:
You: Create a Python script that processes data
AI: [creates workspace/data_processor.py]
Edit File:
You: Update the API endpoint in server.js
AI: [modifies workspace/server.js]
Directory Operations:
You: Create a data/ directory with sample CSVs
AI: [creates workspace/data/ with files]
When files are modified:
- Click "Diff" tab
- View color-coded changes:
- 🟢 Green = additions
- 🔴 Red = deletions
- 🔵 Blue = headers
Each chat can access a persistent terminal session in the workspace directory.
- Click "Terminal" tab in main panel
- Terminal automatically starts in chat workspace
- Type commands and hit Enter
- Session persists until closed or timeout (15 min default)
- Full xterm.js terminal - VT100 compatible
- WebSocket connection - Real-time output
- Persistent sessions - Survives page refresh
- Workspace CWD - Starts in chat workspace directory
- Idle timeout - Closes after 15 minutes (configurable)
Run Tests:
$ pytest tests/
$ npm testBuild Project:
$ npm run build
$ cargo build --releaseInstall Dependencies:
$ pip install -r requirements.txt
$ npm installGit Operations:
$ git init
$ git add .
$ git commit -m "Initial commit"⚠️ No sudo access by default⚠️ Sandboxed to workspace (chat can escape via cd ..)⚠️ Audit logging - All commands logged⚠️ Session timeout - Auto-closes idle terminals
Project Nexus includes a powerful CLI tool for system administration.
The CLI is already available as ./nexus-cli in the project root:
# Check installation
./nexus-cli --help
./nexus-cli --version
# For system-wide access
ln -s "$(pwd)/nexus-cli" ~/.local/bin/nexus-cliSystem Setup:
# Initialize everything
./nexus-cli setup --admin-password secret123
# Check health
./nexus-cli healthUser Management:
# Create users
./nexus-cli user create -u alice -p pass123 --admin
./nexus-cli user create -u developer -p dev123
# List users
./nexus-cli user list
# Change password
./nexus-cli user password -u alice -p newpass
# Delete user
./nexus-cli user delete -u olduser --forceProject Management:
# List projects
./nexus-cli project list
# Initialize git storage for project
./nexus-cli project init -i proj-abc123
# Backup project
./nexus-cli project export -i proj-abc123 -o backup.bundle
# Restore project
./nexus-cli project import -i proj-restored -b backup.bundleStorage Management:
# View storage info
./nexus-cli storage info
# Find orphaned directories
./nexus-cli storage cleanup --dry-run
# Clean up
./nexus-cli storage cleanup --forceFor complete CLI documentation, see CLI.md.
Every project is a git repository with automatic version control:
Directory Structure:
/data/projects/<project-id>/
├── .git/ # Full git repo
├── .gitignore # Excludes workspace/
├── project.json # Project metadata
├── roadmaps/
│ └── <roadmap-id>/
│ ├── roadmap.json
│ ├── meta-chat.json
│ └── chats/
│ └── <chat-id>/
│ ├── chat.json
│ ├── messages.jsonl
│ └── workspace/ # Gitignored
└── templates/
└── <template-id>.json
Automatic Commits:
- Every chat/roadmap/template update creates a commit
- Message updates append to JSONL (atomic writes)
- Full audit trail via git log
Version Control Operations:
# View project history
cd /data/projects/<project-id>
git log --oneline
# Create snapshot
./nexus-cli project export -i <id> -o snapshot.bundle
# View specific commit
git show <commit-sha>
# Diff between commits
git diff <sha1> <sha2>Login Methods:
- Password - Traditional username/password
- Keyfile - Token file authentication
Session Management:
- 7-day session expiry
- Automatic session cleanup (every 15 minutes)
- Rate limiting (5 failed attempts = 2min lockout)
Password Security:
- PBKDF2 hashing (120,000 iterations)
- SHA256 digest
- Salt per password
Audit Logging:
- All file operations logged
- Terminal commands recorded
- User actions tracked
- IP address captured
Manual Backup:
# Export single project
./nexus-cli project export -i proj-abc -o backup.bundle
# Backup all projects
for id in $(./nexus-cli project list | tail -n +4 | awk '{print $1}'); do
./nexus-cli project export -i "$id" -o "backup-$id.bundle"
doneAutomated Backup Script:
#!/bin/bash
# backup.sh
DATE=$(date +%Y-%m-%d)
BACKUP_DIR="backups/$DATE"
mkdir -p "$BACKUP_DIR"
./nexus-cli project list | tail -n +4 | awk '{print $1}' | while read id; do
echo "Backing up $id..."
./nexus-cli project export -i "$id" -o "$BACKUP_DIR/$id.bundle"
done
echo "Backup complete: $BACKUP_DIR"Restore:
# Import project
./nexus-cli project import -i proj-restored -b backup.bundle
# Register in database (via UI)
# Open UI → Create Project → Use ID: proj-restoredProduction Checklist:
- Set strong DATABASE_URL
- Configure PROJECTS_ROOT for persistent storage
- Set secure admin password
- Disable demo credentials (remove NEXTPUBLIC_DEMO*)
- Enable HTTPS
- Configure firewall rules
- Set up automated backups
- Enable audit logging
- Review security settings
Environment Variables:
# .env (production)
DATABASE_URL=postgresql://nexus:secure_pass@db:5432/nexus_prod
PROJECTS_ROOT=/var/lib/nexus/projects
PORT=3001
HOST=0.0.0.0
NODE_ENV=productionDocker Deployment (planned):
docker-compose up -d- README.md - Project overview
- USAGE.md - This guide (usage patterns)
- CLI.md - CLI tool documentation
- API_CONTRACTS.md - API reference
- TASKS.md - Development roadmap
Backend won't start:
# Check database connection
./nexus-cli health
# View logs
pnpm --filter nexus-backend devFrontend won't start:
# Check backend is running
curl http://localhost:3001/health
# View Next.js logs
pnpm --filter nexus-frontend devCan't login:
# Reset admin password
./nexus-cli user password -u admin -p newpass123
# List users
./nexus-cli user listStorage issues:
# Check storage health
./nexus-cli storage info
# Clean up orphaned data
./nexus-cli storage cleanup --dry-run
./nexus-cli storage cleanup --forceFor bugs, feature requests, or questions, please contact your system administrator or refer to the project repository.
- Read CLI.md for detailed CLI usage
- Check TASKS.md for upcoming features
- Review API_CONTRACTS.md for API integration
- Explore templates in the UI
- Create your first automated workflow
Happy building! 🚀