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
7 changes: 0 additions & 7 deletions .env

This file was deleted.

23 changes: 1 addition & 22 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,9 @@ VITE_SUPABASE_PROJECT_ID="your-project-id"
# =============================================================================
# CAD PROCESSING SERVICE (Optional)
# =============================================================================
# Server-side CAD processing for geometry and PMI extraction
# See services/pmi-extractor/README.md for deployment instructions

# CAD service URL (leave empty to use browser-based processing)
# VITE_CAD_SERVICE_URL="https://your-cad-service.example.com"

# API key for CAD service authentication (optional if service allows anonymous)
# API key for CAD service authentication
# VITE_CAD_SERVICE_API_KEY="your-api-key-here"

# Legacy PMI service URL (falls back to VITE_CAD_SERVICE_URL if not set)
# VITE_PMI_SERVICE_URL="https://your-pmi-service.example.com"

# =============================================================================
# SELF-HOSTED NOTES
# =============================================================================
#
# For self-hosted deployments:
# 1. Create a Supabase project (cloud or self-hosted)
# 2. Apply the database schema from supabase/migrations/
# 3. Deploy edge functions: supabase functions deploy
# 4. Configure storage buckets: parts-images, issues
# 5. Set these environment variables
#
# See docs/SELF_HOSTING_GUIDE.md for complete instructions.
#
# License: BSL 1.1 - Self-hosting is free and unlimited.
# You cannot offer commercial hosted versions that compete with eryxon.eu
44 changes: 44 additions & 0 deletions .github/workflows/deploy-cloudflare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy to Cloudflare Pages

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build
env:
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
VITE_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.VITE_SUPABASE_PUBLISHABLE_KEY }}

- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: eryxon-flow
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: '3'
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,32 @@ __pycache__/
.Python
*.egg-info/
.eggs/

# === Security: Sensitive Files ===

# Supabase configuration (contains project ID)
supabase/config.toml
supabase/.temp/

# Environment files (contains credentials)
.env
.env.local
.env.*.local
# Keep example files
!.env.example

# Secrets and credentials
*.pem
*.key
*.p12
secrets/
credentials/

# IDE settings (may contain sensitive paths)
.vscode/settings.json
.idea/workspace.xml

# Backup files
*.bak
*.backup
*~
53 changes: 53 additions & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Deploy Eryxon Flow

## Prerequisites

- Supabase account
- Cloudflare account (free tier)

## Step 1: Create Supabase Project

```bash
# 1. Go to supabase.com → Create project
# 2. Get credentials from Settings → API:
# - Project URL
# - anon key
# - Project Ref

# 3. Apply schema
supabase link --project-ref YOUR_REF
supabase db push

# 4. Create storage
supabase storage create parts-images
supabase storage create issues

# 5. Deploy functions
supabase functions deploy
```

## Step 2: Deploy to Cloudflare Pages

```bash
# 1. Go to dash.cloudflare.com
# 2. Pages → Create → Connect Git
# 3. Select repo
# 4. Build: npm run build
# 5. Output: dist
```

**Environment Variables** (set in Cloudflare):
```
VITE_SUPABASE_URL = https://YOUR_REF.supabase.co
VITE_SUPABASE_PUBLISHABLE_KEY = your-anon-key
VITE_SUPABASE_PROJECT_ID = YOUR_REF
```

## Step 3: Custom Domain

In Cloudflare Pages:
- Custom domains → Add domain
- Enter: app.eryxon.eu
- DNS: CNAME app → eryxon-flow.pages.dev

Done.
Loading
Loading