Initial commit

This commit is contained in:
2026-01-08 01:04:26 +00:00
committed by GitHub
commit 3ebf60d5dd
122 changed files with 39020 additions and 0 deletions

4
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
github: ixartz
custom:
- 'https://nextjs-boilerplate.com/pro-saas-starter-kit'
- 'https://nextlessjs.com'

View File

@@ -0,0 +1,41 @@
name: Setup Node.js and dependencies
description: Setup Node.js environment with npm dependencies
inputs:
node-version:
description: Node.js version
required: true
restore-nextjs-cache:
description: Whether to restore Next.js build cache
required: false
default: 'false'
runs:
using: composite
steps:
- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}
cache: npm
- name: Restore or cache node_modules
id: cache-node-modules
uses: actions/cache@v5
with:
path: node_modules
key: node-modules-${{ inputs.node-version }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
shell: bash
run: npm ci
- name: Restore Next.js build output
if: inputs.restore-nextjs-cache == 'true'
uses: actions/cache/restore@v5
with:
path: |
.next
key: nextjs-build-${{ inputs.node-version }}-${{ github.sha }}
fail-on-cache-miss: true

40
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: npm
# Look for `package.json` and `lock` files in the root directory
directory: /
# Check the npm registry for updates every month
schedule:
interval: monthly
time: '06:00'
# Limit the number of open pull requests for version updates to 1
open-pull-requests-limit: 1
# Commit message format
commit-message:
# Prefix all commit messages and pull request titles with "chore"
prefix: chore
# Group updates into a single pull request
groups:
# The name of the group (identifier)
npm-deps:
update-types: [minor, patch]
# Only allow minor and patch updates
ignore:
- dependency-name: '*'
update-types: ['version-update:semver-major']
# Enable version updates for GitHub Actions
- package-ecosystem: github-actions
# Look for `.github/workflows` in the root directory
directory: /
# Check GitHub Actions for updates every month
schedule:
interval: monthly
time: '06:05'
# Limit the number of open pull requests for version updates to 1
open-pull-requests-limit: 1
# Commit message format
commit-message:
# Prefix all commit messages and pull request titles with "chore"
prefix: chore

209
.github/workflows/CI.yml vendored Normal file
View File

@@ -0,0 +1,209 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
strategy:
matrix:
node-version: [22.x, 24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
name: Build with ${{ matrix.node-version }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Set up Node.js environment
uses: ./.github/actions/setup-project
with:
node-version: ${{ matrix.node-version }}
- name: Restore or cache Next.js build
uses: actions/cache@v5
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: nextjs-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('src/**') }}
- name: Build Next.js
run: npm run build-local
env:
NEXT_PUBLIC_SENTRY_DISABLED: 'true' # Only upload Sentry source maps in deployment
- if: matrix.node-version == '22.x' && success()
name: Cache Next.js build output
uses: actions/cache/save@v5
with:
path: |
.next
key: nextjs-build-${{ matrix.node-version }}-${{ github.sha }}
static:
strategy:
matrix:
node-version: [22.x]
name: Run static checks
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Retrieve Git history, needed to verify commits
- name: Set up Node.js environment
uses: ./.github/actions/setup-project
with:
node-version: ${{ matrix.node-version }}
- if: github.event_name == 'pull_request'
name: Validate all commits from PR
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Linter
run: npm run lint
- name: Type checking
run: npm run check:types
- name: Check dependencies
run: npm run check:deps
- name: I18n check
run: npm run check:i18n
unit:
strategy:
matrix:
node-version: [22.x]
name: Run unit tests
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [build]
steps:
- uses: actions/checkout@v6
- name: Set up Node.js environment
uses: ./.github/actions/setup-project
with:
node-version: ${{ matrix.node-version }}
- name: Run unit tests
uses: docker://mcr.microsoft.com/playwright:v1.57.0
with:
args: npm run test -- --coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
storybook:
strategy:
matrix:
node-version: [22.x]
name: Run Storybook
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [build]
steps:
- uses: actions/checkout@v6
- name: Set up Node.js environment
uses: ./.github/actions/setup-project
with:
node-version: ${{ matrix.node-version }}
- name: Run storybook tests
uses: docker://mcr.microsoft.com/playwright:v1.57.0
with:
args: npm run storybook:test
e2e:
strategy:
matrix:
node-version: [22.x]
name: Run E2E tests
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [build]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # For chromatic
- name: Set up Node.js environment
uses: ./.github/actions/setup-project
with:
node-version: ${{ matrix.node-version }}
restore-nextjs-cache: true
- name: Run E2E tests
uses: docker://mcr.microsoft.com/playwright:v1.57.0
with:
args: sh -c "HOME=/root npm run test:e2e" # Set HOME to /root to avoid Playwright error with Firebox
env:
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
- name: Fix test results permission # Give permissions to test results needed by Chromatic
run: |
sudo chmod -R 777 test-results
- name: Run visual regression tests
uses: chromaui/action@v13
with:
playwright: true
exitOnceUploaded: true # Speed up by skipping the build results
outputDir: storybook-static
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- name: Upload test results
uses: actions/upload-artifact@v6
if: always()
with:
name: test-results
path: test-results/
retention-days: 7
synchronize-with-crowdin:
name: GitHub PR synchronize with Crowdin
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [build, static]
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }} # Crowdin Actions needs to push commits to the PR branch, checkout HEAD commit instead of merge commit
fetch-depth: 0
- name: Crowdin action
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: true
download_translations: true
create_pull_request: false
localization_branch_name: ${{ github.head_ref || github.ref_name }} # explanation here: https://stackoverflow.com/a/71158878
commit_message: 'chore: new Crowdin translations by GitHub Action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

52
.github/workflows/checkly.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Checkly
on: [deployment_status]
env:
CHECKLY_API_KEY: ${{ secrets.CHECKLY_API_KEY }}
CHECKLY_ACCOUNT_ID: ${{ secrets.CHECKLY_ACCOUNT_ID }}
CHECKLY_TEST_ENVIRONMENT: ${{ github.event.deployment_status.environment }}
jobs:
test-e2e:
strategy:
matrix:
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
# Only run when the deployment was successful
if: github.event.deployment_status.state == 'success'
name: Test E2E on Checkly
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
with:
ref: '${{ github.event.deployment_status.deployment.ref }}'
fetch-depth: 0
- name: Set branch name # workaround to detect branch name in "deployment_status" actions
run: echo "CHECKLY_TEST_REPO_BRANCH=$(git show -s --pretty=%D HEAD | tr -s ',' '\n' | sed 's/^ //' | grep -e 'origin/' | head -1 | sed 's/\origin\///g')" >> $GITHUB_ENV
- name: Set up Node.js environment
uses: ./.github/actions/setup-project
with:
node-version: ${{ matrix.node-version }}
- name: Run checks # run the checks passing in the ENVIRONMENT_URL and recording a test session.
id: run-checks
run: npx dotenv -c production -- npx checkly test --reporter=github --record
env:
VERCEL_BYPASS_TOKEN: ${{ secrets.VERCEL_BYPASS_TOKEN }}
ENVIRONMENT_URL: ${{ github.event.deployment_status.environment_url }}
- name: Create summary # export the markdown report to the job summary.
id: create-summary
run: cat checkly-github-report.md > $GITHUB_STEP_SUMMARY
- name: Deploy checks # if the test run was successful and we are on Production, deploy the checks
id: deploy-checks
if: steps.run-checks.outcome == 'success' && github.event.deployment_status.environment == 'Production'
run: npx dotenv -c production -- npx checkly deploy --force

34
.github/workflows/crowdin.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Crowdin Action
on:
push:
branches: [main] # Run on push to the main branch
schedule:
- cron: '0 5 * * *' # Run every day at 5am
workflow_dispatch: # Run manually
jobs:
synchronize-with-crowdin:
name: Synchronize with Crowdin
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Crowdin action
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: true
download_translations: true
localization_branch_name: l10n_crowdin_translations
create_pull_request: true
pull_request_title: New Crowdin Translations
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
pull_request_base_branch_name: main
commit_message: 'chore: new Crowdin translations by GitHub Action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

93
.github/workflows/nextjs.yml vendored Normal file
View File

@@ -0,0 +1,93 @@
# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Deploy Next.js site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24'
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v5
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Restore cache
uses: actions/cache@v5
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./out
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

42
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Release
on:
workflow_run:
workflows: [CI]
types:
- completed
branches:
- main
jobs:
release:
strategy:
matrix:
node-version: [22.x]
name: Create a new release
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Node.js environment
uses: ./.github/actions/setup-project
with:
node-version: ${{ matrix.node-version }}
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}