Compare commits

...

39 Commits

Author SHA1 Message Date
fb81e0a7c0 feat: add Link component and update page layout
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 1m35s
CI/CD Pipeline / ESLint (pull_request) Successful in 14s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 14s
CI/CD Pipeline / Build Application (pull_request) Successful in 33s
2025-06-03 22:27:49 +02:00
542aaf9c6f Merge pull request 'chore(deps): update dependency next to v15.3.3' (#15) from renovate/next-15.x into main
All checks were successful
CI/CD Pipeline / Quick Checks (push) Successful in 1m8s
CI/CD Pipeline / ESLint (push) Successful in 12s
CI/CD Pipeline / Test & Coverage (push) Successful in 14s
CI/CD Pipeline / Build Application (push) Successful in 28s
Reviewed-on: #15
2025-06-01 17:58:57 +00:00
e7066e7bfe Merge pull request 'chore(deps): update dependency eslint-config-next to v15.3.3' (#14) from renovate/eslint-config-next-15.x into main
Some checks failed
CI/CD Pipeline / Quick Checks (push) Has started running
CI/CD Pipeline / ESLint (push) Has been cancelled
CI/CD Pipeline / Test & Coverage (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
Reviewed-on: #14
2025-06-01 17:58:38 +00:00
6682cb335a Merge pull request 'chore(deps): update oven-sh/setup-bun action to v2' (#13) from renovate/oven-sh-setup-bun-2.x into main
Some checks failed
CI/CD Pipeline / ESLint (push) Has been cancelled
CI/CD Pipeline / Test & Coverage (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
CI/CD Pipeline / Quick Checks (push) Has been cancelled
Reviewed-on: #13
2025-06-01 17:58:15 +00:00
1c2274c118 Merge pull request 'chore(deps): update dependency lint-staged to v16' (#12) from renovate/lint-staged-16.x into main
Some checks failed
CI/CD Pipeline / ESLint (push) Has been cancelled
CI/CD Pipeline / Test & Coverage (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
CI/CD Pipeline / Quick Checks (push) Has been cancelled
Reviewed-on: #12
2025-06-01 17:58:06 +00:00
488ae383a7 chore(deps): update dependency next to v15.3.3
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 36s
CI/CD Pipeline / ESLint (pull_request) Successful in 12s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 13s
CI/CD Pipeline / Build Application (pull_request) Successful in 30s
2025-05-30 00:02:25 +00:00
4809ea810c chore(deps): update dependency eslint-config-next to v15.3.3
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 1m5s
CI/CD Pipeline / ESLint (pull_request) Successful in 11s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 12s
CI/CD Pipeline / Build Application (pull_request) Successful in 30s
2025-05-30 00:01:35 +00:00
4531c82718 chore(deps): update oven-sh/setup-bun action to v2
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 33s
CI/CD Pipeline / ESLint (pull_request) Successful in 14s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 14s
CI/CD Pipeline / Build Application (pull_request) Successful in 28s
2025-05-29 00:01:57 +00:00
2f71aacae4 chore(deps): update dependency lint-staged to v16
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 1m8s
CI/CD Pipeline / ESLint (pull_request) Successful in 13s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 13s
CI/CD Pipeline / Build Application (pull_request) Successful in 28s
2025-05-29 00:01:51 +00:00
3e76bb6d33 Merge pull request 'chore(deps): update dependency eslint-plugin-react-hooks to v5' (#9) from renovate/eslint-plugin-react-hooks-5.x into main
All checks were successful
CI/CD Pipeline / Quick Checks (push) Successful in 21s
CI/CD Pipeline / ESLint (push) Successful in 11s
CI/CD Pipeline / Test & Coverage (push) Successful in 13s
CI/CD Pipeline / Build Application (push) Successful in 28s
Reviewed-on: #9
2025-05-28 05:33:34 +00:00
2ab7e221e2 chore(deps): update dependency eslint-plugin-react-hooks to v5
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 28s
CI/CD Pipeline / ESLint (pull_request) Successful in 12s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 14s
CI/CD Pipeline / Build Application (pull_request) Successful in 29s
2025-05-28 07:31:05 +02:00
ed07222957 Merge pull request 'chore(deps): update dependency eslint-plugin-testing-library to v7' (#10) from renovate/eslint-plugin-testing-library-7.x into main
All checks were successful
CI/CD Pipeline / Quick Checks (push) Successful in 21s
CI/CD Pipeline / ESLint (push) Successful in 11s
CI/CD Pipeline / Test & Coverage (push) Successful in 12s
CI/CD Pipeline / Build Application (push) Successful in 29s
Reviewed-on: #10
2025-05-28 05:20:03 +00:00
5dbf4f67c2 chore(deps): update dependency eslint-plugin-testing-library to v7
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 29s
CI/CD Pipeline / ESLint (pull_request) Successful in 12s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 13s
CI/CD Pipeline / Build Application (pull_request) Successful in 27s
2025-05-28 00:01:46 +00:00
a0af281ace Merge pull request 'ci: update BUN_VERSION to 1.2.14 for consistency' (#8) from task/update-bun-ci into main
All checks were successful
CI/CD Pipeline / Quick Checks (push) Successful in 20s
CI/CD Pipeline / ESLint (push) Successful in 11s
CI/CD Pipeline / Test & Coverage (push) Successful in 12s
CI/CD Pipeline / Build Application (push) Successful in 27s
Reviewed-on: #8
2025-05-27 12:44:05 +00:00
892ecf8702 ci: update BUN_VERSION to 1.2.14 for consistency
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 27s
CI/CD Pipeline / ESLint (pull_request) Successful in 12s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 11s
CI/CD Pipeline / Build Application (pull_request) Successful in 27s
2025-05-27 14:42:30 +02:00
82f081321c Merge pull request 'chore(package.json): update private property to false' (#7) from task/update-package-visibility into main
All checks were successful
CI/CD Pipeline / Quick Checks (push) Successful in 21s
CI/CD Pipeline / ESLint (push) Successful in 11s
CI/CD Pipeline / Test & Coverage (push) Successful in 11s
CI/CD Pipeline / Build Application (push) Successful in 27s
Reviewed-on: #7
2025-05-27 12:39:52 +00:00
0b5f1dbfe4 chore(package.json): update private property to false
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 22s
CI/CD Pipeline / ESLint (pull_request) Successful in 12s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 13s
CI/CD Pipeline / Build Application (pull_request) Successful in 28s
2025-05-27 14:38:02 +02:00
bb69f71790 Merge pull request 'chore: opt out of nextjs telemetry' (#6) from task/opt-out-of-nextjs-telemetry into main
All checks were successful
CI/CD Pipeline / Quick Checks (push) Successful in 21s
CI/CD Pipeline / ESLint (push) Successful in 12s
CI/CD Pipeline / Test & Coverage (push) Successful in 12s
CI/CD Pipeline / Build Application (push) Successful in 27s
Reviewed-on: #6
2025-05-27 12:32:42 +00:00
954b034d68 Merge branch 'main' into task/opt-out-of-nextjs-telemetry
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 26s
CI/CD Pipeline / ESLint (pull_request) Successful in 11s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 14s
CI/CD Pipeline / Build Application (pull_request) Successful in 28s
2025-05-27 12:30:31 +00:00
fbfa5a4b6a chore(.gitignore): update env file pattern in gitignore
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 55s
CI/CD Pipeline / ESLint (pull_request) Successful in 15s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 13s
CI/CD Pipeline / Build Application (pull_request) Successful in 27s
2025-05-27 14:28:41 +02:00
1ae4872428 chore: add .env.dist file with telemetry setting 2025-05-27 14:28:35 +02:00
29554d2952 Merge pull request 'chore(deps): update dependency eslint-config-prettier to v10' (#5) from renovate/eslint-config-prettier-10.x into main
All checks were successful
CI/CD Pipeline / Quick Checks (push) Successful in 23s
CI/CD Pipeline / ESLint (push) Successful in 11s
CI/CD Pipeline / Test & Coverage (push) Successful in 13s
CI/CD Pipeline / Build Application (push) Successful in 27s
Reviewed-on: #5
2025-05-27 11:50:39 +00:00
bd0ec61189 Merge pull request 'chore(deps): update dependency @types/node to v22' (#4) from renovate/node-22.x into main
Some checks failed
CI/CD Pipeline / Quick Checks (push) Has started running
CI/CD Pipeline / ESLint (push) Has been cancelled
CI/CD Pipeline / Test & Coverage (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
Reviewed-on: #4
2025-05-27 11:50:23 +00:00
a644fb9c2a chore(deps): update dependency eslint-config-prettier to v10
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 25s
CI/CD Pipeline / ESLint (pull_request) Successful in 14s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 13s
CI/CD Pipeline / Build Application (pull_request) Successful in 27s
2025-05-27 11:45:08 +00:00
1e1ace8186 chore(deps): update dependency @types/node to v22
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 23s
CI/CD Pipeline / ESLint (pull_request) Successful in 12s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 13s
CI/CD Pipeline / Build Application (pull_request) Successful in 28s
2025-05-27 11:45:06 +00:00
bc5ff8e7fc Merge pull request 'chore: Configure Renovate' (#3) from renovate/configure into main
All checks were successful
CI/CD Pipeline / Quick Checks (push) Successful in 20s
CI/CD Pipeline / ESLint (push) Successful in 12s
CI/CD Pipeline / Test & Coverage (push) Successful in 13s
CI/CD Pipeline / Build Application (push) Successful in 26s
Reviewed-on: #3
2025-05-27 11:43:51 +00:00
d4859f686a chore(deps): add renovate.json
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 22s
CI/CD Pipeline / ESLint (pull_request) Successful in 11s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 12s
CI/CD Pipeline / Build Application (pull_request) Successful in 27s
2025-05-27 11:39:53 +00:00
d464e93395 Merge pull request 'ci: update branch names in CI configuration' (#2) from task/update-template into main
All checks were successful
CI/CD Pipeline / Quick Checks (push) Successful in 20s
CI/CD Pipeline / ESLint (push) Successful in 11s
CI/CD Pipeline / Test & Coverage (push) Successful in 12s
CI/CD Pipeline / Build Application (push) Successful in 27s
Reviewed-on: #2
2025-05-27 11:31:29 +00:00
9f37bf2194 ci: fix newline at end of file in ci.yml
All checks were successful
CI/CD Pipeline / Quick Checks (pull_request) Successful in 20s
CI/CD Pipeline / ESLint (pull_request) Successful in 12s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 12s
CI/CD Pipeline / Build Application (pull_request) Successful in 27s
2025-05-27 13:27:42 +02:00
95823a866f ci: remove security audit job from CI workflow
Some checks failed
CI/CD Pipeline / Quick Checks (pull_request) Failing after 18s
CI/CD Pipeline / ESLint (pull_request) Has been skipped
CI/CD Pipeline / Test & Coverage (pull_request) Has been skipped
CI/CD Pipeline / Build Application (pull_request) Has been skipped
2025-05-27 13:26:37 +02:00
9cb7cf000f ci: update CI workflow for Yarn integration and caching
Some checks failed
CI/CD Pipeline / Quick Checks (pull_request) Successful in 19s
CI/CD Pipeline / ESLint (pull_request) Successful in 11s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 12s
CI/CD Pipeline / Security Audit (pull_request) Failing after 46s
CI/CD Pipeline / Build Application (pull_request) Successful in 26s
2025-05-27 13:23:56 +02:00
8876fb68a2 ci: remove security audit step from CI workflow
Some checks failed
CI/CD Pipeline / Quick Checks (pull_request) Successful in 20s
CI/CD Pipeline / ESLint (pull_request) Successful in 10s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 12s
CI/CD Pipeline / Security Audit (pull_request) Failing after 9s
CI/CD Pipeline / Build Application (pull_request) Successful in 27s
2025-05-27 13:20:54 +02:00
0d6e5b08ed ci: remove redundant artifact uploads from CI workflow
Some checks failed
CI/CD Pipeline / Quick Checks (pull_request) Successful in 21s
CI/CD Pipeline / ESLint (pull_request) Successful in 11s
CI/CD Pipeline / Test & Coverage (pull_request) Successful in 13s
CI/CD Pipeline / Security Audit (pull_request) Failing after 15s
CI/CD Pipeline / Build Application (pull_request) Successful in 28s
2025-05-27 13:19:25 +02:00
a4a88c1efb ci(bun): fix lockfile errors
Some checks failed
CI/CD Pipeline / Quick Checks (pull_request) Successful in 31s
CI/CD Pipeline / ESLint (pull_request) Successful in 16s
CI/CD Pipeline / Test & Coverage (pull_request) Failing after 15s
CI/CD Pipeline / Build Application (pull_request) Has been skipped
CI/CD Pipeline / Security Audit (pull_request) Failing after 10s
2025-05-27 13:04:06 +02:00
9498026e71 ci: enhance GitHub Actions workflow for performance and caching
Some checks failed
CI/CD Pipeline / Quick Checks (pull_request) Failing after 9s
CI/CD Pipeline / ESLint (pull_request) Has been skipped
CI/CD Pipeline / Test & Coverage (pull_request) Has been skipped
CI/CD Pipeline / Build Application (pull_request) Has been skipped
CI/CD Pipeline / Security Audit (pull_request) Has been skipped
2025-05-27 13:02:05 +02:00
76dd9cd838 test: add tests for RootLayout component functionality
Some checks failed
CI/CD Pipeline / Lint, Test & Build (pull_request) Failing after 17s
CI/CD Pipeline / Security Audit (pull_request) Failing after 14s
2025-05-27 12:59:03 +02:00
7093f4845e ci: Fix whitespace issues in CI configuration file
Some checks failed
CI/CD Pipeline / Lint, Test & Build (pull_request) Failing after 21s
CI/CD Pipeline / Security Audit (pull_request) Failing after 6s
2025-05-27 12:54:50 +02:00
89cf3510bc ci: update branch names in CI configuration 2025-05-27 12:54:50 +02:00
79a84fd255 ci: update branch names in CI workflow configuration 2025-05-27 12:54:50 +02:00
10 changed files with 304 additions and 454 deletions

1
.env.dist Normal file
View File

@ -0,0 +1 @@
NEXT_TELEMETRY_DISABLED=1

View File

@ -6,62 +6,155 @@ on:
pull_request:
branches: [main, develop]
# Concurrency control to cancel previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BUN_VERSION: '1.2.14' # Pin version for consistency
jobs:
lint-and-test:
name: Lint, Test & Build
# Job 1: Quick checks that can fail fast
quick-checks:
name: Quick Checks
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-key.outputs.key }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate cache key
id: cache-key
run: echo "key=bun-${{ hashFiles('bun.lock') }}" >> $GITHUB_OUTPUT
- name: Setup Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: ${{ env.BUN_VERSION }}
- name: Cache dependencies
uses: actions/cache@v4
id: cache-deps
with:
path: ~/.bun/install/cache
key: ${{ steps.cache-key.outputs.key }}
restore-keys: bun-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ steps.cache-key.outputs.key }}
- name: Run TypeScript type check
run: bun run type-check
- name: Run ESLint
run: bun run lint
- name: Check Prettier formatting
run: bun run format:check
- name: Run tests
run: bun run test:ci
- name: Build application
run: bun run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-files
path: .next/
security-audit:
name: Security Audit
# Job 2: Linting (can run in parallel with type checking)
lint:
name: ESLint
runs-on: ubuntu-latest
needs: quick-checks
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: ${{ env.BUN_VERSION }}
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Restore node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ needs.quick-checks.outputs.cache-key }}
- name: Run security audit
run: bun audit
- name: Install dependencies (if cache miss)
run: bun install
- name: Run dependency check
run: bunx audit-ci --moderate
- name: Run ESLint
run: bun run lint
# Job 3: Testing with optimizations
test:
name: Test & Coverage
runs-on: ubuntu-latest
needs: quick-checks
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Restore node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ needs.quick-checks.outputs.cache-key }}
- name: Install dependencies (if cache miss)
run: bun install
- name: Cache Jest cache
uses: actions/cache@v4
with:
path: .jest-cache
key: jest-cache-${{ hashFiles('jest.config.js', 'src/**/*.{ts,tsx}') }}
restore-keys: jest-cache-
- name: Run tests with optimizations
run: bun run test:ci --maxWorkers=2 --cacheDirectory=.jest-cache
env:
NODE_OPTIONS: --max_old_space_size=4096
# Job 4: Build (depends on tests passing)
build:
name: Build Application
runs-on: ubuntu-latest
needs: [quick-checks, lint, test]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Restore node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ needs.quick-checks.outputs.cache-key }}
- name: Install dependencies (if cache miss)
run: bun install
- name: Cache Next.js build
uses: actions/cache@v4
with:
path: |
.next/cache
.next/static
key: nextjs-${{ hashFiles('next.config.ts', 'src/**/*.{ts,tsx}', 'public/**/*') }}
restore-keys: nextjs-
- name: Build application
run: bun run build
env:
NODE_OPTIONS: --max_old_space_size=4096

3
.gitignore vendored
View File

@ -12,6 +12,7 @@
# testing
/coverage
.jest-cache
# next.js
/.next/
@ -31,7 +32,7 @@ yarn-error.log*
.pnpm-debug.log*
# env files (can opt-in for committing if needed)
.env*
.env
# vercel
.vercel

View File

@ -138,11 +138,6 @@ The Gitea Actions workflow includes:
- Unit tests with coverage
- Build verification
2. **Security Audit:**
- Dependency vulnerability scanning
- Security audit reporting
## 📊 Code Quality
### Pre-commit Hooks

464
bun.lock

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,20 @@ const customJestConfig = {
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }],
},
transformIgnorePatterns: ['/node_modules/', '^.+\\.module\\.(css|sass|scss)$'],
// Performance optimizations
maxWorkers: '50%',
cache: true,
cacheDirectory: '.jest-cache',
clearMocks: true,
collectCoverage: false, // Only collect coverage when explicitly requested
coverageReporters: ['text', 'lcov'],
errorOnDeprecated: true,
// Reduce memory usage
logHeapUsage: true,
// Faster test discovery
testLocationInResults: true,
// Skip coverage for faster runs in watch mode
watchPathIgnorePatterns: ['<rootDir>/coverage/', '<rootDir>/.next/'],
};
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async

View File

@ -1,7 +1,7 @@
{
"name": "next-template-app-router",
"version": "0.1.0",
"private": true,
"private": false,
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",
@ -13,13 +13,16 @@
"type-check": "tsc --noEmit",
"test": "jest",
"test:watch": "jest --watch",
"test:ci": "jest --ci --coverage --watchAll=false",
"test:ci": "jest --ci --coverage --watchAll=false --maxWorkers=2",
"test:fast": "jest --watchAll=false --maxWorkers=50%",
"test:coverage": "jest --coverage --watchAll=false",
"ci:all": "bun run type-check && bun run lint && bun run test:ci && bun run build",
"prepare": "husky"
},
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"next": "15.3.2"
"next": "15.3.3"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
@ -29,25 +32,25 @@
"@testing-library/user-event": "^14.5.2",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/jest": "^29.5.12",
"@types/node": "^20",
"@types/node": "^22.0.0",
"@types/react": "^19",
"@types/react-dom": "^19",
"@typescript-eslint/eslint-plugin": "^8.32.1",
"@typescript-eslint/parser": "^8.32.1",
"audit-ci": "^7.1.0",
"eslint": "^9",
"eslint-config-next": "15.3.2",
"eslint-config-prettier": "^9.1.0",
"eslint-config-next": "15.3.3",
"eslint-config-prettier": "^10.0.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-testing-library": "^6.2.2",
"eslint-plugin-testing-library": "^7.0.0",
"eslint-plugin-react-hooks": "^5.0.0",
"husky": "^9.1.6",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^15.2.10",
"lint-staged": "^16.0.0",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.6",
"tailwindcss": "^4",

3
renovate.json Normal file
View File

@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}

View File

@ -0,0 +1,49 @@
import { render, screen } from '@testing-library/react';
import RootLayout, { metadata } from '../layout';
// Mock next/font/google since it's not available in the test environment
jest.mock('next/font/google', () => ({
Geist: () => ({
variable: '--font-geist-sans',
}),
Geist_Mono: () => ({
variable: '--font-geist-mono',
}),
}));
// Mock globals.css import
jest.mock('../globals.css', () => ({}));
describe('RootLayout', () => {
it('renders children correctly', () => {
const testContent = <div data-testid='test-content'>Test content</div>;
render(<RootLayout>{testContent}</RootLayout>);
expect(screen.getByTestId('test-content')).toBeInTheDocument();
expect(screen.getByTestId('test-content')).toHaveTextContent('Test content');
});
it('creates proper HTML structure', () => {
const testContent = <div data-testid='layout-child'>Test</div>;
render(<RootLayout>{testContent}</RootLayout>);
// Verify the child component is rendered correctly
expect(screen.getByTestId('layout-child')).toBeInTheDocument();
});
it('has correct metadata export', () => {
expect(metadata).toBeDefined();
expect(metadata.title).toBe('Create Next App');
expect(metadata.description).toBe('Generated by create next app');
});
it('renders without errors', () => {
const testContent = <div data-testid='render-test'>Test</div>;
const view = render(<RootLayout>{testContent}</RootLayout>);
// Verify the component renders successfully
expect(screen.getByTestId('render-test')).toBeInTheDocument();
expect(view.container).toBeInTheDocument();
});
});

View File

@ -1,18 +1,23 @@
import Image from 'next/image';
import Link from 'next/link';
export default function Home() {
return (
<div className='grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]'>
<main className='flex flex-col gap-[32px] row-start-2 items-center sm:items-start'>
<main className='flex flex-col gap-[32px] row-start-2 items-center sm:items-start text-center justify-center'>
<Image
className='dark:invert'
className='dark:invert m-auto'
src='/next.svg'
alt='Next.js logo'
width={180}
height={38}
priority
/>
<ol className='list-inside list-decimal text-sm/6 text-center sm:text-left font-[family-name:var(--font-geist-mono)]'>
<p className='text-lg text-gray-600 dark:text-gray-300'>
Welcome to the Next.JS App Router Template. If you like this please consider starring the
repository.
</p>
<ol className='list-inside list-decimal text-sm/6 text-center font-[family-name:var(--font-geist-mono)] m-auto'>
<li className='mb-2 tracking-[-.01em]'>
Get started by editing{' '}
<code className='bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-[family-name:var(--font-geist-mono)] font-semibold'>
@ -23,8 +28,8 @@ export default function Home() {
<li className='tracking-[-.01em]'>Save and see your changes instantly.</li>
</ol>
<div className='flex gap-4 items-center flex-col sm:flex-row'>
<a
<div className='flex gap-4 items-center flex-col sm:flex-row m-auto'>
<Link
className='rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:w-auto'
href='https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
target='_blank'
@ -38,19 +43,19 @@ export default function Home() {
height={20}
/>
Deploy now
</a>
<a
</Link>
<Link
className='rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 w-full sm:w-auto md:w-[158px]'
href='https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
target='_blank'
rel='noopener noreferrer'
>
Read our docs
</a>
</Link>
</div>
</main>
<footer className='row-start-3 flex gap-[24px] flex-wrap items-center justify-center'>
<a
<Link
className='flex items-center gap-2 hover:underline hover:underline-offset-4'
href='https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
target='_blank'
@ -58,8 +63,8 @@ export default function Home() {
>
<Image aria-hidden src='/file.svg' alt='File icon' width={16} height={16} />
Learn
</a>
<a
</Link>
<Link
className='flex items-center gap-2 hover:underline hover:underline-offset-4'
href='https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
target='_blank'
@ -67,8 +72,8 @@ export default function Home() {
>
<Image aria-hidden src='/window.svg' alt='Window icon' width={16} height={16} />
Examples
</a>
<a
</Link>
<Link
className='flex items-center gap-2 hover:underline hover:underline-offset-4'
href='https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
target='_blank'
@ -76,8 +81,20 @@ export default function Home() {
>
<Image aria-hidden src='/globe.svg' alt='Globe icon' width={16} height={16} />
Go to nextjs.org
</a>
</Link>
</footer>
<p className='text-sm text-gray-600 dark:text-gray-300'>
Made with <span className='text-red-500'></span> by{' '}
<Link
href='https://jleibl.net'
target='_blank'
rel='noopener noreferrer'
className='font-bold hover:underline hover:underline-offset-4'
>
Jan-Marlon Leibl
</Link>
</p>
</div>
);
}