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
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.git
.next
node_modules
.env*
coverage
playwright-report
test-results
*.pem
/kubeconfig
/kubeconfig.yaml
/kubeconfig.yml
npm-debug.log*
22 changes: 8 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ concurrency:

env:
NODE_VERSION: "22.12.0"
PNPM_VERSION: "10.20.0"
NEXT_TELEMETRY_DISABLED: 1
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/fulling_test
BETTER_AUTH_URL: http://127.0.0.1:3000
Expand Down Expand Up @@ -46,34 +45,29 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

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

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: npm ci

- name: Deploy database baseline
run: pnpm prisma:migrate
run: npm run prisma:migrate

- name: Run linter
run: pnpm lint
run: npm run lint

- name: Run tests
run: pnpm test
run: npm test

- name: Install Playwright Chromium
run: pnpm exec playwright install --with-deps chromium
run: npm exec -- playwright install --with-deps chromium

- name: Run browser tests
run: pnpm test:e2e
run: npm run test:e2e

- name: Build project
run: pnpm build
run: npm run build
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# dependencies
/node_modules
/.pnpm-store/
/.pnp
.pnp.*
.yarn/*
Expand Down Expand Up @@ -33,7 +32,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*
Expand Down
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ dist
# lock files
package-lock.json
yarn.lock
pnpm-lock.yaml

# other files
*.md
public/
.git/
.vscode/
.idea/
deploy/
deploy/
12 changes: 6 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ Do not use ambiguous moving tags such as `main`, `stable`, `prod`, `release`,
## Development Commands

```bash
corepack pnpm dev # Start dev server
corepack pnpm build # Build for production
corepack pnpm lint # Run ESLint
corepack pnpm test # Run Vitest
corepack pnpm test:e2e # Run Playwright
corepack pnpm prisma:migrate # Deploy the baseline migration
npm run dev # Start dev server
npm run build # Build for production
npm run lint # Run ESLint
npm test # Run Vitest
npm run test:e2e # Run Playwright
npm run prisma:migrate # Deploy the baseline migration
```
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ work.

## Development Setup

Requirements: Node.js 22.12+, pnpm 10.20.0, PostgreSQL, and GitHub OAuth
credentials.
Requirements: Node.js 22.12+ with its bundled npm 10+, PostgreSQL, and GitHub
OAuth credentials.

```bash
corepack pnpm install
npm ci
cp .env.template .env.local
corepack pnpm prisma:migrate
corepack pnpm dev
npm run prisma:migrate
npm run dev
```

The baseline migration targets a new or explicitly reset database. There is no
v2 data migration.

## Before Submitting

- `corepack pnpm lint`
- `corepack pnpm test`
- `corepack pnpm test:e2e`
- `corepack pnpm build`
- `npm run lint`
- `npm test`
- `npm run test:e2e`
- `npm run build`
- verify that no browser response or log includes kubeconfig content

Commits use conventional prefixes such as `feat:`, `fix:`, `docs:`, `refactor:`,
Expand Down
22 changes: 7 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# Install dependencies only when needed
FROM node:22-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat openssl && corepack enable && corepack prepare pnpm@10.20.0 --activate
RUN apk add --no-cache libc6-compat openssl
WORKDIR /app

# Copy package files and prisma schema
COPY package.json pnpm-lock.yaml* ./
COPY package.json package-lock.json ./
COPY prisma ./prisma

# Install dependencies
# Skip prepare script during install, we'll run it in the builder stage
RUN \
if [ -f pnpm-lock.yaml ]; then \
pnpm install --frozen-lockfile --ignore-scripts; \
else \
echo "Lockfile not found." && exit 1; \
fi
# Install dependencies without running package lifecycle scripts.
RUN npm ci --ignore-scripts

# Rebuild the source code only when needed
FROM node:22-alpine AS builder
Expand All @@ -31,10 +25,8 @@ COPY . .
ENV NEXT_TELEMETRY_DISABLED=1
ENV SKIP_ENV_VALIDATION=1

# Generate Prisma client before build
RUN corepack enable && corepack prepare pnpm@10.20.0 --activate && \
pnpm prisma generate && \
pnpm run build
# Generate Prisma Client and compile the Next.js application.
RUN npm run build

# Production image, copy all the files and run next
FROM node:22-alpine AS runner
Expand Down Expand Up @@ -70,4 +62,4 @@ USER nextjs

EXPOSE 3000

CMD ["node", "server.js"]
CMD ["node", "server.js"]
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ ownership model.

## Requirements

- Node.js 22.12 or later
- pnpm 10.20.0
- Node.js 22.12 or later, including its bundled npm 10 or later
- PostgreSQL
- a GitHub OAuth App

Expand All @@ -36,11 +35,11 @@ ${BETTER_AUTH_URL}/api/auth/callback/github
## Local Development

```bash
corepack pnpm install
npm ci
cp .env.template .env.local
# Fill in the database, Better Auth, and GitHub values.
corepack pnpm prisma:migrate
corepack pnpm dev
npm run prisma:migrate
npm run dev
```

Open [http://localhost:3000](http://localhost:3000).
Expand All @@ -51,14 +50,14 @@ explicitly reset database; it does not migrate v2 data.
## Commands

```bash
corepack pnpm dev # Start the development server
corepack pnpm build # Generate Prisma client and build
corepack pnpm lint # Run ESLint
corepack pnpm test # Run Vitest
corepack pnpm test:e2e # Run Playwright
corepack pnpm prisma:format # Format the Prisma schema
corepack pnpm prisma:validate # Validate the Prisma schema
corepack pnpm prisma:migrate # Deploy the baseline migration
npm run dev # Start the development server
npm run build # Generate Prisma client and build
npm run lint # Run ESLint
npm test # Run Vitest
npm run test:e2e # Run Playwright
npm run prisma:format # Format the Prisma schema
npm run prisma:validate # Validate the Prisma schema
npm run prisma:migrate # Deploy the baseline migration
```

## Credential Boundary
Expand Down
Loading
Loading