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
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

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

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
continue-on-error: true # TODO: fix pre-existing lint errors then remove this

- name: Type check
run: npm run type-check

- name: Build
run: npm run build
env:
NEXT_PUBLIC_SUPABASE_URL: https://placeholder.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY: placeholder-anon-key
NEXT_PUBLIC_DEMO_MODE: 'true'
71 changes: 71 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Contributing to Project Firefly

## Branching Model

We use **GitHub Flow** — a simple branch-based workflow.

- `main` is always production-ready and auto-deploys to Vercel production
- All work happens on feature branches created from `main`
- Every PR gets an automatic Vercel preview deployment for QA

### Branch Naming

Use a prefix that describes the type of change:

| Prefix | Use for |
|---|---|
| `feature/` | New functionality |
| `fix/` | Bug fixes |
| `chore/` | Tooling, config, refactors, docs |

Examples: `feature/auth-layer`, `fix/checkout-redirect`, `chore/update-deps`

## Pull Request Process

1. Create a branch from `main`:
```bash
git checkout main && git pull
git checkout -b feature/my-feature
```

2. Make your changes, commit, and push:
```bash
git push -u origin feature/my-feature
```

3. Open a PR targeting `main` on GitHub.

4. CI must pass before merging. The pipeline runs:
- **Lint** — `npm run lint`
- **Type check** — `npm run type-check`
- **Build** — `npm run build`

5. Get a code review, then **squash-merge** to `main`.

## CI Requirements

All PRs must pass the CI pipeline before merging. You can run the checks locally:

```bash
npm run lint
npm run type-check
npm run build
```

## Local Development

```bash
# Install dependencies
npm install

# Copy environment variables
cp .env.local.example .env.local
# Fill in your Supabase project credentials

# Start dev server
npm run dev
```

## Environment Variables

See `.env.local.example` for all required variables. Refer to `docs/ENVIRONMENTS.md` for environment-specific configuration.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint"
"lint": "eslint",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@radix-ui/react-avatar": "^1.1.11",
Expand Down
Loading