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
57 changes: 57 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# =============================================================================
# Environment Variables Template
# =============================================================================
# Copy this file to .env.local and fill in the values
# Do NOT commit .env.local to version control
# =============================================================================

# -----------------------------------------------------------------------------
# Application Settings
# -----------------------------------------------------------------------------

# Application name displayed in UI
VITE_APP_NAME="AI Models Explorer"

# API Base URL (optional - defaults to models.dev)
# VITE_API_BASE_URL="https://models.dev"

# -----------------------------------------------------------------------------
# Feature Flags
# -----------------------------------------------------------------------------

# Enable/disable development features
VITE_ENABLE_DEVTOOLS="true"
VITE_ENABLE_LOGGING="false"

# -----------------------------------------------------------------------------
# Analytics (optional)
# -----------------------------------------------------------------------------

# VITE_GA_TRACKING_ID=""
# VITE_SENTRY_DSN=""

# -----------------------------------------------------------------------------
# API Keys (if needed for external services)
# -----------------------------------------------------------------------------

# Note: API keys for services like OpenAI, Anthropic, etc.
# should be server-side only and not exposed in client code
# These would be used in server functions only

# -----------------------------------------------------------------------------
# Netlify-specific (set in Netlify dashboard, not here)
# -----------------------------------------------------------------------------
# The following variables are set in Netlify dashboard:
# - NETLIFY_AUTH_TOKEN
# - NETLIFY_SITE_ID
# - API_SECRET_KEYS (if needed)

# -----------------------------------------------------------------------------
# Build-time Configuration
# -----------------------------------------------------------------------------

# Skip demo route linting errors during build
# SKIP_DEMO_LINT=true

# Node.js environment
# NODE_ENV=production
145 changes: 145 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: CI

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

env:
NODE_VERSION: '20'

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
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: npm run lint

- name: Check formatting
run: npm run format -- --check

type-check:
name: Type Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
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 type checking
run: npx tsc --noEmit

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
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 tests
run: npm run test

build:
name: Build
runs-on: ubuntu-latest
needs: [lint, type-check, test]
steps:
- name: Checkout repository
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
env:
# Skip demo routes linting errors as per project conventions
SKIP_DEMO_LINT: true

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-output
path: dist/
retention-days: 7

# Matrix build for multiple Node.js versions
matrix-build:
name: Build (Node.js ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18', '20', '22']
steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Install dependencies
run: npm ci

- name: Build application
run: npm run build

notify:
name: Notify
runs-on: ubuntu-latest
needs: [lint, type-check, test, build]
if: always()
steps:
- name: Check job status
run: |
if [ "${{ needs.lint.result }}" == "failure" ] || \
[ "${{ needs.type-check.result }}" == "failure" ] || \
[ "${{ needs.test.result }}" == "failure" ] || \
[ "${{ needs.build.result }}" == "failure" ]; then
echo "CI_FAILED=true" >> $GITHUB_ENV
else
echo "CI_FAILED=false" >> $GITHUB_ENV
fi

- name: Send failure notification
if: env.CI_FAILED == 'true'
run: echo "CI failed - check GitHub Actions for details"
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
2 changes: 1 addition & 1 deletion .netlify/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"longitude": 107.6084,
"postalCode": "40287"
},
"timestamp": 1767168556068
"timestamp": 1767259757151
}
}
Loading
Loading