Powernode Platform - Developer Quick Start Guide
Get the Powernode platform running locally in under 10 minutes.
Requirement
Version
Verify Command
Node.js
20+
node --version
Ruby
3.3+
ruby --version
PostgreSQL
16+
psql --version
Redis
7+
redis-server --version
Docker
24+
docker --version
1. Clone and Install Dependencies
# Clone the repository
git clone https://github.com/your-org/powernode-platform.git
cd powernode-platform
# Install dependencies
cd server && bundle install
cd ../frontend && npm install
cd ../worker && bundle install
cd ..
# Setup database
cd server && bundle exec rails db:create db:migrate db:seed
2. Install and Start All Services
# Install systemd services (one-time)
sudo scripts/systemd/powernode-installer.sh install
# Start everything
sudo systemctl start powernode.target
# Check status
sudo scripts/systemd/powernode-installer.sh status
3. Access the Application
Create a test user:
cd server && bundle exec rails c
User.create! (email: ' dev@example.com' , password: ' DevPassword123!' , name: ' Developer' )
# Backend tests
cd server && pkill -f rspec 2> /dev/null; bundle exec rspec --format progress
# Frontend tests
cd frontend && CI=true npm test
# E2E tests (Playwright)
cd frontend && npx playwright test
# Type checking
cd frontend && npx tsc --noEmit
File
Purpose
config/routes.rb
API route definitions
app/controllers/api/v1/
API controllers
app/models/
ActiveRecord models
app/services/
Business logic services
spec/
RSpec test files
File
Purpose
src/App.tsx
Main application entry
src/pages/app/
Application pages
src/features/
Feature modules
src/shared/
Shared components and utilities
tailwind.config.js
Tailwind CSS configuration
File
Purpose
app/jobs/
Background job classes
config/sidekiq.yml
Sidekiq configuration
Add route in server/config/routes.rb
Create controller in server/app/controllers/api/v1/
Use standard response helpers:
render_success ( data : { ... } )
render_error ( message : 'Error' , status : :bad_request )
Add tests in server/spec/requests/
Create page in frontend/src/pages/app/
Add route in frontend/src/App.tsx
Use PageContainer for consistent layout:
< PageContainer title = "Page Title" breadcrumbs = { [ ...] } >
{ /* Page content */ }
</ PageContainer >
Create job in worker/app/jobs/
Inherit from BaseJob and implement execute:
class MyJob < BaseJob
sidekiq_options queue : 'default'
def execute ( param )
# Job logic
end
end
Queue from backend via API call
Run before committing:
# Full quality check
./scripts/pre-commit-quality-check.sh
# Individual checks
./scripts/quick-pattern-check.sh # Fast pattern validation
./scripts/fix-hardcoded-colors.sh # Fix theme violations
./scripts/cleanup-all-console-logs.sh # Remove console.log
powernode-platform/
├── server/ # Rails 8 API backend
│ ├── app/
│ │ ├── controllers/api/v1/ # API endpoints
│ │ ├── models/ # ActiveRecord models
│ │ └── services/ # Business logic
│ └── spec/ # RSpec tests
│
├── frontend/ # React TypeScript frontend
│ ├── src/
│ │ ├── features/ # Feature modules
│ │ ├── pages/ # Page components
│ │ └── shared/ # Shared utilities
│ └── e2e/ # E2E tests (Playwright)
│
├── worker/ # Sidekiq background jobs
│ └── app/jobs/ # Job classes
│
├── docs/ # Documentation
├── scripts/ # Development scripts
└── docker/ # Docker configurations
# Check logs for errors
journalctl -u powernode-backend@default --since " 5 min ago" --no-pager
# Reset failed state and restart
sudo systemctl reset-failed ' powernode-*'
sudo systemctl start powernode.target
cd server
bundle exec rails db:reset # WARNING: Drops and recreates DB
bundle exec rails db:migrate
cd frontend
rm -rf node_modules
npm install
npm run typecheck
# Check Redis is running
redis-cli ping
# Should return: PONG
Internal docs : See /docs/ directory
Specialist guides : See /docs/backend/, /docs/frontend/
Architecture decisions : See /docs/platform/