borderlessbits.com

BorderlessBits.com

Professional cloud architecture and healthcare software consulting website with enterprise-grade CI/CD pipeline.

CI/CD Pipeline Security Scan Lighthouse Performance Uptime

๐Ÿš€ Quick Start

Prerequisites

Local Development

# Clone repository
git clone https://github.com/username/borderlessbits.com.git
cd borderlessbits.com

# Install dependencies
npm install

# Setup environment
cp .env.example .env.local
# Edit .env.local with your configuration

# Start development server
npm run dev

Open http://localhost:3000 to view the application.

Docker Development

# Start with Docker Compose
docker-compose up

# Production preview
docker-compose --profile production up

๐Ÿ—๏ธ Architecture

Technology Stack

Zero-Cost Hosting Strategy

๐Ÿ“‹ Features

๐ŸŽฏ Core Features

๐Ÿ”’ Security Features

๐Ÿš€ CI/CD Pipeline

๐Ÿšฆ Development Workflow

Branch Strategy

main           โ† Production deployments (https://borderlessbits.com)
develop        โ† Staging deployments (https://staging.borderlessbits.com)
feature/*      โ† Preview deployments (https://preview-pr-{number}.netlify.app)
hotfix/*       โ† Emergency production fixes

Available Scripts

Development:

npm run dev          # Start development server
npm run build        # Production build
npm run start        # Start production server
npm run preview      # Preview production build locally

Quality & Testing:

npm run lint         # Run ESLint
npm run lint:fix     # Fix ESLint issues
npm run type-check   # TypeScript validation
npm run format       # Format code with Prettier
npm run format:check # Check formatting
npm run test         # Run Jest tests
npm run test:coverage # Test coverage report
npm run validate-build # Full validation pipeline

Performance & Analysis:

npm run analyze      # Bundle analysis
npm run lighthouse   # Lighthouse audit
npm run lighthouse:ci # Lighthouse CI validation

Deployment:

./scripts/deploy.sh              # Deploy to production
./scripts/deploy.sh -e staging   # Deploy to staging
./scripts/deploy.sh -d           # Dry run deployment
./scripts/rollback.sh            # Emergency rollback
./scripts/rollback.sh -l         # List available backups

๐Ÿ“ Project Structure

โ”œโ”€โ”€ .github/
โ”‚   โ”œโ”€โ”€ workflows/           # GitHub Actions CI/CD
โ”‚   โ”‚   โ”œโ”€โ”€ ci.yml          # Continuous Integration
โ”‚   โ”‚   โ”œโ”€โ”€ deploy-production.yml
โ”‚   โ”‚   โ”œโ”€โ”€ deploy-staging.yml
โ”‚   โ”‚   โ”œโ”€โ”€ preview-deploy.yml
โ”‚   โ”‚   โ”œโ”€โ”€ security-scan.yml
โ”‚   โ”‚   โ””โ”€โ”€ monitoring.yml
โ”‚   โ””โ”€โ”€ ISSUE_TEMPLATE/     # Issue templates
โ”œโ”€โ”€ docs/                   # Documentation
โ”‚   โ”œโ”€โ”€ CI-CD-PIPELINE.md
โ”‚   โ”œโ”€โ”€ DEPLOYMENT-GUIDE.md
โ”‚   โ”œโ”€โ”€ SECURITY.md
โ”‚   โ””โ”€โ”€ ARCHITECTURE.md
โ”œโ”€โ”€ scripts/                # Deployment scripts
โ”‚   โ”œโ”€โ”€ deploy.sh          # Main deployment script
โ”‚   โ”œโ”€โ”€ rollback.sh        # Rollback script
โ”‚   โ”œโ”€โ”€ setup-secrets.sh   # GitHub secrets setup
โ”‚   โ””โ”€โ”€ monitoring/
โ”œโ”€โ”€ src/                   # Source code
โ”‚   โ”œโ”€โ”€ app/              # Next.js app directory
โ”‚   โ”œโ”€โ”€ components/       # React components
โ”‚   โ”œโ”€โ”€ lib/             # Utilities and libraries
โ”‚   โ”œโ”€โ”€ styles/          # Global styles
โ”‚   โ””โ”€โ”€ types/           # TypeScript definitions
โ”œโ”€โ”€ src/                   # Source code
โ”œโ”€โ”€ content/            # Markdown content
โ”œโ”€โ”€ public/             # Static assets
โ”œโ”€โ”€ docker/             # Docker configurations
โ”œโ”€โ”€ next.config.js      # Next.js configuration
โ”œโ”€โ”€ lighthouserc.json   # Lighthouse CI configuration
โ””โ”€โ”€ package.json        # Dependencies and scripts

๐Ÿ”ง Configuration

Environment Variables

Required for Production:

NEXT_PUBLIC_SITE_URL=https://borderlessbits.com
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX
NEXT_PUBLIC_EMAILJS_SERVICE_ID=service_xxxxxxx
NEXT_PUBLIC_EMAILJS_TEMPLATE_ID=template_xxxxxxx
NEXT_PUBLIC_EMAILJS_PUBLIC_KEY=xxxxxxxxxx

Required for Deployment:

NETLIFY_AUTH_TOKEN=nfp_xxxxxxxxxx
NETLIFY_SITE_ID=xxxxxxxx-xxxx-xxxx-xxxx
GITHUB_TOKEN=ghp_xxxxxxxxxx

See .env.example for complete configuration options.

GitHub Secrets Setup

# Interactive setup
./scripts/setup-secrets.sh -t $GITHUB_TOKEN -r username/repository

# List current secrets
./scripts/setup-secrets.sh -t $GITHUB_TOKEN -r username/repository -l

Required GitHub Secrets:

๐Ÿš€ Deployment

Automatic Deployment

Manual Deployment

# Deploy to all targets
./scripts/deploy.sh

# Deploy to specific environment
./scripts/deploy.sh -e staging -t netlify

# Force deployment (skip validations)
./scripts/deploy.sh -f

# Dry run (preview changes)
./scripts/deploy.sh -d

Rollback Procedures

# Emergency rollback
./scripts/rollback.sh -y

# List available backups
./scripts/rollback.sh -l

# Rollback to specific version
./scripts/rollback.sh -b backup-20231201-143022

๐Ÿ“Š Monitoring

Health Monitoring

Performance Budgets

Monitoring Endpoints

๐Ÿ”’ Security

Security Features

Security Scanning

Incident Response

๐Ÿงช Testing

Test Types

Test Commands

npm run test              # Unit tests
npm run test:performance  # Performance tests
npm run test:security     # Security tests

Test Coverage

๐Ÿ“š Documentation

๐Ÿค Contributing

  1. Fork the Repository
  2. Create Feature Branch: git checkout -b feature/amazing-feature
  3. Make Changes: Follow coding standards and add tests
  4. Run Quality Checks: npm run validate-build
  5. Commit Changes: git commit -m 'Add amazing feature'
  6. Push to Branch: git push origin feature/amazing-feature
  7. Open Pull Request: Include description and testing notes

Code Quality Standards

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

Documentation & Resources

Contact

Emergency Support


๐ŸŒŸ Acknowledgments

Built with โค๏ธ by Richard Mosley at BorderlessBits


๐Ÿ“ˆ Status