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
5 changes: 1 addition & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
pnpm-lock.yaml -diff linguist-generated
11 changes: 6 additions & 5 deletions .github/workflows/CI.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: corepack enable
- run: yarn
- run: yarn check
- run: yarn build
- run: yarn test
cache: 'pnpm'
- run: pnpm install
- run: pnpm check
- run: pnpm build
- run: pnpm test
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# tooling junk
.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
.parcel-cache/
node_modules

Expand Down
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.2.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .yarnrc.yml

This file was deleted.

43 changes: 21 additions & 22 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,55 @@ Sanremo is an offline-first PWA for managing repeatable checklists. It uses Pouc

## Package Manager

**IMPORTANT: This project uses Yarn, NOT npm.**
- Always use `yarn` or `yarn add` commands
- Never use `npm install` or `npm` commands
- Package manager is enforced via `.yarnrc` configuration
- Yarn is located at `/home/scdf/.volta/bin/yarn`
**IMPORTANT: This project uses pnpm, NOT npm or pnpm.**
- Always use `pnpm` or `pnpm add` commands
- Never use `npm install`, `npm`, `pnpm`, or `pnpm add` commands
- pnpm is located at `/home/scdf/.volta/bin/pnpm`

## Development Commands

### Essential Commands
```bash
# Install dependencies
yarn
pnpm

# Development (client only, no server needed)
yarn dev
pnpm dev

# Build entire application
yarn build
pnpm build

# Linting and type checking
yarn check # Runs Biome linter + TypeScript type checking
yarn biome # Biome linter only
pnpm check # Runs Biome linter + TypeScript type checking
pnpm biome # Biome linter only

# Testing
yarn test # Run all tests (client + server) once (already includes --run)
yarn test:client # Run client tests in watch mode
yarn test:server # Run server tests in watch mode
pnpm test # Run all tests (client + server) once (already includes --run)
pnpm test:client # Run client tests in watch mode
pnpm test:server # Run server tests in watch mode

# Run specific test files (use --run to disable watch mode)
yarn test:client --run src/client/features/User/UserProvider.test.tsx
yarn test:server --run src/server/sync/sync.test.ts
pnpm test:client --run src/client/features/User/UserProvider.test.tsx
pnpm test:server --run src/server/sync/sync.test.ts

# NOTE: yarn test already includes --run, so don't add --run when using it
# NOTE: pnpm test already includes --run, so don't add --run when using it
# Only add --run to test:client or test:server when you want single-run mode
```

### Server Commands (requires PostgreSQL)
```bash
# Start production server
yarn start
pnpm start

# Start local development server
yarn start:local # Uses postgres://postgres:postgres@localhost:15432
pnpm start:local # Uses postgres://postgres:postgres@localhost:15432

# Access PostgreSQL
yarn psql # Connect to local dev database
pnpm psql # Connect to local dev database

# Build targets separately
yarn build:client
yarn build:server
pnpm build:client
pnpm build:server
```

### Database Setup
Expand Down Expand Up @@ -162,7 +161,7 @@ psql < src/server/sql/20210602\ json.sql
### Pre-Commit Checklist
Always run before committing:
```bash
yarn check && yarn test
pnpm check && pnpm test
```

Both must pass with no errors before committing.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ It's my Half Life I guess?
## Local Development

To dev without a server, you can just
`yarn` then `yarn dev`.
`pnpm install` then `pnpm dev`.

If you also want the server server for user support you'll need to: install postgres; init the schema; then build and boot the server.

Expand All @@ -36,8 +36,8 @@ Then the local server can be built with `npm run buildServer` (no continuous bui

## Testing

So far unit tests only, run via `yarn test`
So far unit tests only, run via `pnpm test`

## Building

The production build is achieved with `yarn build` and started with `yarn start`
The production build is achieved with `pnpm build` and started with `pnpm start`
10 changes: 4 additions & 6 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
Quick list

inline edit:
- fix back button behaviour
- generalise migrations

WYSIWYG editor:
- template edited with WYSIWYG
- editing a template from a repeatable, do we need to change anything to make that look seamless now?

Revisit typing. We should have internal types not bound to PouchDB structures that mean the slug against the repeatable are cleanly typed with no ambiguiity.
Make starting and stopping local test env better. Should be easy to start and stop a front and backend env, where both envs are in debug mode (if you change a file they restart). We still want to be able to run the code from pnpm build locally as well.

Move to pnpm because I use it everywhere else.
App updates when logged out only happen on fresh. Do we care? Is it super easy to fix?

Revisit typing. We should have internal types not bound to PouchDB structures that mean the slug against the repeatable are cleanly typed with no ambiguiity.

Spend a pomo looking into shorter and less ugly variations on raw uuids to clean up URLs etc.

Expand Down
Loading
Loading