PeraltaCC Deployment Guide
PeraltaCC Deployment Guide
Complete guide to installing, configuring, and deploying PeraltaCC for development, staging, and production environments.
Deployment Paths
Choose your deployment environment:
1. Local Development
Best for: Feature development, testing, debugging
Time: 5 minutes
Complexity: Low
2. Feature Branch (Staging)
Best for: Proposal development, GitBook integration testing
Time: 10 minutes
Complexity: Low
3. Production (Main)
Best for: Final proposal submission, distribution
Time: 15 minutes
Complexity: Medium
Pre-Deployment Checklist
Before starting deployment, verify:
System Requirements
- Node.js 18.0.0 or higher installed
- npm 8.0.0 or higher installed
- Git installed and configured
- GitHub access configured
- 500MB free disk space
Access & Permissions
- Repository clone access
- GitHub branch creation permission
- GitBook workspace access (if using documentation)
- npm package permissions
Configuration
-
.npmignoreconfigured correctly - Environment variables defined
- GitHub Actions workflows configured
- GitBook Git Sync settings ready
Installation Steps
Step 1: Clone Repository
# Clone the PeraltaCC repositorygit clone https://github.com/Fused-Gaming/PeraltaCC.gitcd PeraltaCC
# Verify you're on the correct branchgit branch -aStep 2: Install Dependencies
# Install npm packagesnpm install
# Verify installationnpm list --depth=0Step 3: Development Setup
# Create feature branch for your workgit checkout -b feature/your-feature-name
# Verify development setupnpm testnpm run lintDevelopment Workflow
Start Development Server
# Start the applicationnpm start
# Expected output:# > PeraltaCC@1.0.0 start# > node src/index.jsRun Tests
# Run all testsnpm test
# Run tests in watch modenpm test -- --watch
# Generate coverage reportnpm test -- --coverageCode Quality
# Run linternpm run lint
# Fix linting issuesnpm run lint:fix
# Format codenpm run formatStaging Deployment (Feature Branch)
Feature Branch Workflow
# Create and switch to feature branchgit checkout -b feature/your-proposal
# Make your changesgit add .git commit -m "feat: your proposal description"
# Push to remotegit push -u origin feature/your-proposalGitHub Actions Validation
The repository automatically runs:
- Linting checks
- Unit tests
- Documentation validation
- Quality gates
View results:
- GitHub Actions tab → Select your workflow
- Review test results and logs
GitBook Integration (Optional)
# If using GitBook Git Sync:# 1. Push changes to feature/gitbook branchgit checkout -b feature/gitbookgit push -u origin feature/gitbook
# 2. GitBook automatically syncs# 3. Review at: https://your-gitbook-space.gitbook.io
# 4. Make edits in GitBook web editor# 5. Sync back to repository (automatic)Production Deployment
Merge to Main
# Switch to main branchgit checkout maingit pull origin main
# Merge feature branch (via PR recommended)git merge feature/your-proposal
# Push to productiongit push origin mainQuality Gate Validation
Before production merge, ensure:
- ✅ All tests passing
- ✅ Linting checks passed
- ✅ Documentation complete
- ✅ All tasks (1-6) completed
- ✅ Certifications attached
- ✅ Review approvals received
PDF Generation & Distribution
# Generate PDF export (if GitBook connected)# 1. Go to GitBook space# 2. Share menu → PDF export# 3. Download and distribute
# Or use Vercel (if configured)# Preview URL: https://your-vercel-domain.vercel.appEnvironment Configuration
Environment Variables
Create .env file in project root:
# DevelopmentNODE_ENV=developmentDEBUG=trueLOG_LEVEL=debug
# ProductionNODE_ENV=productionDEBUG=falseLOG_LEVEL=error
# Claude Flow (if using API)CLAUDE_FLOW_API_KEY=your_api_keyCLAUDE_FLOW_ENDPOINT=https://api.claude-flow.example.com
# GitBook (optional)GITBOOK_SPACE_ID=your_space_idGITBOOK_API_KEY=your_gitbook_api_keyPackage Configuration
Edit package.json scripts as needed:
{ "scripts": { "start": "node src/index.js", "test": "jest", "lint": "eslint .", "format": "prettier --write .", "build": "npm run lint && npm run test", "pretest": "npm run lint", "posttest": "npm run format" }}Post-Deployment Validation
Verify Installation
# Check all dependencies installednpm list --depth=0
# Verify key files presentls -la docs/addendum-bid/ls -la docs/gitbook/
# Check configurationcat package.json | grep versionTest Functionality
# Run testsnpm test
# Check documentation buildsnpm run docs:build
# Verify quality gatesnpm run validateManual Verification
- Application starts without errors
- All tests pass
- Linting issues resolved
- Documentation accessible
- GitBook sync working (if configured)
- GitHub Actions passing
- Proposal artifacts present
Troubleshooting
Dependency Issues
# Clear npm cache and reinstallnpm cache clean --forcerm -rf node_modules package-lock.jsonnpm installPermission Errors
# Fix permission issues on macOS/Linuxsudo chown -R $USER:$USER ~/.npmsudo chown -R $USER:$USER .
# Or use npm ci instead of npm installnpm ciGit Sync Issues (GitBook)
# Check Git statusgit statusgit log --oneline -5
# If sync is stuck, reset to remotegit fetch origingit reset --hard origin/feature/gitbookTest Failures
# Run tests with verbose outputnpm test -- --verbose
# Run specific test filenpm test -- path/to/test.js
# Update snapshots if needednpm test -- -uScaling & Advanced Deployment
Docker Deployment (Optional)
If you need containerization:
FROM node:18-alpineWORKDIR /appCOPY package*.json ./RUN npm ci --only=productionCOPY . .EXPOSE 3000CMD ["npm", "start"]Build and run:
docker build -t peraltacc:latest .docker run -p 3000:3000 peraltacc:latestVercel Deployment (Optional)
If using Vercel for static docs:
# Install Vercel CLInpm i -g vercel
# Deployvercel
# Production deploymentvercel --prodContinuous Deployment
GitHub Actions automatically:
- Runs tests on every push
- Generates documentation
- Creates preview builds
- Validates quality gates
- Updates GitBook (if configured)
Rollback Procedures
Quick Rollback
# If something breaks on maingit revert HEADgit push origin mainFull Rollback to Previous Version
# Find previous commitgit log --oneline -10
# Reset to previous stategit reset --hard commit-hashgit push origin main --force-with-leaseNext Steps
- Complete Installation - Follow the Installation Steps above
- Create Feature Branch - Start your proposal work
- Run Tests - Ensure everything works:
npm test - Make Changes - Develop your proposals and deliverables
- Submit PR - Create pull request with quality gates passing
- Merge to Main - Final submission to production
Support
For deployment issues:
- Check GitHub Actions logs
- Review error messages carefully
- Verify all prerequisites met
- Check documentation
- Open a GitHub issue with details