TaskPulse Version: v1.2.0
Admin Guide Version: v1.2.0
Last Updated: 2026-02-13
This guide provides complete setup, deployment, and management instructions for TaskPulse administrators and developers.
- System Prerequisites
- Installation
- Configuration
- Running TaskPulse
- Team System
- User and Bot Management
- Management Scripts
- Database Management
- Testing
- Deployment
- Monitoring
- Backup and Maintenance
- Troubleshooting
- Node.js v16.0 or higher (v18+ recommended)
- npm v8.0 or higher
- curl (for API testing)
- jq (optional, for JSON parsing)
- PM2 (for production process management)
- Docker (for containerized deployment)
- Nginx (for reverse proxy and SSL)
- PostgreSQL/MySQL (alternatives to SQLite)
# Check Node.js version
node --version
# Check npm version
npm --version
# Check curl
curl --version
# Check jq (optional)
jq --versiongit clone https://github.com/najef1979-code/TaskPulse.git
cd TaskPulsecd server
# Install dependencies
npm install
# Initialize database
node init-db.js
# Configure environment
cp .env.example .env
# Edit .env with your settings (default values work for development)cd ../client
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your settings (default values work for development)# Database
DB_PATH=./taskpulse.db
# Server
PORT=3000
NODE_ENV=development
# Authentication
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production# API URL
VITE_API_URL=http://localhost:3000/api
# Application
VITE_APP_NAME=TaskPulse
NODE_ENV=developmentBy default, TaskPulse allows users to register new accounts through the web interface. Administrators can disable public registration and manage user accounts directly.
Environment Variable (client/.env):
# Allow new user registration
# Set to 'true' to enable registration link on login page
# Set to 'false' to hide registration (admin creates accounts)
VITE_ALLOW_REGISTRATION=trueWhen Registration is Disabled (VITE_ALLOW_REGISTRATION=false):
- "Create one" link is hidden from the login page
- New users cannot self-register
- Only administrators can create new user accounts (using the user CLI)
- Useful for:
- Private/team-only deployments
- Controlled onboarding processes
- Security-sensitive environments
When Registration is Enabled (VITE_ALLOW_REGISTRATION=true):
- "Create one" link is shown on the login page
- Users can register their own accounts
- Users must provide or create a team during registration
- Default setting for most deployments
Creating Users When Registration is Disabled:
Use the user CLI to create accounts:
cd server
node user-cli.jsSelect option 1 (Register new human user) and provide:
- Username (required)
- Email (required)
- Password (required)
- Full Name (optional)
- Team Name (required for users to work with projects/tasks)
Note: This setting is client-side only. The API still accepts registration requests, but the UI hides the option. For complete security, implement server-side validation if needed.
- Backend API: Default 3000 (change in
server/.env) - Frontend: Default 3050 (change in
client/vite.config.js)
TaskPulse uses SQLite by default for simplicity. The database file is created automatically at server/taskpulse.db.
To use PostgreSQL or MySQL:
- Install the appropriate driver (
pgormysql2) - Modify
server/lib/database.jsto use your preferred database - Update connection string in
.env
./taskpulse-runner.shThis script:
- Stops any existing servers
- Starts backend on port 3000
- Starts frontend on port 3050
- Performs health checks
- Runs integration tests
Backend:
cd server
npm startFrontend:
cd client
npm run dev# Start backend
cd server
pm2 start server.js --name "taskpulse-backend"
# Start frontend
cd client
pm2 start "npm run dev" --name "taskpulse-frontend"TaskPulse uses a team-based system where all users must belong to a team to create and view projects and tasks.
- Added
teamstable for team management - Added
team_requeststable for join requests - Added
team_idandcreated_bycolumns toprojectstable - Added
team_idandcreated_bycolumns totaskstable - Added
team_idandis_team_admincolumns touserstable
- All project and task endpoints now require
teamIdfrom authenticated user - Users without a team cannot view/create projects or tasks
- Returns 403 error if user is not in a team
cd server
node migrate-to-teams.jsThis will:
- Create teams table
- Create team_requests table
- Add team_id and created_by columns to projects
- Add team_id and created_by columns to tasks
- Add team_id and is_team_admin columns to users
- Create necessary indexes
Use the user CLI:
cd server
node user-cli.jsSelect option 1 to register a new human user. You'll be prompted for:
- Username
- Password
- Full Name (optional)
- Team Name (required for users to work with projects/tasks)
The first user you create should include a team name. This user will be team admin.
If you have existing projects and tasks:
node migrate-existing-data.jsThis script will:
- List available human users
- Ask you to select a user (must be in a team)
- Show how many projects/tasks will be migrated
- Ask for confirmation
- Migrate all projects and tasks to the selected user's team
- Teams are collections of users working together
- Each team has a creator (the team admin)
- Team admins can approve/reject join requests
- Team admins can remove members from the team
- Each user belongs to exactly one team
- Users without a team cannot view/create projects or tasks
- Bots inherit their team membership from their owner
- All projects belong to a team
- All tasks belong to a team
- Users can only see projects/tasks from their own team
- Projects and tasks have:
team_id: The team they belong toowner_id: The user who owns themcreated_by: The user who created them (for bots, this is the human who triggered the action)
- Bots inherit their team from their owner
- Bot API tokens include team_id in the authenticated user object
- Bots can only create/view projects/tasks in their owner's team
node user-cli.js
# Select 1 (Register new human user)
# Enter: username: alice
# Enter: email: alice@example.com
# Enter: password: securepassword
# Enter: Full Name: Alice Smith
# Enter: Team Name: Engineering TeamResult: Alice is created and becomes admin of "Engineering Team"
node user-cli.js
# Select 2 (Create new bot)
# Enter: Owner Username: alice
# Enter: Bot Name: TaskBot
# Enter: Permissions: read,create_tasks,update_tasksResult: TaskBot is created and added to Alice's team
node migrate-existing-data.js
# Select user with a team
# Confirm migrationResult: All projects and tasks are assigned to the selected user's team
This means the user is not in a team. Use the user CLI to:
- Create a team for the user (if user should be team admin)
- Add user to existing team (requires team admin)
This occurs when trying to create projects/tasks without a team_id. Ensure:
- User is logged in and has a team_id
- Authentication is working correctly
- Session/token is valid
After migration, ensure:
- The user who migrated the data is logged in
- The user is in the same team the data was migrated to
- Restart the server to clear any cached data
The user CLI (server/user-cli.js) provides the following options:
- Register new human user - Create a human user (optionally with a team)
- Create new bot - Create a bot and add it to your team
- List all users - View all human users
- List bots - View all bots (optionally filter by owner)
- Reset user password - Reset a human user's password
- Regenerate bot token - Generate a new API token for a bot
- Remove human user - Remove a human user (transfers their content)
- Remove bot - Remove a bot (transfers or clears their content)
cd server
node user-cli.jsSelect option 1 and provide:
- Username (required)
- Email (required)
- Password (required)
- Full Name (optional)
- Team Name (required for users to work with projects/tasks)
cd server
node user-cli.jsSelect option 2 and provide:
- Owner Username (required)
- Bot Name (required)
- Permissions (comma-separated, optional)
Bot Permissions:
read- Read projects and taskscreate_projects- Create projectscreate_tasks- Create tasksupdate_tasks- Update tasksdelete_tasks- Delete tasks
cd server
node user-cli.jsSelect option 5 and provide:
- Username (required)
- New Password (required)
cd server
node user-cli.jsSelect option 6 and provide:
- Bot ID (required)
The bot token will be regenerated and displayed. Make sure to save it securely.
Starts both servers, performs health checks, and runs integration tests.
# Start servers and run all tests
./taskpulse-runner.sh
# Start servers only (skip tests)
./taskpulse-runner.sh --no-test
# Run tests only (servers must already be running)
./taskpulse-runner.sh --test-only- Stops existing servers - Kills any processes on ports 3000 and 3050
- Starts backend server - Launches Express API on port 3000
- Starts frontend server - Launches Vite dev server on port 3050
- Health checks - Waits up to 30 seconds for each server to become responsive
- Integration tests (unless
--no-testis used):- Creates a demo project
- Creates a demo task
- Changes task status: pending → in-progress → done → pending
- Deletes the task
- Deletes the project
- Reports status - Shows URLs and process IDs
Stops both backend and frontend servers.
./stop-all.shShows the current status of both servers.
./status.sh======================================
TaskPulse Server Status
======================================
Backend (port 3000): RUNNING
Health: OK
URL: http://localhost:3000
API: http://localhost:3000/api
Frontend (port 3050): RUNNING
Health: OK
URL: http://localhost:3050
Process Status:
Backend PID: 12345
Frontend PID: 12346
Restarts only the backend server with proper cleanup.
./restart-server.sh- Primary DB:
server/taskpulse.db - Backups:
server/backups/taskpulse_YYYYMMDD_HHMMSS.db
cd server
./backup-db.shThis creates a timestamped backup in server/backups/.
cd server
cp backups/taskpulse_YYYYMMDD_HHMMSS.db taskpulse.dbcd server
sqlite3 taskpulse.dbCommon queries:
-- List all users
SELECT id, username, full_name, team_id FROM users;
-- List all projects
SELECT id, name, status, team_id FROM projects;
-- List all tasks
SELECT id, title, status, priority, project_id, team_id FROM tasks;
-- List all teams
SELECT id, name, created_by FROM teams;curl http://localhost:3000/healthExpected response:
{"status":"ok","timestamp":"2026-02-11T..."}curl http://localhost:3000/api./taskpulse-runner.sh# Health check
curl http://localhost:3000/health
# List projects (with bot token)
curl http://localhost:3000/api/projects \
-H "x-api-token: bot_YOUR_TOKEN"
# Create task
curl -X POST http://localhost:3000/api/tasks \
-H "x-api-token: bot_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"projectId":1,"title":"Test Task"}'server/.env:
NODE_ENV=production
PORT=3000
JWT_SECRET=<secure-random-string>
DB_PATH=/var/lib/taskpulse/taskpulse.dbclient/.env:
VITE_API_URL=https://yourdomain.com/api
VITE_APP_NAME=TaskPulse
NODE_ENV=productioncd client
npm run build
# Output in client/dist/# Install PM2 globally
npm install -g pm2
# Start backend
cd server
pm2 start server.js --name "taskpulse-backend" --env production
# Serve frontend (using simple HTTP server)
cd client
npm install -g serve
pm2 start "serve -s dist -l 3050" --name "taskpulse-frontend"server {
listen 80;
server_name yourdomain.com;
# API backend
location /api {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
# Frontend
location / {
proxy_pass http://localhost:3050;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}Use Let's Encrypt with certbot:
sudo certbot --nginx -d yourdomain.comCreate docker-compose.yml:
version: '3.8'
services:
backend:
build: ./server
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
volumes:
- taskpulse-data:/app/data
frontend:
build: ./client
ports:
- "3050:80"
depends_on:
- backend
volumes:
taskpulse-data:Run with:
docker-compose up -dTaskPulse includes built-in monitoring features:
- Request logging - All API requests are logged with user context
- Error tracking - Errors are logged with stack traces
- Health checks -
/healthendpoint provides status - Performance metrics - Track response times (see
client/src/utils/performance.js)
server.log- Backend server outputclient.log- Frontend server outputstartup.log- Combined startup and test logs
# Follow backend logs
tail -f server.log
# Follow frontend logs
tail -f client.log
# Follow startup logs
tail -f startup.logConsider integrating with:
- Sentry - Error tracking and monitoring
- New Relic - Application performance monitoring
- Prometheus + Grafana - Metrics and visualization
- Loggly / Papertrail - Log aggregation
Set up a cron job for daily backups:
# Edit crontab
crontab -e
# Add daily backup at 2 AM
0 2 * * * cd /path/to/TaskPulse/server && ./backup-db.shcd server
node cleanup-orphaned-data.jsThis script:
- Finds subtasks without parent tasks
- Finds tasks without parent projects
- Prompts for cleanup
The server automatically cleans expired sessions every hour (via cron job).
Set up log rotation to prevent logs from growing too large:
# Create logrotate config
sudo nano /etc/logrotate.d/taskpulseContent:
/path/to/TaskPulse/*.log {
daily
rotate 7
compress
delaycompress
missingok
notifempty
}
# Check what's using the ports
lsof -ti:3000
lsof -ti:3050
# Kill the processes
kill -9 <PID>
# Or use the stop script
./stop-all.sh-
Check logs:
tail -50 server.log tail -50 client.log
-
Check dependencies:
cd server && npm install cd ../client && npm install
-
Verify Node.js is installed:
node --version npm --version
-
Check for syntax errors:
cd server && node server.js cd ../client && npm run dev
# Stop server
./stop-all.sh
# Check for lock files
ls -la server/*.db-*
# Remove lock files
rm server/*.db-*
# Restart server
./taskpulse-runner.sh --no-test# Restore from backup
cd server
cp backups/taskpulse_YYYYMMDD_HHMMSS.db taskpulse.db
# Or attempt repair
sqlite3 taskpulse.db ".recover" | sqlite3 taskpulse_recovered.db- Ensure user is in a team (see Team System section)
- Check that authentication is working correctly
- Verify team_id is not null in the database
- Check the API endpoint is correct
- Verify the resource exists in the database
- Check server logs for more details
- Check server logs for stack traces
- Verify database is accessible
- Check for missing environment variables
-
Check database indexes:
PRAGMA index_list('tasks'); PRAGMA index_list('projects');
-
Consider adding indexes for frequently queried columns
-
Check server resources:
top htop
- Clear browser cache
- Check browser console for errors
- Verify API is responding quickly
- Consider enabling code splitting
For additional help:
- Check the logs in
server.logandclient.log - Review this documentation
- Check the API Documentation
- Check the User Guide
- Create an issue on GitHub