Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51,879 changes: 51,879 additions & 0 deletions .config/.semgrep/semgrep_rules.json

Large diffs are not rendered by default.

191 changes: 191 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
name: CI/CD Pipeline

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

env:
NODE_VERSION: '18.x'

jobs:
lint-and-test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run linting
run: |
# Add linting commands when available
echo "Linting would run here"
# npm run lint

- name: Run unit tests
run: |
# npm run test:unit
echo "Unit tests would run here - Jest requires Node 18+"
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test
SESSION_SECRET: test-session-secret
VPS_ENCRYPTION_KEY: test-encryption-key-32-chars!!!

- name: Run e2e tests
run: |
# Install Playwright browsers
# npx playwright install --with-deps

# Run e2e tests
# npm run test:e2e
echo "E2E tests would run here - Playwright requires Node 18+"
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test
SESSION_SECRET: test-session-secret
VPS_ENCRYPTION_KEY: test-encryption-key-32-chars!!!

- name: Upload test results
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results
path: |
test-results/
coverage/

build:
runs-on: ubuntu-latest
needs: lint-and-test

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build application
run: |
# npm run build
echo "Build would run here"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-files
path: |
dist/
client/dist/

security-scan:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run security audit
run: npm audit --audit-level moderate

- name: Run dependency check
run: |
# Check for known vulnerabilities
npx audit-ci --moderate

deploy:
runs-on: ubuntu-latest
needs: [lint-and-test, build, security-scan]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build for production
run: |
# npm run build
echo "Production build would run here"

- name: Deploy to VPS
run: |
echo "Deployment would happen here"
# This would typically involve:
# - SSH to VPS
# - Pull latest code
# - Install dependencies
# - Build application
# - Restart services
# - Run smoke tests

- name: Run smoke tests
run: |
echo "Post-deployment smoke tests would run here"
# Test critical endpoints
# curl -f https://aformulationoftruth.com/healthz
# curl -f https://vpn.aformulationoftruth.com/

notify:
runs-on: ubuntu-latest
needs: [deploy]
if: always()

steps:
- name: Notify on success
if: needs.deploy.result == 'success'
run: |
echo "✅ Deployment successful"
# Send success notification (email/Slack/etc.)

- name: Notify on failure
if: needs.deploy.result == 'failure'
run: |
echo "❌ Deployment failed"
# Send failure notification (email/Slack/etc.)
82 changes: 82 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,89 @@
<<<<<<< HEAD

# Dependencies
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Build outputs
dist
build
.vite

# Environment variables
.env
.env.*
.env.local
.env.development.local
.env.test.local
.env.production.local

# Database
*.db
*.sqlite
*.sqlite3

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Coverage directory used by tools like istanbul
coverage
*.lcov

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.swp
*.swo
*~

# Temporary files
*.tmp
*.temp

# Replit specific
.replit_env
.upm

# Server public files
server/public

# Vite config temp files
vite.config.ts.*

# Archives
*.tar.gz
*.zip

# VPS server file (contains sensitive info)
vps-server.js

# Attached assets (likely temporary uploads)
attached_assets/
=======
cat <<EOF > .gitignore
node_modules/
*.log
*.sqlite
.env
.DS_Store
EOF
>>>>>>> e871c56b0f8ed39adbefe0e36112abf283611c64
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .local/state/replit/agent/.agent_state_main.bin
Binary file not shown.
1 change: 1 addition & 0 deletions .local/state/replit/agent/.latest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"latest": "main"}
Loading
Loading