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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .claude/skills/doc-check/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ Menu links, anchors, and OGP/meta descriptions must stay in sync.

Working code that uses the public API. `pnpm typecheck` catches breakage.

| Directory | Mode |
| --------------------------------- | -------------- |
| `examples/server-node` | Server mode |
| `examples/spa-vite-react` | SPA mode |
| `examples/spa-react-router` | SPA mode |
| `examples/fullstack-react-router` | Fullstack mode |
| Directory | Mode |
| --------------------------- | -------------- |
| `examples/server-libsql` | Server mode |
| `examples/spa-vite` | SPA mode |
| `examples/spa-react-router` | SPA mode |
| `examples/fullstack` | Fullstack mode |

## Phase 4: Regenerate

Expand Down
17 changes: 16 additions & 1 deletion .claude/skills/doc-check/scripts/find-stale.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,28 @@ else
check_pattern \
"Old dir: browser-vite-react" \
"browser-vite-react" \
"Renamed to spa-vite-react"
"Renamed to spa-vite"

check_pattern \
"Old dir: browser-react-router" \
"browser-react-router" \
"Renamed to spa-react-router"

check_pattern \
"Old dir: fullstack-react-router" \
"fullstack-react-router" \
"Renamed to fullstack"

check_pattern \
"Old dir: server-node" \
"server-node[^_]" \
"Renamed to server-libsql or server-postgres"

check_pattern \
"Old dir: spa-vite-react" \
"spa-vite-react" \
"Renamed to spa-vite"

check_pattern \
"Old file: durably.hooks" \
"durably\.hooks" \
Expand Down
6 changes: 3 additions & 3 deletions .claude/skills/release-check/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ Code examples embedded in prose. API changes silently break copy-paste.

All examples must compile and use current API patterns.

- [ ] `examples/server-node/`
- [ ] `examples/spa-vite-react/`
- [ ] `examples/server-libsql/`
- [ ] `examples/spa-vite/`
- [ ] `examples/spa-react-router/`
- [ ] `examples/fullstack-react-router/`
- [ ] `examples/fullstack/`

Check for:

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
cache: pnpm

- name: Install dependencies
Expand All @@ -52,7 +52,7 @@ jobs:

services:
postgres:
image: postgres:16-alpine
image: postgres:17-alpine
env:
POSTGRES_DB: durably
POSTGRES_USER: durably
Expand All @@ -72,7 +72,7 @@ jobs:

- uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
cache: pnpm

- name: Install dependencies
Expand All @@ -91,7 +91,7 @@ jobs:

- uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
cache: pnpm

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- uses: actions/setup-node@v6
with:
node-version: 22
node-version: 24
cache: pnpm

- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inject-workspace-packages=true
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
"$schema": "https://biomejs.dev/schemas/2.4.9/schema.json",
"root": true,
"files": {
"includes": ["**"]
Expand Down
22 changes: 0 additions & 22 deletions examples/fullstack-react-router/Dockerfile

This file was deleted.

87 changes: 0 additions & 87 deletions examples/fullstack-react-router/README.md

This file was deleted.

7 changes: 4 additions & 3 deletions examples/fullstack-vercel-turso/.vercelignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Exclude sibling examples to prevent @vercel/react-router builder
# from scanning other React Router apps in the monorepo
../../examples/fullstack-react-router
../../examples/spa-vite-react
../../examples/fullstack
../../examples/spa-vite
../../examples/spa-react-router
../../examples/server-node
../../examples/server-libsql
../../examples/server-postgres

# Exclude non-essential workspace packages
../../website
Expand Down
2 changes: 1 addition & 1 deletion examples/fullstack-vercel-turso/biome.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"root": false,
"$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
"$schema": "https://biomejs.dev/schemas/2.4.9/schema.json",
"extends": ["../../biome.json"],
"css": {
"parser": {
Expand Down
16 changes: 8 additions & 8 deletions examples/fullstack-vercel-turso/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@
"@coji/durably": "workspace:*",
"@coji/durably-react": "workspace:*",
"@libsql/kysely-libsql": "^0.4.1",
"@react-router/node": "7.13.1",
"@react-router/serve": "7.13.1",
"@react-router/node": "7.13.2",
"@react-router/serve": "7.13.2",
"@vercel/react-router": "^1.2.6",
"isbot": "^5.1.36",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-router": "7.13.1",
"react-router": "7.13.2",
"zod": "^4.3.6"
},
"devDependencies": {
"@biomejs/biome": "^2.4.7",
"@react-router/dev": "7.13.1",
"@tailwindcss/vite": "^4.2.1",
"@biomejs/biome": "^2.4.9",
"@react-router/dev": "7.13.2",
"@tailwindcss/vite": "^4.2.2",
"@types/node": "^25.5.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"prettier": "^3.8.1",
"prettier-plugin-organize-imports": "^4.3.0",
"tailwindcss": "^4.2.1",
"tailwindcss": "^4.2.2",
"typescript": "^5.9.3",
"vite": "^8.0.0"
"vite": "^8.0.3"
}
}
26 changes: 26 additions & 0 deletions examples/fullstack/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Standalone Dockerfile for deploying the fullstack React Router example.
#
# To use this in your own project, copy this directory and replace
# "workspace:*" in package.json with the published version (e.g. "^0.15.0"),
# then run:
# docker build -t my-app .

FROM node:24-alpine AS deps
WORKDIR /app
COPY package.json pnpm-lock.yaml* ./
RUN npm install -g pnpm && pnpm install --frozen-lockfile || npm install

FROM node:24-alpine AS build
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build

FROM node:24-alpine
RUN mkdir -p /app && chown node:node /app
WORKDIR /app
COPY --chown=node:node --from=build /app/package.json ./
COPY --chown=node:node --from=build /app/node_modules ./node_modules
COPY --chown=node:node --from=build /app/build ./build
USER node
CMD ["./node_modules/.bin/react-router-serve", "./build/server/index.js"]
43 changes: 43 additions & 0 deletions examples/fullstack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Fullstack Example (React Router)

Full-stack React Router application with Durably for server-side job processing. Uses libSQL for storage with server-side rendering and data loading.

## Getting Started

```bash
# Install dependencies
pnpm install

# Start development server
pnpm dev
```

Open http://localhost:5173

## Building for Production

```bash
pnpm build
```

## Docker Deployment

```bash
docker build -t my-app .
docker run -p 3000:3000 my-app
```

## Standalone Use

To use this example outside the monorepo, remove the `workspace:*` dependencies and install from npm:

```bash
pnpm add @coji/durably @coji/durably-react
```

## What It Demonstrates

- Server-side Durably with React Router data loading/mutations
- Job triggering via API routes
- Real-time progress updates in the UI
- TypeScript and TailwindCSS
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
}

return (
<main className="pt-16 p-4 container mx-auto">
<main className="container mx-auto p-4 pt-16">
<h1>{message}</h1>
<p>{details}</p>
{stack && (
<pre className="w-full p-4 overflow-x-auto">
<pre className="w-full overflow-x-auto p-4">
<code>{stack}</code>
</pre>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ export function DataSyncForm() {
<div>
<label
htmlFor="userId"
className="block text-sm font-medium text-gray-700 mb-1"
className="mb-1 block text-sm font-medium text-gray-700"
>
User ID
</label>
<input
id="userId"
name="userId"
defaultValue="user_123"
className="border border-gray-300 rounded-md px-3 py-2 w-full focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
className="w-full rounded-md border border-gray-300 px-3 py-2 focus:border-blue-500 focus:ring-2 focus:ring-blue-500"
/>
</div>
<button
type="submit"
disabled={isSubmitting}
className="bg-blue-600 hover:bg-blue-700 text-white font-medium px-4 py-2 rounded-md disabled:opacity-50 disabled:cursor-not-allowed transition-colors"
className="rounded-md bg-blue-600 px-4 py-2 font-medium text-white transition-colors hover:bg-blue-700 disabled:cursor-not-allowed disabled:opacity-50"
>
{isSubmitting ? 'Submitting...' : 'Start Sync'}
</button>
Expand Down
Loading
Loading