@wwchen/stack 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -2
  3. package/blocks/AGENTS.md +77 -0
  4. package/blocks/CLAUDE.md +113 -0
  5. package/blocks/env.example +32 -0
  6. package/blocks/gitignore +18 -0
  7. package/configs/biome.json +45 -0
  8. package/configs/tsconfig.next.json +22 -0
  9. package/dist/auth/better-auth/index.d.ts +316 -0
  10. package/dist/auth/better-auth/index.js +237 -0
  11. package/dist/auth/better-auth/tables.d.ts +628 -0
  12. package/dist/auth/better-auth/tables.js +74 -0
  13. package/dist/auth/better-auth/users.d.ts +27 -0
  14. package/dist/auth/better-auth/users.js +128 -0
  15. package/dist/auth/index.d.ts +58 -0
  16. package/dist/auth/index.js +120 -0
  17. package/dist/auth/proxy.d.ts +14 -0
  18. package/dist/auth/proxy.js +50 -0
  19. package/dist/auth/safe-next.d.ts +17 -0
  20. package/dist/auth/safe-next.js +36 -0
  21. package/dist/auth/types.d.ts +47 -0
  22. package/dist/auth/types.js +5 -0
  23. package/dist/cli/context.d.ts +38 -0
  24. package/dist/cli/context.js +43 -0
  25. package/dist/cli/index.d.ts +4 -0
  26. package/dist/cli/index.js +95 -0
  27. package/dist/cli/neon.d.ts +97 -0
  28. package/dist/cli/neon.js +334 -0
  29. package/dist/cli/sync-blocks.d.ts +16 -0
  30. package/dist/cli/sync-blocks.js +97 -0
  31. package/dist/cli/user-create.d.ts +2 -0
  32. package/dist/cli/user-create.js +35 -0
  33. package/dist/cli/vercel-build.d.ts +4 -0
  34. package/dist/cli/vercel-build.js +72 -0
  35. package/dist/configs/vitest.d.ts +4 -0
  36. package/dist/configs/vitest.js +50 -0
  37. package/dist/db/explaining-pool.d.ts +16 -0
  38. package/dist/db/explaining-pool.js +62 -0
  39. package/dist/db/index.d.ts +21 -0
  40. package/dist/db/index.js +36 -0
  41. package/dist/db/migration-status.d.ts +8 -0
  42. package/dist/db/migration-status.js +41 -0
  43. package/dist/db/target.d.ts +26 -0
  44. package/dist/db/target.js +72 -0
  45. package/dist/db/testing/index.d.ts +27 -0
  46. package/dist/db/testing/index.js +71 -0
  47. package/dist/db/testing/isolate.d.ts +1 -0
  48. package/dist/db/testing/isolate.js +4 -0
  49. package/dist/db/testing/pglite.d.ts +21 -0
  50. package/dist/db/testing/pglite.js +71 -0
  51. package/dist/env/define-env.d.ts +37 -0
  52. package/dist/env/define-env.js +134 -0
  53. package/dist/env/index.d.ts +3 -0
  54. package/dist/env/index.js +3 -0
  55. package/dist/env/load-env-file.d.ts +15 -0
  56. package/dist/env/load-env-file.js +52 -0
  57. package/dist/env/stack-env.d.ts +39 -0
  58. package/dist/env/stack-env.js +52 -0
  59. package/dist/env/testing.d.ts +8 -0
  60. package/dist/env/testing.js +16 -0
  61. package/dist/http/client-ip.d.ts +12 -0
  62. package/dist/http/client-ip.js +28 -0
  63. package/dist/http/guards.d.ts +17 -0
  64. package/dist/http/guards.js +57 -0
  65. package/dist/http/rate-limit.d.ts +34 -0
  66. package/dist/http/rate-limit.js +79 -0
  67. package/dist/index.d.ts +1 -0
  68. package/dist/index.js +1 -0
  69. package/dist/mail/index.d.ts +45 -0
  70. package/dist/mail/index.js +97 -0
  71. package/dist/next/api.d.ts +71 -0
  72. package/dist/next/api.js +118 -0
  73. package/dist/next/config.d.ts +8 -0
  74. package/dist/next/config.js +104 -0
  75. package/dist/next/cron.d.ts +11 -0
  76. package/dist/next/cron.js +33 -0
  77. package/dist/next/health.d.ts +19 -0
  78. package/dist/next/health.js +36 -0
  79. package/dist/next/index.d.ts +5 -0
  80. package/dist/next/index.js +4 -0
  81. package/dist/testing/next.d.ts +14 -0
  82. package/dist/testing/next.js +39 -0
  83. package/dist/ui/app.css +56 -0
  84. package/dist/ui/globals.css +152 -0
  85. package/dist/ui/icons.d.ts +17 -0
  86. package/dist/ui/icons.js +104 -0
  87. package/dist/ui/index.d.ts +33 -0
  88. package/dist/ui/index.js +41 -0
  89. package/dist/ui/theme.d.ts +18 -0
  90. package/dist/ui/theme.js +24 -0
  91. package/package.json +126 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Will Chen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,48 @@
1
- # Temporary Holding Version
1
+ # @wwchen/stack
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Shared building blocks for Next.js 16 apps on Neon, Better Auth, Resend and lew-ds. Apps are
4
+ normally created from the Copier template in
5
+ [wwchen/bootstrap-stack](https://github.com/wwchen/bootstrap-stack), which wires everything below;
6
+ this README is the package's reference.
7
+
8
+ Requires Node 24. The peer dependencies are exact pins: `next`, `react`, `react-dom`,
9
+ `drizzle-orm`, `@lew-ds/lds`, `@lew-ds/lds-react`, `@lew-ds/open-icons`. `@electric-sql/pglite` and
10
+ `@electric-sql/pglite-socket` are optional peers for tests and local development.
11
+
12
+ ## Entry points
13
+
14
+ | Import | What it gives you |
15
+ |---|---|
16
+ | `@wwchen/stack/env` | `stackEnvSchema` and `stackEnv()`: the shared variables, validated; production requires `APP_URL`, `DATABASE_URL`, `BETTER_AUTH_SECRET`, `RESEND_API_KEY`, `EMAIL_FROM`. `SKIP_ENV_VALIDATION=1` skips it in builds (never at production runtime). |
17
+ | `@wwchen/stack/db` | the pooled client, `migrationStatus`, the dev-database guard that refuses production |
18
+ | `@wwchen/stack/db/testing`, `/db/testing/isolate` | test databases: PGlite by default, a real Postgres when `TEST_DATABASE_URL` is set |
19
+ | `@wwchen/stack/mail` | Resend through one `fetch`; development writes links to a sink file |
20
+ | `@wwchen/stack/auth` | `createAuth`: sessions, sign-in and sign-out, the hourly sign-in limit, safe redirect targets |
21
+ | `@wwchen/stack/auth/better-auth` | the Better Auth provider (magic link, optional Google for existing users, opt-in `emailAndPassword` reached in-process through `provider.instance`) |
22
+ | `@wwchen/stack/auth/proxy` | the `proxy.ts` helpers and `proxyMatcher` |
23
+ | `@wwchen/stack/next` | `withStack(appConfig)` for `next.config.ts`, `apiHandler` and `readJson`, `cronRoute` and `healthRoute` |
24
+ | `@wwchen/stack/ui`, `/ui/icons`, `/ui/globals.css`, `/ui/app.css` | lew-ds wiring, theme cookie, icon sprite and its usage check, and the CSS partials |
25
+ | `@wwchen/stack/configs/tsconfig.next.json`, `/configs/biome.json`, `/configs/vitest` | shared tool configs, consumed with `extends` or an import |
26
+ | `@wwchen/stack/testing/next` | tests only: `inServerAction` runs a function in a real Next server-action scope, `thrownBy` reads a `redirect()`/`notFound()` |
27
+
28
+ Sign-in never creates users: every user is added first (`stack user:create`), has an email, and the
29
+ email is unique, trimmed and lower-cased.
30
+
31
+ ## The `stack` command
32
+
33
+ | Command | Does |
34
+ |---|---|
35
+ | `stack dev-setup` | creates your Neon dev branch from `seed` and migrates it |
36
+ | `stack with-neon <cmd>` | runs `<cmd>` against your dev branch; refuses production, `seed` and `preview` |
37
+ | `stack neon seed` | rebuilds the `seed` branch (fake data) and runs the app's `db/seed.ts` |
38
+ | `stack neon reset-preview` | re-cuts the shared `preview` branch from `seed` |
39
+ | `stack vercel-build` | Vercel's build command: migrate the deployment's database, then `next build` |
40
+ | `stack user:create <email> [--admin]` | adds a user through the app's `src/lib/auth.ts` |
41
+ | `stack sync-blocks [--check]` | refreshes the stack blocks in `AGENTS.md`, `CLAUDE.md`, `.gitignore`, `.env.example` |
42
+
43
+ `NEON_PROJECT_ID` comes from the environment; nothing in the package names a project or domain.
44
+
45
+ ## Versioning
46
+
47
+ The package, the Copier template and the shared CI workflow share one version, tagged `vX.Y.Z`.
48
+ Releases are published to npm with provenance.
@@ -0,0 +1,77 @@
1
+ <!-- Owned by @wwchen/stack: `stack sync-blocks` rewrites everything between these markers. Put your own text outside them. -->
2
+
3
+ ## Commands (stack apps)
4
+
5
+ | Task | Command |
6
+ |---|---|
7
+ | Install | `pnpm install --frozen-lockfile` |
8
+ | Dev server | `pnpm dev` (http://localhost:3000) |
9
+ | Your own Neon dev branch | `stack dev-setup` once; `stack with-neon <command>` runs a command against it |
10
+ | Build | `pnpm build` |
11
+ | Typecheck | `pnpm typecheck` |
12
+ | Lint / format | `pnpm lint` · `pnpm lint:fix` |
13
+ | Tests | `pnpm test` · one file: `pnpm test tests/unit/<name>.test.ts` |
14
+ | Migrate / seed | `pnpm db:migrate` · `pnpm db:seed` |
15
+ | Add a user | `stack user:create <email> [--admin]` (on your dev branch; production: the runbook's "First admin") |
16
+ | Refresh the stack blocks in this file | `stack sync-blocks` (`--check` in CI) |
17
+
18
+ **Gate:** `pnpm typecheck && pnpm lint && pnpm test` must pass before any task is marked done.
19
+
20
+ ## Stack rules
21
+
22
+ 1. Never commit secrets or `.env`. `.env.example` lists names only, with empty values.
23
+ 2. Never edit a generated migration by hand. Migrations run in the build or as an explicit command,
24
+ never on app boot, and every migration is expand-then-contract.
25
+ 3. Relative imports carry `.ts`. The `@/` alias is only for `src/app/**`, `src/components/**` and
26
+ `tests/**`; code the CLI imports as plain Node (`src/lib/**`, `src/db/**`, `db/seed.ts`) uses
27
+ relative imports.
28
+ 4. Server components by default. `"use client"` only for state, effects or event handlers, on the
29
+ smallest leaf, never on a layout.
30
+ 5. Validate at the edge: parse every route handler's input with zod before any logic.
31
+ 6. Authorization is server-side on every request. Another user's row answers 404, never 403.
32
+ 7. Everyone signs in by email; sign-in never creates a user.
33
+
34
+ ## Next.js notes
35
+
36
+ The request hook is `src/proxy.ts`, not `middleware.ts`. Next's own agent rules block
37
+ (written by `next dev`) lives outside this block; leave it alone.
38
+
39
+ ## Design system
40
+
41
+ The design system is LDS (Lew Design System), product theme: `@lew-ds/lds`, `@lew-ds/lds-react`
42
+ and `@lew-ds/open-icons`, pinned exactly in `package.json`.
43
+
44
+ - Components come from `@lew-ds/lds-react`, imported through `@wwchen/stack/ui`, which routes
45
+ `Button`, `Link` and `Row` hrefs through `next/link`. An icon-only action is `IconButton`.
46
+ - Never hand-roll a pill, button, input, table or banner. If LDS lacks something, fix it upstream
47
+ in LDS, never at a call site.
48
+ - LDS paints through its own class names; the app never restyles them. The app's own `app.css` is
49
+ the only place it fills a gap.
50
+ - Tailwind is for layout only. Its colour, type, radius and shadow utilities resolve to LDS roles
51
+ through the stack's `globals.css`. No raw hex or px in a component.
52
+ - A design change lands in the component and its stories in the same change.
53
+
54
+ ## Database
55
+
56
+ - Postgres on Neon, with Drizzle. Local dev runs on your own Neon branch cut from `seed`, never
57
+ from production; previews get their own branch, also from `seed`. Other people's data stays out
58
+ of dev and previews.
59
+ - Local tooling refuses the production database unless you opt in deliberately.
60
+ - Tests run on PGlite (one connection only) and, in CI, a real Postgres.
61
+ - Every user has an email: required, unique, lower-cased and trimmed.
62
+ - Schema changes go through `pnpm db:generate` and a reviewed migration, never through the Neon
63
+ console or a database MCP server.
64
+
65
+ ## Security
66
+
67
+ 1. `CRON_SECRET` can only trigger scheduled jobs; admin and data access never accept it.
68
+ 2. Never render free text from a URL; redirects carry short codes.
69
+ 3. Sign-in links are single-use and expire. OAuth `state` is signed and bound to the browser that
70
+ started the flow.
71
+ 4. Sessions are HttpOnly, Secure (when https), SameSite=Lax. Mutations require JSON and a
72
+ same-origin request.
73
+ 5. Magic links are anti-enumeration, with hashed tokens and sign-in rate limits.
74
+ 6. Connected-account tokens are encrypted at rest; Better Auth never stores third-party API tokens.
75
+ 7. Previews get their own secrets and no production third-party keys.
76
+ 8. Never write a deployment's domain in the repo. Name variables (`APP_URL`, `EMAIL_FROM`), never
77
+ a host.
@@ -0,0 +1,113 @@
1
+ <!-- Owned by @wwchen/stack: `stack sync-blocks` rewrites everything between these markers. Put your own text outside them. -->
2
+
3
+ ## Commands
4
+
5
+ | Task | Command |
6
+ |---|---|
7
+ | Install | `pnpm install --frozen-lockfile` |
8
+ | Dev server | `pnpm dev` (http://localhost:3000) |
9
+ | Local database | Your own Neon dev branch: `stack dev-setup` once, then `stack with-neon <command>` |
10
+ | Build | `pnpm build` · on Vercel: `stack vercel-build` (migrates the deployment's own database first) |
11
+ | Typecheck | `pnpm typecheck` |
12
+ | Lint / format | `pnpm lint` · `pnpm lint:fix` |
13
+ | Tests | `pnpm test` · one file: `pnpm test tests/unit/<name>.test.ts` |
14
+ | DB generate / apply migration | `pnpm db:generate` · `pnpm db:migrate` |
15
+ | Seed the shared `seed` branch | `stack neon seed` (runs the app's `db/seed.ts`) |
16
+ | Reset the shared preview branch | `stack neon reset-preview` |
17
+ | Add a user / an admin | `stack user:create <email> [--admin]` (on your dev branch; production: the runbook's "First admin") |
18
+ | Refresh the stack blocks in this file | `stack sync-blocks` (`--check` in CI) |
19
+
20
+ **Gate:** `pnpm typecheck && pnpm lint && pnpm test` must pass before any task is marked done. Never
21
+ mark a task done with a failing gate command.
22
+
23
+ Node is pinned in `.nvmrc`; pnpm is installed with `npm install -g pnpm@<version from packageManager>`,
24
+ not through Corepack. Dependency versions live in `pnpm-lock.yaml`: read it, never guess one.
25
+
26
+ ## Stack
27
+
28
+ Next.js (App Router) · TypeScript · Tailwind CSS v4 (layout only) · LDS, product theme
29
+ (`@lew-ds/lds`) · Postgres on Neon (PGlite in tests) · Drizzle ORM · Better Auth, self-hosted
30
+ (email magic link through Resend, optional Google for added users) · Vercel · `@wwchen/stack` for
31
+ the shared code, configs and CLI.
32
+
33
+ **Local dev runs on a Neon dev branch** (`dev/<os-user>`), cut from `seed`, which holds fake users and
34
+ fixture data. `stack with-neon` reads the branch's connection strings on every run and refuses the
35
+ production database. Check the `[neon] <branch>` line it prints before running a database command.
36
+
37
+ **One connection on PGlite.** The tests run on PGlite: a single backend. A script run while another
38
+ process holds that connection is refused; stop the other process first.
39
+
40
+ ## Code rules
41
+
42
+ 1. Relative imports carry `.ts`. The `@/` alias is allowed only in `src/app/**`,
43
+ `src/components/**` and `tests/**`; in `src/lib/**`, `src/db/**`, `db/seed.ts` and `scripts/**`
44
+ it is forbidden, because those files also run as plain Node.
45
+ 2. Server components by default. `"use client"` only for state, effects or event handlers, on the
46
+ smallest leaf. Never on a layout.
47
+ 3. Validate at the edge: every route handler reads its body with `readJson(req, schema)` (a zod
48
+ schema) before any logic. It answers a failed parse with 422 `invalid_input` and a `details`
49
+ array, and a body that is not JSON with 400 `invalid_json`. A parse error anywhere else is a bug:
50
+ `apiHandler` logs it and answers 500.
51
+ 4. Authorization is server-side on every request. A hidden button is not a permission. Another
52
+ user's row answers 404, never 403.
53
+ 5. 300 lines is the component ceiling. Past that, split by responsibility.
54
+ 6. No new dependency without a reason in the commit message. Check the standard library first.
55
+ 7. Never write a CDN- or vendor-specific client-IP header name in app code; the client IP comes
56
+ from the stack's one helper.
57
+ 8. Never write a `"use server"` module in shared code; the app's own `actions.ts` marks wrappers.
58
+
59
+ ## Design system
60
+
61
+ The design system is LDS (Lew Design System), product theme: `@lew-ds/lds`, `@lew-ds/lds-react`
62
+ and `@lew-ds/open-icons`, pinned exactly. LDS paints through its own class names; the app never
63
+ restyles them, and the app's `app.css` is the only place it fills a gap.
64
+
65
+ - Components come from `@lew-ds/lds-react`, imported through `@wwchen/stack/ui`. An icon-only
66
+ action is `IconButton`. `<IconSprite>` in the root layout inlines the glyphs the app names and
67
+ what LDS's components draw, nothing else; `checkIcons` guards it in a test.
68
+ - **Never hand-roll a pill, button, input, table or banner.** If LDS lacks something, fix it
69
+ upstream in LDS, never at a call site.
70
+ - **Tailwind is for layout only.** Its colour, type, radius and shadow utilities resolve to LDS
71
+ roles through `@wwchen/stack/ui/globals.css`. No raw hex or px in a component.
72
+ - Layouts respond to the width a component has (container queries), never to the device.
73
+ - Theme is a cookie (`theme-product mode-*`) read and written through the stack's `/ui` helpers.
74
+ - A design change lands in the component and its stories (narrow and wide) in the same change, and
75
+ carries to every component that shows the same thing.
76
+
77
+ ## Database rules
78
+
79
+ - Drizzle schema and migrations: generate with `pnpm db:generate`, review the SQL, never edit a
80
+ generated migration by hand. Every migration is expand-then-contract, because the old deployment
81
+ serves while the build migrates.
82
+ - Migrations run in the Vercel build (`stack vercel-build`) or as an explicit command, never on app
83
+ boot. A preview build migrates its own Neon branch and refuses production's endpoint; a production
84
+ build migrates production's database before building.
85
+ - The app uses `pg` on the pooled `DATABASE_URL`; migrations use `DATABASE_URL_UNPOOLED` when set.
86
+ - Dev and preview branches come from `seed`, never from production, so other people's data stays
87
+ out of dev and previews. Previews get their own secrets and no production third-party keys.
88
+ - Money, if any, is integer cents; reconcile from source rows, never increment.
89
+ - Every user has an email: required, unique, lower-cased and trimmed.
90
+
91
+ ## Security rules
92
+
93
+ 1. `CRON_SECRET` can only trigger scheduled jobs (counts-only responses); admin and data access
94
+ never accept it.
95
+ 2. No free text from URLs is ever rendered; redirects carry short codes.
96
+ 3. Sign-in links are single-use and expire; OAuth `state` is signed and bound to the browser that
97
+ started the flow.
98
+ 4. Sessions: HttpOnly, Secure (when https), SameSite=Lax; mutations require JSON and same-origin.
99
+ 5. Anti-enumeration on magic links; hashed tokens; sign-in rate limits.
100
+ 6. Local tooling refuses the production database unless explicitly opted in.
101
+ 7. Connected-account tokens are encrypted at rest (AES-256-GCM); Better Auth never stores
102
+ third-party API tokens.
103
+ 8. Other people's data stays out of dev and previews.
104
+ 9. Never commit secrets, `.env` or build output. No deployment's domain, Neon project id or key in
105
+ the repo: code, docs and this file name variables (`APP_URL`, `EMAIL_FROM`, `NEON_PROJECT_ID`),
106
+ never a value. `.env.example` is committed and stays in sync; `.env` never is.
107
+
108
+ ## Non-negotiable
109
+
110
+ 1. Never commit secrets or `.env`. Never edit a generated migration by hand.
111
+ 2. Never mark a task done with a failing gate command.
112
+ 3. Never merge a pull request into `main` for the owner. Open the PR, get its checks green, and
113
+ stop; the owner merges.
@@ -0,0 +1,32 @@
1
+ # Names only: copy to .env and fill in. Never put a real value in this file.
2
+ # A blank value counts as unset. NODE_ENV is set by tooling, never here.
3
+
4
+ # Public URL of this deployment (default http://localhost:3000)
5
+ APP_URL=
6
+ # Pooled Postgres URL (required)
7
+ DATABASE_URL=
8
+ # Direct (unpooled) URL, used by migrations when set
9
+ DATABASE_URL_UNPOOLED=
10
+ # Production database host, so local tooling can refuse it
11
+ PRODUCTION_DATABASE_HOST=
12
+ # Signs session cookies and tokens, at least 32 characters (required in production)
13
+ BETTER_AUTH_SECRET=
14
+ # Sign-in mail through Resend (required in production; elsewhere the link goes to the sink file)
15
+ RESEND_API_KEY=
16
+ # Sender on a domain verified in Resend (required in production)
17
+ EMAIL_FROM=
18
+ # Where development writes sign-in links (default .magic-links.log)
19
+ MAGIC_LINK_SINK_PATH=
20
+ # Bearer secret for scheduled jobs only
21
+ CRON_SECRET=
22
+ # Bearer token for the health route's database probe
23
+ HEALTH_TOKEN=
24
+ # Sign in with Google: set both or neither
25
+ GOOGLE_CLIENT_ID=
26
+ GOOGLE_CLIENT_SECRET=
27
+ # Proxy hops to trust for the client IP (0 on Vercel)
28
+ TRUSTED_PROXY_HOPS=
29
+ # Sign-in attempts allowed per hour (default 10)
30
+ AUTH_RATE_LIMIT_PER_HOUR=
31
+ # Log level (default info)
32
+ LOG_LEVEL=
@@ -0,0 +1,18 @@
1
+ # Dependencies and build output
2
+ node_modules
3
+ .next
4
+ dist
5
+ *.tsbuildinfo
6
+ next-env.d.ts
7
+ .vercel
8
+ storybook-static
9
+
10
+ # Local state
11
+ .neon
12
+ .pglite/
13
+ .pglite.lock
14
+ .magic-links.log
15
+
16
+ # Secrets: only the example is committed. Keep this last.
17
+ .env*
18
+ !.env.example
@@ -0,0 +1,45 @@
1
+ {
2
+ "root": false,
3
+ "$schema": "https://biomejs.dev/schemas/2.5.15/schema.json",
4
+ "vcs": {
5
+ "enabled": false,
6
+ "clientKind": "git",
7
+ "useIgnoreFile": false
8
+ },
9
+ "files": {
10
+ "includes": ["**", "!**/*.svg", "!**/.next", "!**/drizzle", "!**/dist", "!**/coverage"]
11
+ },
12
+ "formatter": {
13
+ "enabled": true,
14
+ "indentStyle": "space",
15
+ "indentWidth": 2,
16
+ "lineWidth": 100
17
+ },
18
+ "linter": {
19
+ "enabled": true
20
+ },
21
+ "javascript": {
22
+ "formatter": {
23
+ "quoteStyle": "double",
24
+ "semicolons": "always",
25
+ "trailingCommas": "all"
26
+ }
27
+ },
28
+ "json": {
29
+ "formatter": {
30
+ "enabled": true,
31
+ "indentStyle": "space",
32
+ "indentWidth": 2
33
+ }
34
+ },
35
+ "css": {
36
+ "parser": {
37
+ "tailwindDirectives": true
38
+ },
39
+ "formatter": {
40
+ "enabled": true,
41
+ "indentStyle": "space",
42
+ "indentWidth": 2
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2023",
4
+ "lib": ["dom", "dom.iterable", "ES2023"],
5
+ "module": "esnext",
6
+ "moduleResolution": "bundler",
7
+ "moduleDetection": "force",
8
+ "jsx": "react-jsx",
9
+ "allowJs": true,
10
+ "strict": true,
11
+ "noEmit": true,
12
+ "incremental": true,
13
+ "esModuleInterop": true,
14
+ "resolveJsonModule": true,
15
+ "isolatedModules": true,
16
+ "skipLibCheck": true,
17
+ "allowImportingTsExtensions": true,
18
+ "rewriteRelativeImportExtensions": true,
19
+ "paths": { "@/*": ["${configDir}/src/*"] },
20
+ "plugins": [{ "name": "next" }]
21
+ }
22
+ }