Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
72f9a8d
Update auth.test.ts
Vladyslava95 Nov 7, 2025
ad82f7c
fix: info request is triggered twice
Shelex Nov 8, 2025
bbdc489
fix: icon colors
Shelex Nov 8, 2025
3889730
chore: use listV2 endpoint for s3
Shelex Nov 8, 2025
af4b653
feat: add pass rate for reports, report details, fix metadata display…
Shelex Nov 8, 2025
f96630a
chore: migrate from minio lib to aws s3 sdk, use multipart upload for…
Shelex Nov 16, 2025
ee34a57
fix: use proper path
Shelex Nov 18, 2025
4e6e2e8
Merge remote-tracking branch 'upstream/fix/avoidQueryingInfoTwice'
Shelex Nov 19, 2025
4ed432f
Merge remote-tracking branch 'upstream/fix/iconColors'
Shelex Nov 19, 2025
ea344b5
Merge remote-tracking branch 'upstream/chore/ensureS3UsesListV2Endpoint'
Shelex Nov 19, 2025
5241fd2
Merge remote-tracking branch 'upstream/feat/reportPassRate'
Shelex Nov 19, 2025
133684f
Merge remote-tracking branch 'upstream/chore/migrate_to_aws_s3_sdk'
Shelex Nov 19, 2025
785b6ee
feat: use sqlite3 for local caching, disable singletons loading multi…
Shelex Nov 19, 2025
4ecd681
fix: download only zip for report generation
Shelex Nov 19, 2025
c3da05f
feat: pause stream when uploading chunk
Shelex Nov 19, 2025
b87ae29
feat: try manual stream backpressure to stop reading when upload in p…
Shelex Nov 19, 2025
01acf98
feat: explicitly stop file buffer when passthrough is stopped
Shelex Nov 19, 2025
8c118e8
feat: upload - cleanup streams, avoid copying buffers, ensure chunks …
Shelex Nov 20, 2025
6cdd1f8
chore: upload - increase wait stream timeout and interval
Shelex Nov 20, 2025
1263594
feat: upload - stop reading req when stream full and re-pipe on resume
Shelex Nov 21, 2025
053ebde
fix: remove remaining config db leftovers, plain cache object is used
Shelex Nov 22, 2025
0fbbc79
feat: display db stats in settings
Shelex Nov 22, 2025
991a0ca
feat: enable db, move filters and pagination to sql
Shelex Nov 22, 2025
d2857d2
fix: docker healthcheck takes too much time
Shelex Nov 22, 2025
da40c0d
feat: refactor from nextjs to fastify + react
Shelex Dec 5, 2025
ed6dc23
feat: remove nextjs
Shelex Dec 5, 2025
ffc5c20
feat: migrate to npm workspaces
Shelex Dec 5, 2025
bdb6891
chore: use types from shared package
Shelex Dec 5, 2025
cb320e8
chore: reuse types, linter, formatting
Shelex Dec 5, 2025
7a1959f
chore: reuse types, remove ui refresh via generating uuid
Shelex Dec 5, 2025
952a6f8
fix: docker build
Shelex Dec 5, 2025
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
43 changes: 32 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,24 +1,45 @@
# Next Auth
# Server Configuration
PORT=3001
HOST=0.0.0.0
NODE_ENV=development
LOG_LEVEL=info
CORS_ORIGIN=http://localhost:3000

# Authentication Configuration
# You can generate a new secret on the command line with:
# `npm exec auth secret`
# OR
# `openssl rand -base64 32``
# https://next-auth.js.org/configuration/options#secret
# `openssl rand -base64 32`
AUTH_SECRET=
AUTH_URL=http://localhost:3000

# API token details
# API token details (optional - if not set, no auth required)
API_TOKEN='my-api-token'
UI_AUTH_EXPIRE_HOURS='2'

# Storage details
# Storage Configuration
DATA_STORAGE=fs # could be s3
DATA_DIR=./data

# Frontend Configuration (for production)
FRONTEND_DIST=./frontend/dist

# S3 related configuration if DATA_STORAGE is "s3"
S3_ENDPOINT="s3.endpoint",
# S3 Configuration (if DATA_STORAGE is "s3")
S3_ENDPOINT="s3.endpoint"
S3_ACCESS_KEY="some_access_key"
S3_SECRET_KEY="some_secret_key"
S3_PORT=9000 # optional
S3_REGION="us-east-1"
S3_BUCKET="bucket_name" # by default "playwright-reports-server"
S3_BATCH_SIZE=10 # by default 10
S3_BUCKET="playwright-reports-server" # default
S3_BATCH_SIZE=10 # default
S3_MULTIPART_CHUNK_SIZE_MB=25 # default

# Jira Integration (optional)
JIRA_BASE_URL=
JIRA_EMAIL=
JIRA_API_TOKEN=
JIRA_PROJECT_KEY=

# Data Cleanup Configuration (optional)
RESULT_EXPIRE_DAYS=
RESULT_EXPIRE_CRON_SCHEDULE="33 3 * * *"
REPORT_EXPIRE_DAYS=
REPORT_EXPIRE_CRON_SCHEDULE="44 4 * * *"
20 changes: 0 additions & 20 deletions .eslintignore

This file was deleted.

83 changes: 0 additions & 83 deletions .eslintrc.json

This file was deleted.

16 changes: 6 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# data
/data
.tmp
**/data
**/.tmp

# dependencies
/node_modules
**/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
.next/
/out/
**/test-results

# production
/build
**/build
**/dist

# misc
.DS_Store
Expand All @@ -38,8 +36,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
data/reports
data/results

# vscode
.vscode
Expand Down
6 changes: 0 additions & 6 deletions .prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions .prettierrc

This file was deleted.

113 changes: 73 additions & 40 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,75 +1,108 @@
FROM node:22-alpine AS base

# Install dependencies only when needed
# Install all dependencies for monorepo
FROM base 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
WORKDIR /app

# Install dependencies based on the preferred package manager
COPY package.json package-lock.json* ./
RUN npm ci

# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

ARG API_BASE_PATH=""
ENV API_BASE_PATH=$API_BASE_PATH
# Install dependencies for backend
FROM base AS backend-deps
RUN apk add --no-cache libc6-compat

ARG ASSETS_BASE_PATH=""
ENV ASSETS_BASE_PATH=$ASSETS_BASE_PATH
# Install dependencies for frontend

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
ENV NEXT_TELEMETRY_DISABLED=1
# Build shared package first
FROM base AS shared-builder
WORKDIR /app/packages/shared
COPY --from=deps /app/node_modules ./node_modules
COPY packages/shared/ .
RUN npm run build

# Build frontend
FROM base AS frontend-builder
WORKDIR /app/apps/frontend
COPY --from=deps /app/node_modules ./node_modules
COPY --from=shared-builder /app/packages/shared ./packages/shared
COPY apps/frontend/ .
# Remove the shared dependency from package.json temporarily to avoid npm trying to install it
RUN sed -i '/"@playwright-reports\/shared":/d' package.json
# Create symlink for shared package in node_modules for TypeScript resolution
RUN mkdir -p ./node_modules/@playwright-reports \
ln -sf ../../packages/shared ./node_modules/@playwright-reports/shared
# Install missing rollup native dependency if needed
RUN npm install @rollup/rollup-linux-arm64-musl --no-save || true
# Skip TypeScript checks and just build with Vite
ENV DOCKER_BUILD=true
RUN npm run build:vite

# Build backend
FROM base AS backend-builder
WORKDIR /app/apps/backend
COPY --from=deps /app/node_modules ./node_modules
COPY --from=shared-builder /app/packages/shared ./packages/shared
COPY apps/backend/ .
# Create symlink for shared package in node_modules for TypeScript resolution
RUN mkdir -p ./node_modules/@playwright-reports \
ln -sf ../../packages/shared ./node_modules/@playwright-reports/shared
# Build first with dev dependencies
RUN npm run build
# Remove the shared dependency from package.json temporarily to avoid npm trying to install it
RUN sed -i '/"@playwright-reports\/shared":/d' package.json
# Install backend production dependencies (removes dev dependencies)
RUN npm ci --only=production

# Production image, copy all the files and run next
# Production image
FROM base AS runner
WORKDIR /app

ENV NODE_ENV=production

RUN apk add --no-cache curl

# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1

RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 --ingroup nodejs nextjs
adduser --system --uid 1001 --ingroup nodejs appuser

# Copy all node_modules from deps
COPY --from=deps --chown=appuser:nodejs /app/node_modules ./node_modules

COPY --from=builder --chown=nextjs:nodejs /app/public ./public
# Copy backend node_modules for backend-specific dependencies
COPY --from=backend-builder --chown=appuser:nodejs /app/apps/backend/node_modules ./apps/backend/node_modules

# Set the correct permission for prerender cache
RUN mkdir .next && \
chown nextjs:nodejs .next
# Copy backend build
COPY --from=backend-builder --chown=appuser:nodejs /app/apps/backend/dist ./apps/backend/dist
COPY --from=backend-builder --chown=appuser:nodejs /app/apps/backend/package.json ./apps/backend/package.json

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
# Copy frontend build
COPY --from=frontend-builder --chown=appuser:nodejs /app/apps/frontend/dist ./apps/frontend/dist

# Copy shared build
COPY --from=shared-builder --chown=appuser:nodejs /app/packages/shared/dist ./packages/shared/dist

# Copy public assets
COPY --from=frontend-builder --chown=appuser:nodejs /app/apps/frontend/public ./frontend/public

# Copy environment configuration (for default values)
COPY --chown=appuser:nodejs .env.example /app/.env.example

# Create folders required for storing results and reports
ARG DATA_DIR=/app/data
ARG RESULTS_DIR=${DATA_DIR}/results
ARG REPORTS_DIR=${DATA_DIR}/reports
ARG TEMP_DIR=/app/.tmp
RUN mkdir -p ${DATA_DIR} ${RESULTS_DIR} ${REPORTS_DIR} ${TEMP_DIR} && \
chown -R nextjs:nodejs ${DATA_DIR} ${TEMP_DIR}
chown -R appuser:nodejs ${DATA_DIR} ${TEMP_DIR}

USER appuser

USER nextjs
EXPOSE 3001

EXPOSE 3000
ENV PORT=3001
ENV FRONTEND_DIST=/app/apps/frontend/dist

ENV PORT=3000
WORKDIR /app/apps/backend

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD ["sh", "-c", "HOSTNAME=0.0.0.0 node server.js"]
CMD ["node", "dist/index.js"]

HEALTHCHECK --interval=3m --timeout=3s CMD curl -f http://localhost:$PORT/api/ping || exit 1
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
CMD curl -f http://localhost:$PORT/api/ping || exit 1
3 changes: 0 additions & 3 deletions app/api/[...nextauth]/route.ts

This file was deleted.

Loading
Loading