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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
336 changes: 105 additions & 231 deletions .devcontainer/devcontainer.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .devcontainer/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# It also has git, zsh and a bunch of other stuff preinstalled
# Also, it includes a non-root 'vscode' user with sudo access
# The version is pinned to ensure reproducibility
FROM mcr.microsoft.com/devcontainers/base:1.2.3-ubuntu-24.04
FROM mcr.microsoft.com/devcontainers/base:1.2.6-ubuntu-24.04

ENV REMOTE_USER=vscode

Expand Down
13 changes: 13 additions & 0 deletions .devcontainer/image/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,16 @@ EOF
cat <<EOF >>"${REMOTE_USER_HOME}/.zshrc"
export TRUNK_CACHE=/cache/trunk/
EOF

# Setup npm cache
mkdir --parents /cache/npm/

chown --recursive "${REMOTE_USER}:" /cache/npm/

cat <<EOF >>"${REMOTE_USER_HOME}/.bashrc"
export NPM_CONFIG_CACHE=/cache/npm/
EOF

cat <<EOF >>"${REMOTE_USER_HOME}/.zshrc"
export NPM_CONFIG_CACHE=/cache/npm/
EOF
14 changes: 7 additions & 7 deletions .github/workflows/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ jobs:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
- name: Setup Nix cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
id: cache-nix
with:
path: ${{ env.NIX_CACHE_DIR }}
key: example-nix
- name: Install Nix
uses: cachix/install-nix-action@v30
uses: cachix/install-nix-action@v31.8.4
with:
github_access_token: ${{ github.token }}
install_url: https://releases.nixos.org/nix/nix-2.26.2/install
install_url: https://releases.nixos.org/nix/nix-2.32.4/install
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Import Nix store cache
if: steps.cache-nix.outputs.cache-hit == 'true'
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
archive.tar
./
- name: Upload artifact
uses: actions/upload-artifact@v4.6.0
uses: actions/upload-artifact@v5.0.0
with:
include-hidden-files: true
name: build
Expand All @@ -112,7 +112,7 @@ jobs:
timeout-minutes: 10
steps:
- name: Download artifact
uses: actions/download-artifact@v4.1.8
uses: actions/download-artifact@v6.0.0
with:
name: build
- name: Extract archive
Expand All @@ -129,7 +129,7 @@ jobs:
--file
archive.tar
- name: Checkout example repository
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
with:
repository: quickplates/next-example
token: ${{ secrets.EXAMPLES_ACCESS_TOKEN }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
# We need to fetch upstream so Trunk can compare against it
- name: Fetch upstream
if: github.event_name == 'pull_request'
Expand All @@ -38,21 +38,21 @@ jobs:
origin
${{ github.event.pull_request.base.ref }}
- name: Setup Nix cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
id: cache-nix
with:
path: ${{ env.NIX_CACHE_DIR }}
key: lint-nix
- name: Setup Trunk cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
with:
path: ${{ env.TRUNK_CACHE_DIR }}
key: lint-trunk
- name: Install Nix
uses: cachix/install-nix-action@v30
uses: cachix/install-nix-action@v31.8.4
with:
github_access_token: ${{ github.token }}
install_url: https://releases.nixos.org/nix/nix-2.26.2/install
install_url: https://releases.nixos.org/nix/nix-2.32.4/install
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Import Nix store cache
if: steps.cache-nix.outputs.cache-hit == 'true'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@ jobs:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
- name: Setup Nix cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
id: cache-nix
with:
path: ${{ env.NIX_CACHE_DIR }}
key: test-nix
- name: Setup Trunk cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
with:
path: ${{ env.TRUNK_CACHE_DIR }}
key: test-trunk
- name: Install Nix
uses: cachix/install-nix-action@v30
uses: cachix/install-nix-action@v31.8.4
with:
github_access_token: ${{ github.token }}
install_url: https://releases.nixos.org/nix/nix-2.26.2/install
install_url: https://releases.nixos.org/nix/nix-2.32.4/install
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Import Nix store cache
if: steps.cache-nix.outputs.cache-hit == 'true'
Expand Down
3 changes: 3 additions & 0 deletions .trunk/configs/.markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ MD033: false

# Allow not using top level header
MD041: false

# Allow non-descriptive link text
MD059: false
6 changes: 6 additions & 0 deletions .trunk/configs/.prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plugins:
# Enable JSON sorting plugin
- prettier-plugin-sort-json

# Sort JSON recursively
jsonRecursiveSort: true
46 changes: 23 additions & 23 deletions .trunk/configs/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Generic, formatter-friendly config.
# See https://beta.ruff.rs/docs/rules
select = [
# Pyflakes
"F",
# pycodestyle errors
"E",
# pycodestyle warnings
"W",
# isort
"I",
# pep8-naming
"N",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-pytest-style
"PT",
# tryceratops
"TRY",
# flynt
"FLY",
# Enable all rules
"ALL",
]

ignore = [
# Never enforce line length violations. This should be handled by formatters.
# Disable rules that might conflict with the formatter
"COM812",
"COM819",
"D206",
"D300",
"E111",
"E114",
"E117",
"E501",
"ISC002",
"Q000",
"Q001",
"Q002",
"Q003",
"W191",

# Disable some docstring rules that are too strict
"D100",
"D104",
"D105",
"D106",
"D107",
]
23 changes: 0 additions & 23 deletions .trunk/configs/svgo.config.mjs

This file was deleted.

59 changes: 26 additions & 33 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
version: 0.1
cli:
version: 1.22.8
version: 1.25.0
plugins:
sources:
- id: trunk
ref: v1.6.7
ref: v1.7.4
uri: https://github.com/trunk-io/plugins
runtimes:
enabled:
# Needed for gitleaks, shfmt
- go@1.23.6
# Needed for markdownlint, prettier, svgo
- node@22.14.0
# Needed for black, ruff, yamllint
- python@3.12.2
- go@1.25.0
# Needed for markdownlint, prettier
- node@22.20.0
# Needed for ruff, yamllint
- python@3.13.3
lint:
ignore:
- linters: [ALL]
paths:
# Ignore jinja files
- "**/*.jinja*"
# Ignore src directory
- "src/**"
# Ignore copier answers file
- "**/.copier-answers.yaml"
definitions:
Expand Down Expand Up @@ -57,43 +57,36 @@ lint:
check
path:${target}
success_codes: [0, 1]
# Override default Prettier definition
- name: prettier
# Enable Ruff formatter
- name: ruff
commands:
- name: format
run: >-
prettier
--no-error-on-unmatched-pattern
--write
${target}
enabled: true
enabled:
# GitHub Actions linting
- actionlint@1.7.7
# Python formatting
- black@25.1.0
- actionlint@1.7.8
# Check for whitespace errors
- git-diff-check
# Check for secrets in the code
- gitleaks@8.23.3
# Dockerfile linting
- hadolint@2.12.0
- gitleaks@8.29.0
# Markdown linting
- markdownlint@0.44.0
- markdownlint@0.45.0
# Nix formatting check
- nix-fmt-check@SYSTEM
# Nix flake check
- nix-flake-check@SYSTEM
# JS, JSON, YAML, Markdown formatting
- prettier@3.5.1
# Python linting
- ruff@0.9.6
# JSON, YAML, Markdown formatting
- prettier@3.6.2:
packages:
# JSON sorting
- prettier-plugin-sort-json@4.1.1
# Python formatting and linting
- ruff@0.14.5
# Shell linting
- shellcheck@0.10.0
- shellcheck@0.11.0
# Shell formatting
- shfmt@3.10.0
# SVG formatting
- svgo@3.3.2
- shfmt@3.12.0
# TOML formatting
- taplo@0.9.3
- taplo@0.10.0
# YAML linting
- yamllint@1.35.1
- yamllint@1.37.1
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
// Don't scan for git repositories other than the workspace root
"files.associations": {
"**/src/**": "plaintext"
},
"git.autoRepositoryDetection": false
}
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ copier copy gh:quickplates/next .
- automatic releases on [`GitHub Container Registry`](https://ghcr.io)
- package management with [`npm`](https://www.npmjs.com)
- embracing [`TypeScript`](https://www.typescriptlang.org) to the fullest
- state management with [`Zustand`](https://docs.pmnd.rs/zustand)
- server-side configuration with [`zod-config`](https://github.com/alexmarqs/zod-config)
- backend for frontend pattern with [`oRPC`](https://orpc.unnoq.com)
- state management with [`Valtio`](https://valtio.dev)
- clean UI with [`Mantine`](https://mantine.dev)
- i18n with [`Lingui`](https://lingui.dev)
- client-side data fetching with [`TanStack Query`](https://tanstack.com/query)
- dynamic metadata management with [`Unhead`](https://unhead.unjs.io)
- client bundle analysis with [`Rsdoctor`](https://rsdoctor.rs)

## 💻 Development

Expand Down
9 changes: 7 additions & 2 deletions Taskfile.dist.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.39"
version: "3.43"

tasks:
template:
Expand Down Expand Up @@ -41,7 +41,7 @@ tasks:
check
{{ .CLI_ARGS }}
clean:
desc: Clean build files
desc: Clean build outputs
cmds:
- >
rm
Expand Down Expand Up @@ -130,6 +130,7 @@ tasks:
git
add
--all
{{ .CLI_ARGS }}
status:
- >
test
Expand All @@ -149,7 +150,11 @@ tasks:
'description=Example app'
{{ .CLI_ARGS }}
- task: init-build
vars:
CLI_ARGS: ""
- task: add-build-changes
vars:
CLI_ARGS: ""
test:
desc: Test the project
cmds:
Expand Down
2 changes: 1 addition & 1 deletion copier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ port:

keyprefix:
type: str
help: The prefix for various keys used in the app (e.g. for storage)
help: The prefix for various keys used in the app
default: "{{ appname | lower | replace('_', '-') }}"

docs:
Expand Down
Loading