Skip to content

Commit a8e929c

Browse files
committed
feat: setup template
0 parents  commit a8e929c

125 files changed

Lines changed: 14699 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Keep Docker build contexts small and prevent local-only files from reaching
2+
# the Docker daemon. Build stages explicitly copy the files they need.
3+
4+
.git
5+
.github
6+
.cache
7+
.claude
8+
.codex
9+
.DS_Store
10+
11+
node_modules
12+
**/node_modules
13+
.pnpm-store
14+
15+
dist
16+
build
17+
coverage
18+
.vite
19+
*.tsbuildinfo
20+
21+
# Never send local secrets or machine-specific overrides to Docker.
22+
/.env
23+
.env.local
24+
.env.*.local
25+
**/.env.local
26+
**/.env.*.local
27+
28+
*.log
29+
npm-debug.log*
30+
pnpm-debug.log*

.env.example

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# COMMITTED FILE. No secrets here. Values are visible to anyone with repo
2+
# access. This file is the template for the root `/.env` (gitignored)
3+
# consumed by docker-compose. Put sensitive or machine-specific overrides
4+
# directly in `/.env`, never here.
5+
6+
# Postgres
7+
POSTGRES_DB=template
8+
POSTGRES_USER=template
9+
POSTGRES_PASSWORD=template_dev_password
10+
POSTGRES_PORT=5432
11+
12+
# Redis
13+
REDIS_PORT=6379
14+
15+
# Backend / Web
16+
BACKEND_PORT=3000
17+
BACKEND_DB_POOL_MAX=10
18+
BACKEND_DB_POOL_CONNECTION_TIMEOUT_MS=5000
19+
BACKEND_DB_POOL_IDLE_TIMEOUT_MS=30000
20+
BACKEND_SHUTDOWN_DRAIN_DELAY_MS=3000
21+
BACKEND_SHUTDOWN_TIMEOUT_MS=25000
22+
WEB_PORT=5173
23+
# Production Caddy site address. Leave unset or set to :80 for plain HTTP.
24+
# Set to your domain, for example example.com, to enable automatic HTTPS.
25+
# PUBLIC_HOST=example.com
26+
27+
# Observability
28+
PROMETHEUS_PORT=9090
29+
GRAFANA_PORT=3001
30+
GRAFANA_ADMIN_PASSWORD=admin
31+
LOKI_PORT=3100

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
8+
- package-ecosystem: docker
9+
directory: /infra/docker
10+
schedule:
11+
interval: weekly
12+
13+
- package-ecosystem: docker
14+
directory: /infra/compose
15+
schedule:
16+
interval: weekly

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
verify:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
21+
- uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa
22+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
23+
with:
24+
node-version: '24'
25+
cache: 'pnpm'
26+
- run: pnpm install --frozen-lockfile
27+
- run: pnpm lint
28+
- run: pnpm typecheck
29+
- run: pnpm audit --audit-level high
30+
- name: Install Playwright Chromium for browser-mode tests
31+
run: pnpm --filter @template/web exec playwright install --with-deps chromium
32+
- run: pnpm test
33+
- run: pnpm build
34+
- run: docker build -f infra/docker/backend.Dockerfile .
35+
- run: docker build -f infra/docker/web.Dockerfile .
36+
37+
pr-title:
38+
if: github.event_name == 'pull_request'
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
42+
- uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa
43+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
44+
with:
45+
node-version: '24'
46+
cache: 'pnpm'
47+
- run: pnpm install --frozen-lockfile
48+
- name: Lint PR title (conventional commits)
49+
run: echo "${{ github.event.pull_request.title }}" | pnpm exec commitlint

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Dependencies
2+
node_modules/
3+
.pnpm-store/
4+
5+
# Build output
6+
dist/
7+
build/
8+
.next/
9+
.vite/
10+
coverage/
11+
*.tsbuildinfo
12+
.vitest-attachments/
13+
__screenshots__/
14+
15+
# Env files
16+
# Only root .env is gitignored (used for docker-compose values).
17+
# Per-app .env / .env.[mode] files are committed (safe defaults).
18+
# Local override files (.env.local, .env.[mode].local) are always ignored.
19+
/.env
20+
.env.local
21+
.env.*.local
22+
23+
# Logs
24+
*.log
25+
npm-debug.log*
26+
pnpm-debug.log*
27+
28+
# OS / editor
29+
.DS_Store
30+
.idea/
31+
.vscode/*
32+
!.vscode/settings.json
33+
!.vscode/extensions.json
34+
.claude/settings.local.json
35+
.claude/scheduled_tasks.lock
36+
37+
# Misc
38+
*.pid
39+
.cache/

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
save-exact=true
2+
engine-strict=true
3+
auto-install-peers=true

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

0 commit comments

Comments
 (0)