You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.**Create .env**: `cp .env.example .env` (configure `PUBLIC_APPWRITE_ENDPOINT` and `PUBLIC_CONSOLE_MODE`)
13
17
3.**Configure network access** (if using GitHub Actions or restricted environments):
14
18
- Ensure firewall/proxy allows access to: `pkg.pr.new`, `pkg.vc`, `registry.npmjs.org`
15
-
- These domains are required for dependencies: `@appwrite.io/console`, `@appwrite.io/pink-icons-svelte`, `@appwrite.io/pink-svelte`
16
-
- In GitHub Actions: Use `pnpm/action-setup@v4` which handles registry configuration
19
+
- These domains are required for dependencies: `@appwrite.io/console`, `@appwrite.io/pink-icons-svelte`,
20
+
`@appwrite.io/pink-svelte`
21
+
- In GitHub Actions: Ensure Bun is installed and registry access is configured
17
22
- If network errors persist, check proxy settings: `npm config get proxy` and `npm config get https-proxy`
18
-
4.**Install dependencies**: `pnpm install --frozen-lockfile` (if pkg.pr.new/pkg.vc fail due to network restrictions, installation may still succeed with cached versions)
23
+
4.**Install dependencies**: `bun install --frozen-lockfile` (if pkg.pr.new/pkg.vc fail due to network restrictions,
24
+
installation may still succeed with cached versions)
**eslint.config.js**: Flat config (ESLint 9+), many rules disabled (see TODOs)
63
71
**.prettierrc**: 4 spaces, single quotes, 100 char width, no trailing commas
64
72
65
73
## Testing
66
74
67
-
**Unit (Vitest)**: Tests in `src/lib/helpers/*.test.ts`, run with `TZ=EST` (timezone matters). Setup mocks SvelteKit (`$app/*`) in `vitest-setup-client.ts`.
68
-
**E2E (Playwright)**: Tests in `e2e/journeys/*.spec.ts`, needs build+preview on port 4173, retries 3x, timeout 120s, Chromium only.
75
+
**Unit (Bun test)**: Tests in `src/lib/helpers/*.test.ts`, run with `TZ=EST` (timezone matters). Setup mocks SvelteKit (
76
+
`$app/*`) in `bun-test-setup.ts` via `bunfig.toml`.
77
+
**E2E (Playwright)**: Tests in `e2e/journeys/*.spec.ts`, needs build+preview on port 4173, retries 3x, timeout 120s,
78
+
Chromium only.
69
79
70
80
## Common Pitfalls
71
81
72
-
1.**Blank page in dev**: Disable ad blockers if seeing "Failed to fetch dynamically imported module" (known SvelteKit issue)
82
+
1.**Blank page in dev**: Disable ad blockers if seeing "Failed to fetch dynamically imported module" (known SvelteKit
83
+
issue)
73
84
2.**Network errors on install**:
74
85
- pkg.pr.new/pkg.vc deps may fail due to firewall/proxy restrictions
75
86
- Check access: `curl -I https://pkg.pr.new` and `curl -I https://pkg.vc`
76
-
- Configure proxy if needed: `npm config set proxy http://proxy:port` and `npm config set https-proxy http://proxy:port`
77
-
- GitHub Actions: Ensure runner has internet access; use `pnpm/action-setup@v4` action
87
+
- Configure proxy if needed: `npm config set proxy http://proxy:port` and
88
+
`npm config set https-proxy http://proxy:port`
89
+
- GitHub Actions: Ensure runner has internet access and Bun is installed
78
90
- Local dev: Often safe to continue with cached versions if network fails
79
91
3.**OOM on build**: Set `NODE_OPTIONS=--max_old_space_size=8192` (like Dockerfile does)
80
-
4.**Test failures**: Always use `pnpm run test` (sets TZ=EST), not `vitest` directly
81
-
5.**TS errors not showing**: Run `pnpm run check` explicitly (dev server doesn't always surface them)
82
-
6.**Format vs lint conflicts**: Run `pnpm run format` before `pnpm run lint`
92
+
4.**Test failures**: Always use `bun run test` (sets TZ=EST), not `bun test` directly
93
+
5.**TS errors not showing**: Run `bun run check` explicitly (dev server doesn't always surface them)
94
+
6.**Format vs lint conflicts**: Run `bun run format` before `bun run lint`
83
95
7.**E2E timeouts**: Wait 120s for preview server startup, tests auto-retry 3x
84
-
8.**Stale build**: Clear `.svelte-kit` if changes not reflected: `rm -rf .svelte-kit && pnpm run build`
96
+
8.**Stale build**: Clear `.svelte-kit` if changes not reflected: `rm -rf .svelte-kit && bun run build`
85
97
86
98
## Code Conventions
87
99
@@ -96,28 +108,31 @@ src/
96
108
97
109
1. Run Appwrite backend locally (see [docs](https://appwrite.io/docs/advanced/self-hosting))
98
110
2. Configure `.env` with backend endpoint
99
-
3.`pnpm install --frozen-lockfile`
100
-
4.`pnpm dev` (hot reload on port 3000)
101
-
5. Before commit: `pnpm run check && pnpm run format && pnpm run lint && pnpm run test && pnpm run build`
102
-
6.**Take screenshots**: For any UI changes, capture screenshots and include them in the PR description or comments before finalizing
111
+
3.`bun install --frozen-lockfile`
112
+
4.`bun run dev` (hot reload on port 3000)
113
+
5. Before commit: `bun run check && bun run format && bun run lint && bun run test && bun run build`
114
+
6.**Take screenshots**: For any UI changes, capture screenshots and include them in the PR description or comments
115
+
before finalizing
103
116
104
117
## Required Pre-Completion Checklist
105
118
106
-
**CRITICAL**: Before finishing any work or marking a task complete, agents MUST run the following commands in order and ensure all pass:
119
+
**CRITICAL**: Before finishing any work or marking a task complete, agents MUST run the following commands in order and
120
+
ensure all pass:
107
121
108
-
1.**`pnpm run format`** - Auto-fix all formatting issues
109
-
2.**`pnpm run check`** - Verify TypeScript/Svelte types (must show 0 errors, 0 warnings)
110
-
3.**`pnpm run lint`** - Check code style (ignore pre-existing issues in files you didn't modify)
111
-
4.**`pnpm run test`** - Run all unit tests (all tests must pass)
112
-
5.**`pnpm run build`** - Ensure production build succeeds
122
+
1.**`bun run format`** - Auto-fix all formatting issues
123
+
2.**`bun run check`** - Verify TypeScript/Svelte types (must show 0 errors, 0 warnings)
124
+
3.**`bun run lint`** - Check code style (ignore pre-existing issues in files you didn't modify)
125
+
4.**`bun run test`** - Run all unit tests (all tests must pass)
126
+
5.**`bun run build`** - Ensure production build succeeds
113
127
114
128
If any command fails:
115
129
116
-
-**Format/Lint**: Run `pnpm run format` to auto-fix, then re-check
130
+
-**Format/Lint**: Run `bun run format` to auto-fix, then re-check
117
131
-**Type errors**: Fix all TypeScript errors in files you modified
118
132
-**Test failures**: Fix failing tests or ensure failures are unrelated to your changes
119
133
-**Build failures**: Debug and resolve build issues before proceeding
120
134
121
135
**Never skip these checks** - they are mandatory quality gates before any work is considered complete.
122
136
123
-
**Trust these instructions** - only search if incomplete/incorrect. See CONTRIBUTING.md for PR conventions. Use `--frozen-lockfile` always. Docker builds: multi-stage, final image is nginx serving static files from `/console` path.
137
+
**Trust these instructions** - only search if incomplete/incorrect. See CONTRIBUTING.md for PR conventions. Use
138
+
`--frozen-lockfile` always. Docker builds: multi-stage, final image is nginx serving static files from `/console` path.
0 commit comments