@etus/bhono-app 0.1.1
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.
- package/dist/cli.d.ts +13 -0
- package/dist/cli.js +46 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.test.d.ts +1 -0
- package/dist/cli.test.js +26 -0
- package/dist/cli.test.js.map +1 -0
- package/dist/generator.d.ts +14 -0
- package/dist/generator.js +142 -0
- package/dist/generator.js.map +1 -0
- package/dist/generator.test.d.ts +1 -0
- package/dist/generator.test.js +127 -0
- package/dist/generator.test.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +97 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts.d.ts +25 -0
- package/dist/prompts.js +83 -0
- package/dist/prompts.js.map +1 -0
- package/dist/prompts.test.d.ts +1 -0
- package/dist/prompts.test.js +24 -0
- package/dist/prompts.test.js.map +1 -0
- package/dist/providers/cloudflare.d.ts +37 -0
- package/dist/providers/cloudflare.js +61 -0
- package/dist/providers/cloudflare.js.map +1 -0
- package/dist/providers/cloudflare.test.d.ts +1 -0
- package/dist/providers/cloudflare.test.js +29 -0
- package/dist/providers/cloudflare.test.js.map +1 -0
- package/dist/providers/github.d.ts +16 -0
- package/dist/providers/github.js +57 -0
- package/dist/providers/github.js.map +1 -0
- package/dist/providers/github.test.d.ts +1 -0
- package/dist/providers/github.test.js +16 -0
- package/dist/providers/github.test.js.map +1 -0
- package/dist/templates.d.ts +8 -0
- package/dist/templates.js +88 -0
- package/dist/templates.js.map +1 -0
- package/dist/templates.test.d.ts +1 -0
- package/dist/templates.test.js +26 -0
- package/dist/templates.test.js.map +1 -0
- package/package.json +36 -0
- package/templates/base/.claude/agents/architect-review.md +160 -0
- package/templates/base/.claude/agents/backend-architect.md +308 -0
- package/templates/base/.claude/agents/code-reviewer.md +170 -0
- package/templates/base/.claude/agents/performance-engineer.md +166 -0
- package/templates/base/.claude/agents/test-automator.md +219 -0
- package/templates/base/.claude/commands/check-skill-rules.md +53 -0
- package/templates/base/.claude/commands/claude-md.md +250 -0
- package/templates/base/.claude/commands/code-prompt.md +212 -0
- package/templates/base/.claude/commands/explain-code.md +194 -0
- package/templates/base/.claude/commands/init-projec.md +89 -0
- package/templates/base/.claude/commands/linear/README.md +297 -0
- package/templates/base/.claude/commands/linear/create-issue.md +190 -0
- package/templates/base/.claude/commands/linear/implement-issue.md +248 -0
- package/templates/base/.claude/commands/linear/process-triage.md +399 -0
- package/templates/base/.claude/commands/linear/setup.md +180 -0
- package/templates/base/.claude/commands/prime.md +9 -0
- package/templates/base/.claude/commands/review-gap.md +10 -0
- package/templates/base/.claude/commands/setup-aa.md +311 -0
- package/templates/base/.claude/commands/ship.md +262 -0
- package/templates/base/.claude/commands/tools.md +3 -0
- package/templates/base/.claude/docs/claude-progress.txt +107 -0
- package/templates/base/.claude/hooks/package-lock.json +556 -0
- package/templates/base/.claude/hooks/package.json +16 -0
- package/templates/base/.claude/hooks/skill-activation-prompt.sh +7 -0
- package/templates/base/.claude/hooks/skill-activation-prompt.ts +142 -0
- package/templates/base/.claude/hooks/tsconfig.json +19 -0
- package/templates/base/.claude/scripts/check-updates.sh +85 -0
- package/templates/base/.claude/scripts/install_pkgs.sh +66 -0
- package/templates/base/.claude/scripts/setup-project.sh +177 -0
- package/templates/base/.claude/scripts/validate-skill-rules.sh +94 -0
- package/templates/base/.claude/settings.json +113 -0
- package/templates/base/.claude/settings.local.json +11 -0
- package/templates/base/.claude/skills/architecture-analyzer/SKILL.md +531 -0
- package/templates/base/.claude/skills/architecture-analyzer/assets/report-template.md +215 -0
- package/templates/base/.claude/skills/architecture-analyzer/references/c4-templates.md +234 -0
- package/templates/base/.claude/skills/architecture-analyzer/references/confidence-levels.md +203 -0
- package/templates/base/.claude/skills/architecture-analyzer/scripts/analyze_structure.py +266 -0
- package/templates/base/.claude/skills/architecture-analyzer/scripts/analyze_tech_debt.py +776 -0
- package/templates/base/.claude/skills/architecture-analyzer/scripts/extract_apis.py +338 -0
- package/templates/base/.claude/skills/architecture-analyzer/scripts/generate_c4.py +283 -0
- package/templates/base/.claude/skills/architecture-analyzer/scripts/generate_erd.py +935 -0
- package/templates/base/.claude/skills/architecture-analyzer/scripts/map_dependencies.py +555 -0
- package/templates/base/.claude/skills/dev-browser/SKILL.md +318 -0
- package/templates/base/.claude/skills/dev-browser/bun.lock +443 -0
- package/templates/base/.claude/skills/dev-browser/package-lock.json +2927 -0
- package/templates/base/.claude/skills/dev-browser/package.json +27 -0
- package/templates/base/.claude/skills/dev-browser/scripts/start-server.ts +117 -0
- package/templates/base/.claude/skills/dev-browser/server.sh +24 -0
- package/templates/base/.claude/skills/dev-browser/src/client.ts +403 -0
- package/templates/base/.claude/skills/dev-browser/src/index.ts +281 -0
- package/templates/base/.claude/skills/dev-browser/src/snapshot/__tests__/snapshot.test.ts +223 -0
- package/templates/base/.claude/skills/dev-browser/src/snapshot/browser-script.ts +877 -0
- package/templates/base/.claude/skills/dev-browser/src/snapshot/index.ts +14 -0
- package/templates/base/.claude/skills/dev-browser/src/snapshot/inject.ts +13 -0
- package/templates/base/.claude/skills/dev-browser/src/types.ts +27 -0
- package/templates/base/.claude/skills/dev-browser/tsconfig.json +36 -0
- package/templates/base/.claude/skills/dev-browser/vitest.config.ts +12 -0
- package/templates/base/.claude/skills/linear/SKILL.md +440 -0
- package/templates/base/.claude/skills/linear/examples.md +262 -0
- package/templates/base/.claude/skills/linear/lib/client.ts +51 -0
- package/templates/base/.claude/skills/linear/lib/config.ts +106 -0
- package/templates/base/.claude/skills/linear/lib/output.ts +34 -0
- package/templates/base/.claude/skills/linear/package-lock.json +698 -0
- package/templates/base/.claude/skills/linear/package.json +27 -0
- package/templates/base/.claude/skills/linear/reference.md +263 -0
- package/templates/base/.claude/skills/linear/scripts/comments/create.ts +47 -0
- package/templates/base/.claude/skills/linear/scripts/comments/list.ts +47 -0
- package/templates/base/.claude/skills/linear/scripts/issues/archive.ts +30 -0
- package/templates/base/.claude/skills/linear/scripts/issues/create.ts +279 -0
- package/templates/base/.claude/skills/linear/scripts/issues/get.ts +68 -0
- package/templates/base/.claude/skills/linear/scripts/issues/list.ts +67 -0
- package/templates/base/.claude/skills/linear/scripts/issues/update.ts +281 -0
- package/templates/base/.claude/skills/linear/scripts/labels/add-to-issue.ts +63 -0
- package/templates/base/.claude/skills/linear/scripts/labels/create.ts +45 -0
- package/templates/base/.claude/skills/linear/scripts/labels/list.ts +30 -0
- package/templates/base/.claude/skills/linear/scripts/list-teams.ts +52 -0
- package/templates/base/.claude/skills/linear/scripts/setup/setup-credentials.ts +96 -0
- package/templates/base/.claude/skills/linear/scripts/status/list.ts +31 -0
- package/templates/base/.claude/skills/linear/scripts/status/set-by-name.ts +78 -0
- package/templates/base/.claude/skills/linear/scripts/status/update.ts +44 -0
- package/templates/base/.claude/skills/linear/scripts/users/list.ts +59 -0
- package/templates/base/.claude/skills/linear/scripts/users/me.ts +20 -0
- package/templates/base/.claude/skills/linear/templates/README.md +203 -0
- package/templates/base/.claude/skills/linear/templates/api-reference.md +258 -0
- package/templates/base/.claude/skills/linear/templates/bug-report.md +99 -0
- package/templates/base/.claude/skills/linear/templates/feature-request.md +118 -0
- package/templates/base/.claude/skills/linear/templates/security-issue.md +162 -0
- package/templates/base/.claude/skills/linear/templates/sprint-task.md +175 -0
- package/templates/base/.claude/skills/linear/templates/tech-debt.md +137 -0
- package/templates/base/.claude/skills/linear/tsconfig.json +17 -0
- package/templates/base/.claude/skills/linear/workflows/issue-lifecycle.md +317 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/SKILL.md +113 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/assets/global-setup.template.js +97 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/assets/playwright.config.template.js +171 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/assets/test-template.spec.js +163 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/examples/README.md +26 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/examples/ads.email-deeplink.spec.ts +12 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/examples/mobile.realism.spec.ts +16 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/examples/smoke.home.spec.ts +6 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/references/architecture.md +578 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/references/best-practices.md +260 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/references/ci-reporting.md +86 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/references/debugging.md +629 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/references/mobile-realism.md +50 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/references/optimization.md +488 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/references/patterns.md +513 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/references/resources.md +44 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/references/visual-a11y.md +66 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/scripts/auth-setup.js +202 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/scripts/performance-analyzer.js +240 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/scripts/trace-url.js +132 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/templates/ci/github-actions.playwright.yml +78 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/templates/fixtures.ts +44 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/templates/global-setup.template.js +97 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/templates/global.setup.ts +35 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/templates/helpers/ad-gpt-observer.ts +80 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/templates/helpers/chromium-mobile-profile.ts +93 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/templates/playwright.config.template.js +171 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/templates/playwright.config.ts +126 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/templates/test-template.spec.js +163 -0
- package/templates/base/.claude/skills/playwright-e2e-testing/templates/tests/email-deeplink.ads.spec.ts +44 -0
- package/templates/base/.claude/skills/skill-rules.json +184 -0
- package/templates/base/.claude/skills/wrangler/SKILL.md +209 -0
- package/templates/base/.claude/skills/wrangler/resources/api.md +494 -0
- package/templates/base/.claude/skills/wrangler/resources/bundling.md +83 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/cert.md +64 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/check.md +66 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/containers.md +157 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/d1.md +843 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/delete.md +27 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/deploy.md +139 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/deployments.md +56 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/dev.md +157 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/dispatch-namespace.md +69 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/docs.md +61 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/how-to-run.md +62 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/hyperdrive.md +425 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/init.md +31 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/kv-bulk.md +265 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/kv-key.md +353 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/kv-namespace.md +265 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/login.md +23 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/logout.md +19 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/mtls-certificate.md +69 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/pages.md +175 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/pipelines.md +76 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/queues.md +132 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/r2-bucket.md +342 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/r2-object.md +267 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/r2-sql.md +65 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/rollback.md +40 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/secret.md +308 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/secrets-store-secret.md +100 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/secrets-store-store.md +60 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/setup.md +67 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/tail.md +37 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/telemetry.md +64 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/triggers.md +39 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/types.md +73 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/vectorize.md +941 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/versions.md +95 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/whoami.md +49 -0
- package/templates/base/.claude/skills/wrangler/resources/commands/workflows.md +117 -0
- package/templates/base/.claude/skills/wrangler/resources/commands.md +138 -0
- package/templates/base/.claude/skills/wrangler/resources/configuration.md +2176 -0
- package/templates/base/.claude/skills/wrangler/resources/custom-builds.md +55 -0
- package/templates/base/.claude/skills/wrangler/resources/deprecations.md +279 -0
- package/templates/base/.claude/skills/wrangler/resources/enviroments.md +416 -0
- package/templates/base/.claude/skills/wrangler/resources/extract_sections.py +119 -0
- package/templates/base/.claude/skills/wrangler/resources/process_content.py +94 -0
- package/templates/base/.claude/skills/wrangler/resources/system-enviroments-variables.md +120 -0
- package/templates/base/.dev.vars.example +15 -0
- package/templates/base/.env.example +29 -0
- package/templates/base/.github/workflows/test.yml +127 -0
- package/templates/base/.nycrc.json +16 -0
- package/templates/base/CLAUDE.md +218 -0
- package/templates/base/README.md +670 -0
- package/templates/base/auth-setup-error.png +0 -0
- package/templates/base/config/drizzle.config.ts +10 -0
- package/templates/base/config/eslint.config.js +364 -0
- package/templates/base/config/wrangler.json +76 -0
- package/templates/base/docs/app_spec.txt +879 -0
- package/templates/base/docs/app_spec_template.md +681 -0
- package/templates/base/docs/architecture/README.md +8 -0
- package/templates/base/docs/architecture/data-requirements.md +109 -0
- package/templates/base/docs/architecture/erd.md +91 -0
- package/templates/base/docs/features/feature_list.json +3128 -0
- package/templates/base/docs/hono-boilerplate-plan.md +1774 -0
- package/templates/base/docs/test-coverage-gap-analysis.md +242 -0
- package/templates/base/docs/testing.md +188 -0
- package/templates/base/index.html +16 -0
- package/templates/base/package.json +115 -0
- package/templates/base/playwright.config.ts +158 -0
- package/templates/base/pnpm-lock.yaml +8175 -0
- package/templates/base/scripts/capture-prod-session.ts +250 -0
- package/templates/base/scripts/generate-openapi.ts +23 -0
- package/templates/base/scripts/init.sh +121 -0
- package/templates/base/src/client/__tests__/button.test.tsx +30 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/dashboard.test.tsx/Dashboard-Page-when-authenticated-should-display-dashboard-stats-cards-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/dashboard.test.tsx/Dashboard-Page-when-authenticated-should-display-quick-action-cards-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/dashboard.test.tsx/Dashboard-Page-when-authenticated-should-display-recent-activity-section-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/dashboard.test.tsx/Dashboard-Page-when-authenticated-should-display-user-first-name-in-welcome-message-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/dashboard.test.tsx/Dashboard-Page-when-authenticated-should-display-user-information-in-sidebar-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/dashboard.test.tsx/Dashboard-Page-when-authenticated-should-render-dashboard-when-authenticated-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/dashboard.test.tsx/Dashboard-Page-when-authenticated-should-show-navigation-sidebar-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/dashboard.test.tsx/Dashboard-Page-when-unauthenticated-should-redirect-to-login-when-not-authenticated-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/login.test.tsx/Login-Page-should-display-Google-OAuth-login-button-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/login.test.tsx/Login-Page-should-have-a-link-back-to-home-page-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/login.test.tsx/Login-Page-should-render-login-content-without-waiting-for-authentication-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/login.test.tsx/Login-Page-should-render-login-page-at--login-route-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/login.test.tsx/Login-Page-should-show-Terms-of-Service-and-Privacy-Policy-links-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/login.test.tsx/Login-Page-should-trigger-OAuth-flow-when-clicking-login-button-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-404-handling-should-display-404-text-on-not-found-page-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-404-handling-should-have-navigation-options-on-404-page-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-404-handling-should-render-404-page-for-unknown-routes-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-authenticated-navigation-should-navigate-from-dashboard-to-account-page-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-authenticated-navigation-should-navigate-from-dashboard-to-integrations-page-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-authenticated-navigation-should-navigate-from-dashboard-to-settings-page-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-authenticated-navigation-should-navigate-from-dashboard-to-team-page-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-home-page-navigation-should-display-navigation-links-on-home-page-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-home-page-navigation-should-have-correct-link-destinations-on-home-page-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-unauthenticated-navigation-should-allow-access-to-home-page-without-authentication-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-unauthenticated-navigation-should-allow-access-to-login-page-without-authentication-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-unauthenticated-navigation-should-redirect-unauthenticated-users-from-dashboard-to-login-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-unauthenticated-navigation-should-redirect-unauthenticated-users-from-settings-to-login-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/__screenshots__/navigation.test.tsx/Navigation-unauthenticated-navigation-should-redirect-unauthenticated-users-from-team-to-login-1.png +0 -0
- package/templates/base/src/client/__tests__/routes/authenticated-layout.test.tsx +252 -0
- package/templates/base/src/client/__tests__/routes/dashboard.test.tsx +136 -0
- package/templates/base/src/client/__tests__/routes/error-components.test.tsx +186 -0
- package/templates/base/src/client/__tests__/routes/login.test.tsx +112 -0
- package/templates/base/src/client/__tests__/routes/navigation.test.tsx +272 -0
- package/templates/base/src/client/__tests__/routes/root-layout.test.tsx +65 -0
- package/templates/base/src/client/__tests__/setup-browser.ts +15 -0
- package/templates/base/src/client/__tests__/setup.ts +32 -0
- package/templates/base/src/client/__tests__/test-utils.tsx +135 -0
- package/templates/base/src/client/api/.gitkeep +0 -0
- package/templates/base/src/client/components/__tests__/__screenshots__/sidebar.test.tsx/Sidebar-can-be-collapsed-by-default-1.png +0 -0
- package/templates/base/src/client/components/__tests__/__screenshots__/sidebar.test.tsx/Sidebar-expands-when-collapsed-and-expand-button-is-clicked-1.png +0 -0
- package/templates/base/src/client/components/__tests__/__screenshots__/sidebar.test.tsx/Sidebar-handles-logout-button-click-1.png +0 -0
- package/templates/base/src/client/components/__tests__/__screenshots__/sidebar.test.tsx/Sidebar-handles-navigation-clicks-1.png +0 -0
- package/templates/base/src/client/components/__tests__/__screenshots__/sidebar.test.tsx/Sidebar-hides-navigation-labels-when-collapsed-1.png +0 -0
- package/templates/base/src/client/components/__tests__/__screenshots__/sidebar.test.tsx/Sidebar-highlights-active-route-1.png +0 -0
- package/templates/base/src/client/components/__tests__/__screenshots__/sidebar.test.tsx/Sidebar-renders-sidebar-navigation-items-1.png +0 -0
- package/templates/base/src/client/components/__tests__/__screenshots__/sidebar.test.tsx/Sidebar-shows-keyboard-shortcut-hint-when-expanded-1.png +0 -0
- package/templates/base/src/client/components/__tests__/__screenshots__/sidebar.test.tsx/Sidebar-shows-user-info-when-authenticated-1.png +0 -0
- package/templates/base/src/client/components/__tests__/__screenshots__/sidebar.test.tsx/Sidebar-shows-user-initials-in-avatar-fallback-1.png +0 -0
- package/templates/base/src/client/components/__tests__/error-boundary.test.tsx +97 -0
- package/templates/base/src/client/components/__tests__/sidebar.test.tsx +281 -0
- package/templates/base/src/client/components/error-boundary.tsx +68 -0
- package/templates/base/src/client/components/icons.tsx +106 -0
- package/templates/base/src/client/components/layout/.gitkeep +0 -0
- package/templates/base/src/client/components/sidebar.tsx +267 -0
- package/templates/base/src/client/components/ui/.gitkeep +0 -0
- package/templates/base/src/client/components/ui/__tests__/avatar.test.tsx +308 -0
- package/templates/base/src/client/components/ui/__tests__/card.test.tsx +214 -0
- package/templates/base/src/client/components/ui/__tests__/dialog.test.tsx +297 -0
- package/templates/base/src/client/components/ui/__tests__/error-fallback.test.tsx +145 -0
- package/templates/base/src/client/components/ui/__tests__/input.test.tsx +98 -0
- package/templates/base/src/client/components/ui/__tests__/loading-skeleton.test.tsx +139 -0
- package/templates/base/src/client/components/ui/__tests__/skeleton.test.tsx +44 -0
- package/templates/base/src/client/components/ui/__tests__/sonner.test.tsx +28 -0
- package/templates/base/src/client/components/ui/__tests__/tabs.test.tsx +233 -0
- package/templates/base/src/client/components/ui/avatar.tsx +101 -0
- package/templates/base/src/client/components/ui/badge.tsx +46 -0
- package/templates/base/src/client/components/ui/button.tsx +72 -0
- package/templates/base/src/client/components/ui/card.tsx +86 -0
- package/templates/base/src/client/components/ui/dialog.tsx +140 -0
- package/templates/base/src/client/components/ui/error-fallback.tsx +179 -0
- package/templates/base/src/client/components/ui/form.tsx +172 -0
- package/templates/base/src/client/components/ui/input.tsx +24 -0
- package/templates/base/src/client/components/ui/label.tsx +22 -0
- package/templates/base/src/client/components/ui/loading-skeleton.tsx +154 -0
- package/templates/base/src/client/components/ui/separator.tsx +33 -0
- package/templates/base/src/client/components/ui/skeleton.tsx +16 -0
- package/templates/base/src/client/components/ui/sonner.tsx +29 -0
- package/templates/base/src/client/components/ui/tabs.tsx +121 -0
- package/templates/base/src/client/hooks/.gitkeep +0 -0
- package/templates/base/src/client/hooks/__tests__/use-auth.test.tsx +306 -0
- package/templates/base/src/client/hooks/__tests__/use-theme.test.tsx +172 -0
- package/templates/base/src/client/hooks/use-auth.ts +53 -0
- package/templates/base/src/client/hooks/use-theme.tsx +78 -0
- package/templates/base/src/client/index.css +881 -0
- package/templates/base/src/client/lib/query-client.ts +11 -0
- package/templates/base/src/client/lib/utils.ts +7 -0
- package/templates/base/src/client/main.tsx +26 -0
- package/templates/base/src/client/routeTree.gen.ts +258 -0
- package/templates/base/src/client/router.ts +15 -0
- package/templates/base/src/client/routes/$.tsx +77 -0
- package/templates/base/src/client/routes/.gitkeep +0 -0
- package/templates/base/src/client/routes/__root.tsx +34 -0
- package/templates/base/src/client/routes/__tests__/__screenshots__/invite.test.tsx/Invite-Token-Page-pending-invitation-state-should-display-accept-invitation-button-1.png +0 -0
- package/templates/base/src/client/routes/__tests__/__screenshots__/invite.test.tsx/Invite-Token-Page-pending-invitation-state-should-display-decline-button-linking-to-homepage-1.png +0 -0
- package/templates/base/src/client/routes/__tests__/__screenshots__/invite.test.tsx/Invite-Token-Page-pending-invitation-state-should-display-invitation-details--email--workspace--role--1.png +0 -0
- package/templates/base/src/client/routes/__tests__/__screenshots__/invite.test.tsx/Invite-Token-Page-pending-invitation-state-should-have-a-logo-link-to-homepage-1.png +0 -0
- package/templates/base/src/client/routes/__tests__/__screenshots__/invite.test.tsx/Invite-Token-Page-pending-invitation-state-should-render-invitation-page-with-inviter-name-and-workspace-1.png +0 -0
- package/templates/base/src/client/routes/__tests__/__screenshots__/invite.test.tsx/Invite-Token-Page-pending-invitation-state-should-show-terms-of-service-and-privacy-policy-links-1.png +0 -0
- package/templates/base/src/client/routes/__tests__/invite.test.tsx +138 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/account.test.tsx/Account-Page-should-render-Active-Sessions-section-with-session-cards-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/account.test.tsx/Account-Page-should-render-page-with-correct-title--Account--1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/account.test.tsx/Account-Page-should-show-API-Access-section-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/account.test.tsx/Account-Page-should-show-Connected-Accounts-section-with-Google-connected-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/account.test.tsx/Account-Page-should-show-Danger-Zone-section-with-delete-button-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/account.test.tsx/Account-Page-should-show-Security-section-with-Two-Factor-Authentication-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-API-documentation-section-should-display-API-documentation-link-section-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-Create-Webhook-Dialog-should-have-Add-Webhook-trigger-button-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-category-filters-should-display-all-category-buttons-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-integration-cards-should-display-all-integration-cards-with-names-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-integration-cards-should-display-category-badges-on-cards-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-integration-cards-should-show-Configure-button-for-connected-integrations-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-integration-cards-should-show-Connect-button-for-not-connected-integrations-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-integration-cards-should-show-Connected-badge-for-connected-integrations-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-page-rendering-should-display-Available-Integrations-section-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-page-rendering-should-display-Webhooks-section-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-page-rendering-should-display-connected-count-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-page-rendering-should-display-page-description-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-page-rendering-should-display-search-input-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-page-rendering-should-render-with-correct-title--Integrations--1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-search-functionality-should-filter-integrations-based-on-search-query-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-search-functionality-should-search-by-description-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-search-functionality-should-show-no-results-message-when-search-has-no-matches-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-webhooks-section-should-display-existing-webhook-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-webhooks-section-should-display-webhook-events-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-webhooks-section-should-display-webhook-last-delivery-info-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-webhooks-section-should-display-webhook-success-status-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/integrations.test.tsx/Integrations-Page-webhooks-section-should-have-Add-Webhook-button-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Account-tab-should-display-connected-accounts-section-with-Google-provider-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Account-tab-should-display-sessions-and-danger-zone-sections-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Notifications-tab-should-display-all-notification-toggle-options-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Notifications-tab-should-display-email-notifications-section-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Notifications-tab-should-display-toggle-switches-for-notification-options-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Notifications-tab-should-have-toggles-checked-by-default-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Profile-tab-should-display--Save-Changes--button-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Profile-tab-should-display-personal-information-form-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Profile-tab-should-display-profile-picture-section-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Profile-tab-should-display-user-email-in-disabled-email-input-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Profile-tab-should-display-user-initials-in-avatar-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-Profile-tab-should-display-user-name-in-the-name-input-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-page-rendering-should-display-all-three-tabs-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-page-rendering-should-display-page-description-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-page-rendering-should-render-with-correct-title--Settings--1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-tab-navigation-should-show-Profile-tab-as-default-active-tab-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-tab-navigation-should-switch-to-Account-tab-when-clicked-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/settings.test.tsx/Settings-Page-tab-navigation-should-switch-to-Notifications-tab-when-clicked-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/team.test.tsx/Team-Page-should-display-Active-Members-section-with-member-count-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/team.test.tsx/Team-Page-should-display-Pending-Invitations-section-with-invitation-details-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/team.test.tsx/Team-Page-should-have-invite-member-button-that-can-be-clicked-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/team.test.tsx/Team-Page-should-render-page-with-correct-title-and-description-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/team.test.tsx/Team-Page-should-render-search-input-that-filters-team-members-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/__screenshots__/team.test.tsx/Team-Page-should-show-current-user-with---you---indicator-and-role-badge-1.png +0 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/account.test.tsx +324 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/integrations.test.tsx +520 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/settings.test.tsx +414 -0
- package/templates/base/src/client/routes/_authenticated/__tests__/team.test.tsx +374 -0
- package/templates/base/src/client/routes/_authenticated/account.tsx +416 -0
- package/templates/base/src/client/routes/_authenticated/dashboard.tsx +151 -0
- package/templates/base/src/client/routes/_authenticated/integrations.tsx +553 -0
- package/templates/base/src/client/routes/_authenticated/settings.tsx +310 -0
- package/templates/base/src/client/routes/_authenticated/team.tsx +395 -0
- package/templates/base/src/client/routes/_authenticated.tsx +69 -0
- package/templates/base/src/client/routes/index.tsx +155 -0
- package/templates/base/src/client/routes/invite.$token.tsx +191 -0
- package/templates/base/src/client/routes/login.tsx +92 -0
- package/templates/base/src/server/__tests__/fixtures.ts +461 -0
- package/templates/base/src/server/__tests__/mocks/__tests__/db.test.ts +239 -0
- package/templates/base/src/server/__tests__/mocks/__tests__/kv.test.ts +293 -0
- package/templates/base/src/server/__tests__/mocks/__tests__/r2.test.ts +363 -0
- package/templates/base/src/server/__tests__/mocks/db.ts +186 -0
- package/templates/base/src/server/__tests__/mocks/index.ts +33 -0
- package/templates/base/src/server/__tests__/mocks/kv.ts +286 -0
- package/templates/base/src/server/__tests__/mocks/r2.ts +397 -0
- package/templates/base/src/server/__tests__/setup.ts +281 -0
- package/templates/base/src/server/auth/__tests__/guards.test.ts +162 -0
- package/templates/base/src/server/auth/guards.ts +92 -0
- package/templates/base/src/server/auth/permissions.test.ts +45 -0
- package/templates/base/src/server/auth/permissions.ts +139 -0
- package/templates/base/src/server/auth/roles.test.ts +169 -0
- package/templates/base/src/server/auth/roles.ts +141 -0
- package/templates/base/src/server/db/client.ts +12 -0
- package/templates/base/src/server/db/schema/accounts.ts +20 -0
- package/templates/base/src/server/db/schema/audit-logs.ts +26 -0
- package/templates/base/src/server/db/schema/index.ts +7 -0
- package/templates/base/src/server/db/schema/invitations.ts +30 -0
- package/templates/base/src/server/db/schema/refresh-tokens.ts +22 -0
- package/templates/base/src/server/db/schema/user-accounts.ts +25 -0
- package/templates/base/src/server/db/schema/users.ts +33 -0
- package/templates/base/src/server/db/seed.ts +267 -0
- package/templates/base/src/server/env.test.ts +84 -0
- package/templates/base/src/server/env.ts +78 -0
- package/templates/base/src/server/index.ts +82 -0
- package/templates/base/src/server/lib/audit.ts +73 -0
- package/templates/base/src/server/lib/audited-db.test.ts +107 -0
- package/templates/base/src/server/lib/audited-db.ts +154 -0
- package/templates/base/src/server/lib/email.test.ts +116 -0
- package/templates/base/src/server/lib/email.ts +82 -0
- package/templates/base/src/server/lib/errors.test.ts +49 -0
- package/templates/base/src/server/lib/errors.ts +64 -0
- package/templates/base/src/server/lib/oauth.test.ts +238 -0
- package/templates/base/src/server/lib/oauth.ts +113 -0
- package/templates/base/src/server/lib/pagination.test.ts +52 -0
- package/templates/base/src/server/lib/pagination.ts +32 -0
- package/templates/base/src/server/lib/password.test.ts +151 -0
- package/templates/base/src/server/lib/password.ts +151 -0
- package/templates/base/src/server/lib/providers.test.ts +105 -0
- package/templates/base/src/server/lib/providers.ts +62 -0
- package/templates/base/src/server/lib/r2-storage.test.ts +202 -0
- package/templates/base/src/server/lib/r2-storage.ts +107 -0
- package/templates/base/src/server/lib/schema-helpers.ts +16 -0
- package/templates/base/src/server/lib/session.test.ts +758 -0
- package/templates/base/src/server/lib/session.ts +267 -0
- package/templates/base/src/server/lib/tokens.test.ts +208 -0
- package/templates/base/src/server/lib/tokens.ts +65 -0
- package/templates/base/src/server/lib/transaction.test.ts +45 -0
- package/templates/base/src/server/lib/transaction.ts +24 -0
- package/templates/base/src/server/middleware/account.test.ts +201 -0
- package/templates/base/src/server/middleware/account.ts +66 -0
- package/templates/base/src/server/middleware/auth.test.ts +345 -0
- package/templates/base/src/server/middleware/auth.ts +146 -0
- package/templates/base/src/server/middleware/cors.test.ts +88 -0
- package/templates/base/src/server/middleware/cors.ts +26 -0
- package/templates/base/src/server/middleware/error-handler.test.ts +69 -0
- package/templates/base/src/server/middleware/error-handler.ts +43 -0
- package/templates/base/src/server/middleware/index.ts +8 -0
- package/templates/base/src/server/middleware/rate-limit.test.ts +472 -0
- package/templates/base/src/server/middleware/rate-limit.ts +294 -0
- package/templates/base/src/server/middleware/request-context.test.ts +175 -0
- package/templates/base/src/server/middleware/request-context.ts +28 -0
- package/templates/base/src/server/middleware/request-logger.test.ts +92 -0
- package/templates/base/src/server/middleware/request-logger.ts +50 -0
- package/templates/base/src/server/routes/accounts/__tests__/handlers.test.ts +460 -0
- package/templates/base/src/server/routes/accounts/handlers.ts +179 -0
- package/templates/base/src/server/routes/accounts/index.ts +55 -0
- package/templates/base/src/server/routes/accounts/routes.ts +205 -0
- package/templates/base/src/server/routes/accounts/schemas.ts +31 -0
- package/templates/base/src/server/routes/api.ts +37 -0
- package/templates/base/src/server/routes/audits/__tests__/handlers.test.ts +349 -0
- package/templates/base/src/server/routes/audits/handlers.ts +37 -0
- package/templates/base/src/server/routes/audits/index.ts +14 -0
- package/templates/base/src/server/routes/audits/routes.ts +29 -0
- package/templates/base/src/server/routes/audits/schemas.ts +43 -0
- package/templates/base/src/server/routes/auth/__tests__/handlers.test.ts +381 -0
- package/templates/base/src/server/routes/auth/handlers.ts +222 -0
- package/templates/base/src/server/routes/auth/index.ts +37 -0
- package/templates/base/src/server/routes/auth/routes.ts +136 -0
- package/templates/base/src/server/routes/auth/schemas.ts +48 -0
- package/templates/base/src/server/routes/auth/test-login.ts +156 -0
- package/templates/base/src/server/routes/health/__tests__/handlers.test.ts +237 -0
- package/templates/base/src/server/routes/health/handlers.ts +83 -0
- package/templates/base/src/server/routes/health/index.ts +13 -0
- package/templates/base/src/server/routes/health/routes.ts +90 -0
- package/templates/base/src/server/routes/index.ts +53 -0
- package/templates/base/src/server/routes/invitations/__tests__/handlers.test.ts +473 -0
- package/templates/base/src/server/routes/invitations/handlers.ts +71 -0
- package/templates/base/src/server/routes/invitations/index.ts +25 -0
- package/templates/base/src/server/routes/invitations/routes.ts +69 -0
- package/templates/base/src/server/routes/invitations/schemas.ts +39 -0
- package/templates/base/src/server/routes/openapi.ts +14 -0
- package/templates/base/src/server/routes/schemas.ts +53 -0
- package/templates/base/src/server/routes/storage/__tests__/handlers.test.ts +408 -0
- package/templates/base/src/server/routes/storage/handlers.ts +100 -0
- package/templates/base/src/server/routes/storage/index.ts +42 -0
- package/templates/base/src/server/routes/storage/routes.ts +91 -0
- package/templates/base/src/server/routes/storage/schemas.ts +56 -0
- package/templates/base/src/server/routes/users/__tests__/handlers.test.ts +526 -0
- package/templates/base/src/server/routes/users/handlers.ts +228 -0
- package/templates/base/src/server/routes/users/index.ts +67 -0
- package/templates/base/src/server/routes/users/routes.ts +265 -0
- package/templates/base/src/server/routes/users/schemas.ts +67 -0
- package/templates/base/src/server/services/__tests__/accounts.test.ts +764 -0
- package/templates/base/src/server/services/__tests__/audits.test.ts +235 -0
- package/templates/base/src/server/services/__tests__/auth.test.ts +765 -0
- package/templates/base/src/server/services/__tests__/invitations.test.ts +704 -0
- package/templates/base/src/server/services/__tests__/users.test.ts +755 -0
- package/templates/base/src/server/services/accounts.ts +269 -0
- package/templates/base/src/server/services/audits.ts +82 -0
- package/templates/base/src/server/services/auth.ts +225 -0
- package/templates/base/src/server/services/index.ts +6 -0
- package/templates/base/src/server/services/invitations.ts +306 -0
- package/templates/base/src/server/services/users.ts +350 -0
- package/templates/base/src/server/types/auth.ts +36 -0
- package/templates/base/src/server/types/index.ts +117 -0
- package/templates/base/src/shared/schemas/.gitkeep +0 -0
- package/templates/base/src/shared/schemas/__tests__/schemas.test.ts +547 -0
- package/templates/base/src/shared/schemas/account.ts +15 -0
- package/templates/base/src/shared/schemas/index.ts +6 -0
- package/templates/base/src/shared/schemas/invitation.ts +9 -0
- package/templates/base/src/shared/schemas/profile.ts +10 -0
- package/templates/base/src/shared/schemas/user.ts +16 -0
- package/templates/base/src/shared/schemas/webhook.ts +12 -0
- package/templates/base/src/shared/types/.gitkeep +0 -0
- package/templates/base/src/shared/types/account.ts +12 -0
- package/templates/base/src/shared/types/api.ts +1399 -0
- package/templates/base/src/shared/types/auth.ts +24 -0
- package/templates/base/src/shared/types/index.ts +5 -0
- package/templates/base/src/shared/types/user.ts +31 -0
- package/templates/base/src/test/vitest-zod-matcher.ts +37 -0
- package/templates/base/src/test/vitest.d.ts +19 -0
- package/templates/base/tests/e2e/README.md +141 -0
- package/templates/base/tests/e2e/a11y/accessibility.spec.ts +925 -0
- package/templates/base/tests/e2e/a11y/keyboard-navigation.spec.ts +610 -0
- package/templates/base/tests/e2e/api/accounts.spec.ts +148 -0
- package/templates/base/tests/e2e/api/audit-logs.spec.ts +130 -0
- package/templates/base/tests/e2e/api/authenticated-api.spec.ts +311 -0
- package/templates/base/tests/e2e/api/storage.spec.ts +109 -0
- package/templates/base/tests/e2e/auth-flows.unauth.spec.ts +117 -0
- package/templates/base/tests/e2e/auth-logout.unauth.spec.ts +103 -0
- package/templates/base/tests/e2e/auth.setup.ts +115 -0
- package/templates/base/tests/e2e/auth.spec.ts +146 -0
- package/templates/base/tests/e2e/compatibility/cross-browser.spec.ts +152 -0
- package/templates/base/tests/e2e/compatibility/cross-browser.spec.ts-snapshots/login-chromium-chromium-darwin.png +0 -0
- package/templates/base/tests/e2e/crud/account.spec.ts +356 -0
- package/templates/base/tests/e2e/crud/integrations.spec.ts +419 -0
- package/templates/base/tests/e2e/crud/team.spec.ts +287 -0
- package/templates/base/tests/e2e/crud/users.spec.ts +239 -0
- package/templates/base/tests/e2e/errors/error-boundary.spec.ts +428 -0
- package/templates/base/tests/e2e/errors/error-handling.spec.ts +47 -0
- package/templates/base/tests/e2e/errors/error-handling.unauth.spec.ts +205 -0
- package/templates/base/tests/e2e/fixtures.ts +266 -0
- package/templates/base/tests/e2e/forms/validation.spec.ts +569 -0
- package/templates/base/tests/e2e/invitations/invite-flow.unauth.spec.ts +204 -0
- package/templates/base/tests/e2e/journeys/account-lifecycle.spec.ts +314 -0
- package/templates/base/tests/e2e/journeys/audit-investigation.spec.ts +299 -0
- package/templates/base/tests/e2e/journeys/auth-onboarding.spec.ts +232 -0
- package/templates/base/tests/e2e/journeys/critical-flows.spec.ts +281 -0
- package/templates/base/tests/e2e/journeys/error-recovery.spec.ts +354 -0
- package/templates/base/tests/e2e/journeys/file-management.spec.ts +307 -0
- package/templates/base/tests/e2e/journeys/integrations.spec.ts +372 -0
- package/templates/base/tests/e2e/journeys/multi-account.spec.ts +317 -0
- package/templates/base/tests/e2e/journeys/rbac-enforcement.spec.ts +389 -0
- package/templates/base/tests/e2e/journeys/settings-profile.spec.ts +400 -0
- package/templates/base/tests/e2e/journeys/team-collaboration.spec.ts +410 -0
- package/templates/base/tests/e2e/mobile/responsive.spec.ts +178 -0
- package/templates/base/tests/e2e/navigation/routing.spec.ts +371 -0
- package/templates/base/tests/e2e/navigation/sidebar.spec.ts +425 -0
- package/templates/base/tests/e2e/pages/ui-features.spec.ts +393 -0
- package/templates/base/tests/e2e/performance/baselines.spec.ts +162 -0
- package/templates/base/tests/e2e/performance/benchmarks.spec.ts +371 -0
- package/templates/base/tests/e2e/smoke.unauth.spec.ts +196 -0
- package/templates/base/tests/e2e/visual/components.spec.ts +650 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/confirmation-dialog-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/dark-mode-background-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/dark-mode-card-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/dark-mode-sidebar-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/dashboard-card-single-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/dialog-content-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/dialog-with-backdrop-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/empty-search-results-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/input-default-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/input-focus-ring-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/primary-button-focus-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/primary-button-hover-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/primary-button-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/sidebar-active-nav-item-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/sidebar-collapsed-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/components.spec.ts-snapshots/sidebar-navigation-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts +192 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/account-page-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/create-webhook-dialog-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/dashboard-page-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/delete-account-dialog-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/integrations-page-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/invite-member-dialog-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/login-page-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/settings-account-tab-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/settings-profile-tab-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/sidebar-navigation-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/core-components.spec.ts-snapshots/team-page-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/screenshots.spec.ts +230 -0
- package/templates/base/tests/e2e/visual/screenshots.spec.ts-snapshots/404-page-chromium-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/screenshots.spec.ts-snapshots/404-page-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/screenshots.spec.ts-snapshots/account-page-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/screenshots.spec.ts-snapshots/login-page-chromium-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/screenshots.spec.ts-snapshots/login-page-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/screenshots.spec.ts-snapshots/settings-page-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/screenshots.spec.ts-snapshots/team-invite-dialog-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/screenshots.spec.ts-snapshots/team-page-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/screenshots.spec.ts-snapshots/webhook-create-dialog-visual-darwin.png +0 -0
- package/templates/base/tests/e2e/visual/theme-colors.spec.ts +293 -0
- package/templates/base/tests/e2e/visual/ui-components.spec.ts +502 -0
- package/templates/base/tests/integration/accounts/crud.test.ts +1402 -0
- package/templates/base/tests/integration/audits/list.test.ts +1133 -0
- package/templates/base/tests/integration/auth/auth-service.test.ts +415 -0
- package/templates/base/tests/integration/auth/invitation-token.test.ts +529 -0
- package/templates/base/tests/integration/auth/logout.test.ts +524 -0
- package/templates/base/tests/integration/auth/oauth.test.ts +768 -0
- package/templates/base/tests/integration/auth/refresh-token.test.ts +364 -0
- package/templates/base/tests/integration/auth/session-expiry.test.ts +569 -0
- package/templates/base/tests/integration/auth/session.test.ts +520 -0
- package/templates/base/tests/integration/auth/super-admin.test.ts +451 -0
- package/templates/base/tests/integration/authorization/analytics-role.test.ts +1026 -0
- package/templates/base/tests/integration/authorization/billing-role.test.ts +776 -0
- package/templates/base/tests/integration/authorization/guards-roles.test.ts +539 -0
- package/templates/base/tests/integration/authorization/multi-tenancy.test.ts +1112 -0
- package/templates/base/tests/integration/authorization/role-hierarchy.test.ts +931 -0
- package/templates/base/tests/integration/authorization/roles.test.ts +1347 -0
- package/templates/base/tests/integration/config/production-behavior.test.ts +536 -0
- package/templates/base/tests/integration/db/constraints.test.ts +695 -0
- package/templates/base/tests/integration/fixtures/accounts.ts +136 -0
- package/templates/base/tests/integration/fixtures/index.ts +232 -0
- package/templates/base/tests/integration/fixtures/invitations.ts +195 -0
- package/templates/base/tests/integration/fixtures/users.ts +144 -0
- package/templates/base/tests/integration/health/health.test.ts +351 -0
- package/templates/base/tests/integration/invitations/crud.test.ts +1457 -0
- package/templates/base/tests/integration/invitations/email.test.ts +506 -0
- package/templates/base/tests/integration/lib/email.test.ts +174 -0
- package/templates/base/tests/integration/lib/oauth.test.ts +368 -0
- package/templates/base/tests/integration/lib/password.test.ts +192 -0
- package/templates/base/tests/integration/lib/schema-helpers.test.ts +129 -0
- package/templates/base/tests/integration/lib/tokens.test.ts +304 -0
- package/templates/base/tests/integration/middleware/auth.test.ts +499 -0
- package/templates/base/tests/integration/middleware/cors.test.ts +334 -0
- package/templates/base/tests/integration/middleware/request-context.test.ts +156 -0
- package/templates/base/tests/integration/middleware/request-logger.test.ts +313 -0
- package/templates/base/tests/integration/performance/response-times.test.ts +509 -0
- package/templates/base/tests/integration/security/cookie-security.test.ts +567 -0
- package/templates/base/tests/integration/security/csrf-protection.test.ts +542 -0
- package/templates/base/tests/integration/security/jwt-validation.test.ts +209 -0
- package/templates/base/tests/integration/security/log-sanitization.test.ts +658 -0
- package/templates/base/tests/integration/security/rate-limiting.test.ts +1251 -0
- package/templates/base/tests/integration/security/sql-injection.test.ts +663 -0
- package/templates/base/tests/integration/security/token-hashing.test.ts +371 -0
- package/templates/base/tests/integration/security/xss-prevention.test.ts +541 -0
- package/templates/base/tests/integration/setup.ts +834 -0
- package/templates/base/tests/integration/smoke.test.ts +288 -0
- package/templates/base/tests/integration/storage/upload.test.ts +1162 -0
- package/templates/base/tests/integration/storage/validation.test.ts +746 -0
- package/templates/base/tests/integration/users/crud.test.ts +1297 -0
- package/templates/base/tests/integration/users/list.test.ts +698 -0
- package/templates/base/tests/integration/vitest.config.ts +80 -0
- package/templates/base/tsconfig.app.json +18 -0
- package/templates/base/tsconfig.json +39 -0
- package/templates/base/tsconfig.node.json +16 -0
- package/templates/base/tsconfig.server.json +26 -0
- package/templates/base/tsconfig.tsbuildinfo +1 -0
- package/templates/base/vite.config.ts +46 -0
- package/templates/base/vitest.config.browser.ts +47 -0
- package/templates/base/vitest.config.frontend.ts +47 -0
- package/templates/base/vitest.config.ts +82 -0
- package/templates/base/vitest.workspace.ts +22 -0
- package/templates/modules/audit-logs/.gitkeep +0 -0
- package/templates/modules/billing/.gitkeep +0 -0
- package/templates/modules/invitations/.gitkeep +0 -0
- package/templates/modules/storage/.gitkeep +0 -0
- package/templates/modules/webhooks/.gitkeep +0 -0
- package/templates/providers/auth-email/.gitkeep +0 -0
- package/templates/providers/auth-github/.gitkeep +0 -0
- package/templates/providers/auth-google/.gitkeep +0 -0
- package/templates/providers/email-resend/.gitkeep +0 -0
- package/templates/providers/email-sendgrid/.gitkeep +0 -0
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
# Hono Boilerplate
|
|
2
|
+
|
|
3
|
+
A production-ready, fully-typed, multi-tenant SaaS boilerplate built with **Hono.js** and **React**, designed for deployment on **Cloudflare Workers**.
|
|
4
|
+
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://hono.dev/)
|
|
7
|
+
[](https://react.dev/)
|
|
8
|
+
[](https://workers.cloudflare.com/)
|
|
9
|
+
[](https://playwright.dev/)
|
|
10
|
+
[](/)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
This boilerplate provides everything you need to build a modern, secure, and scalable SaaS application:
|
|
17
|
+
|
|
18
|
+
- **Multi-tenant architecture** with role-based access control
|
|
19
|
+
- **Google OAuth authentication** with session management
|
|
20
|
+
- **Team collaboration** with email invitations
|
|
21
|
+
- **Comprehensive audit logging** for compliance
|
|
22
|
+
- **Full-stack type safety** from database to frontend
|
|
23
|
+
- **363+ E2E tests** covering all critical paths
|
|
24
|
+
- **94%+ test coverage** across all layers
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
### Authentication & Authorization
|
|
31
|
+
- Google OAuth 2.0 with PKCE (Proof Key for Code Exchange)
|
|
32
|
+
- Session-based authentication via Cloudflare KV
|
|
33
|
+
- Secure httpOnly cookies with SameSite protection
|
|
34
|
+
- Role-based access control: `ADMIN`, `EDITOR`, `VIEWER`
|
|
35
|
+
- Token refresh mechanism
|
|
36
|
+
- User-agent fingerprint validation
|
|
37
|
+
|
|
38
|
+
### Multi-Tenant Architecture
|
|
39
|
+
- Workspaces/Organizations (Accounts)
|
|
40
|
+
- Users can belong to multiple accounts
|
|
41
|
+
- Fine-grained permissions per account
|
|
42
|
+
- Invitation system with email notifications
|
|
43
|
+
|
|
44
|
+
### Developer Experience
|
|
45
|
+
- Full TypeScript with strict mode
|
|
46
|
+
- Auto-generated OpenAPI documentation
|
|
47
|
+
- Request context tracking (transactionId, IP, userAgent)
|
|
48
|
+
- Comprehensive error handling
|
|
49
|
+
- Hot module replacement in development
|
|
50
|
+
|
|
51
|
+
### Security
|
|
52
|
+
- Rate limiting middleware (in-memory with lazy cleanup)
|
|
53
|
+
- CSRF protection via SameSite cookies
|
|
54
|
+
- XSS prevention with secure headers
|
|
55
|
+
- SQL injection protection via Drizzle ORM
|
|
56
|
+
|
|
57
|
+
### Testing
|
|
58
|
+
- Unit tests with Vitest (94%+ coverage)
|
|
59
|
+
- Integration tests (93%+ coverage)
|
|
60
|
+
- E2E tests with Playwright (363+ tests)
|
|
61
|
+
- Visual regression testing
|
|
62
|
+
- Accessibility testing (WCAG compliance)
|
|
63
|
+
- Mobile device emulation
|
|
64
|
+
- Production testing with OAuth session capture
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Tech Stack
|
|
69
|
+
|
|
70
|
+
| Layer | Technology |
|
|
71
|
+
|-------|-----------|
|
|
72
|
+
| **Runtime** | Cloudflare Workers |
|
|
73
|
+
| **Backend** | Hono.js 4.6 |
|
|
74
|
+
| **Frontend** | React 19 + TanStack Router |
|
|
75
|
+
| **Database** | Cloudflare D1 (SQLite) |
|
|
76
|
+
| **ORM** | Drizzle ORM |
|
|
77
|
+
| **Sessions** | Cloudflare KV |
|
|
78
|
+
| **Storage** | Cloudflare R2 |
|
|
79
|
+
| **Styling** | Tailwind CSS 4.0 |
|
|
80
|
+
| **Validation** | Zod |
|
|
81
|
+
| **Testing** | Vitest + Playwright |
|
|
82
|
+
| **Email** | SendGrid |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Quick Start
|
|
87
|
+
|
|
88
|
+
### Prerequisites
|
|
89
|
+
|
|
90
|
+
- Node.js 20+
|
|
91
|
+
- pnpm (recommended), npm, or yarn
|
|
92
|
+
- Cloudflare account (for deployment)
|
|
93
|
+
- Google Cloud Console project (for OAuth)
|
|
94
|
+
|
|
95
|
+
### Installation
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Clone the repository
|
|
99
|
+
git clone https://github.com/your-org/{{projectName}}.git
|
|
100
|
+
cd {{projectName}}
|
|
101
|
+
|
|
102
|
+
# Install dependencies
|
|
103
|
+
pnpm install
|
|
104
|
+
|
|
105
|
+
# Copy environment variables
|
|
106
|
+
cp .env.example .env
|
|
107
|
+
|
|
108
|
+
# Apply database migrations
|
|
109
|
+
pnpm db:migrate:local
|
|
110
|
+
|
|
111
|
+
# Seed test data (optional)
|
|
112
|
+
pnpm db:seed
|
|
113
|
+
|
|
114
|
+
# Start development server
|
|
115
|
+
pnpm dev
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The application will be available at `http://localhost:5173`
|
|
119
|
+
|
|
120
|
+
### Environment Variables
|
|
121
|
+
|
|
122
|
+
```env
|
|
123
|
+
# Server
|
|
124
|
+
PORT=3000
|
|
125
|
+
NODE_ENV=development
|
|
126
|
+
|
|
127
|
+
# Authentication
|
|
128
|
+
JWT_SECRET=your-secret-key-min-32-chars
|
|
129
|
+
JWT_EXPIRY_MINUTES=15
|
|
130
|
+
REFRESH_TOKEN_EXPIRY_DAYS=30
|
|
131
|
+
|
|
132
|
+
# Google OAuth
|
|
133
|
+
GOOGLE_CLIENT_ID=your-google-client-id
|
|
134
|
+
GOOGLE_CLIENT_SECRET=your-google-client-secret
|
|
135
|
+
GOOGLE_REDIRECT_URI=http://localhost:3000/auth/callback
|
|
136
|
+
|
|
137
|
+
# Email (SendGrid)
|
|
138
|
+
SENDGRID_API_KEY=your-sendgrid-api-key
|
|
139
|
+
SENDGRID_FROM_EMAIL=noreply@yourdomain.com
|
|
140
|
+
|
|
141
|
+
# Application
|
|
142
|
+
APP_URL=http://localhost:3000
|
|
143
|
+
CORS_ORIGINS=*
|
|
144
|
+
LOG_LEVEL=info
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Project Structure
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
├── config/ # Configuration files
|
|
153
|
+
│ ├── eslint.config.js # ESLint configuration
|
|
154
|
+
│ ├── wrangler.json # Cloudflare Workers config
|
|
155
|
+
│ ├── drizzle.config.ts # Drizzle ORM config
|
|
156
|
+
│ └── ...
|
|
157
|
+
│
|
|
158
|
+
├── src/
|
|
159
|
+
│ ├── server/ # Backend (Hono.js)
|
|
160
|
+
│ │ ├── routes/ # API endpoints
|
|
161
|
+
│ │ │ ├── auth/ # Authentication
|
|
162
|
+
│ │ │ ├── users/ # User CRUD
|
|
163
|
+
│ │ │ ├── accounts/ # Multi-tenant accounts
|
|
164
|
+
│ │ │ ├── invitations/ # Team invitations
|
|
165
|
+
│ │ │ ├── audits/ # Audit logs
|
|
166
|
+
│ │ │ └── storage/ # File storage (R2)
|
|
167
|
+
│ │ ├── services/ # Business logic
|
|
168
|
+
│ │ ├── middleware/ # Request middleware
|
|
169
|
+
│ │ ├── db/ # Database (Drizzle ORM)
|
|
170
|
+
│ │ │ └── schema/ # Table definitions
|
|
171
|
+
│ │ ├── auth/ # Roles, permissions, guards
|
|
172
|
+
│ │ └── lib/ # Utilities
|
|
173
|
+
│ │
|
|
174
|
+
│ ├── client/ # Frontend (React)
|
|
175
|
+
│ │ ├── routes/ # File-based routing
|
|
176
|
+
│ │ │ ├── _authenticated/ # Protected pages
|
|
177
|
+
│ │ │ └── ...
|
|
178
|
+
│ │ ├── components/ # UI components
|
|
179
|
+
│ │ │ ├── ui/ # Base components
|
|
180
|
+
│ │ │ └── layout/ # Layout components
|
|
181
|
+
│ │ ├── hooks/ # React hooks
|
|
182
|
+
│ │ └── lib/ # Client utilities
|
|
183
|
+
│ │
|
|
184
|
+
│ └── shared/ # Shared code
|
|
185
|
+
│ ├── schemas/ # Zod validation
|
|
186
|
+
│ └── types/ # TypeScript types
|
|
187
|
+
│
|
|
188
|
+
├── tests/ # All tests
|
|
189
|
+
│ ├── e2e/ # End-to-end tests (Playwright)
|
|
190
|
+
│ │ ├── crud/ # CRUD operations
|
|
191
|
+
│ │ ├── journeys/ # User journeys
|
|
192
|
+
│ │ ├── api/ # API tests
|
|
193
|
+
│ │ ├── a11y/ # Accessibility
|
|
194
|
+
│ │ ├── mobile/ # Mobile responsive
|
|
195
|
+
│ │ ├── visual/ # Visual regression
|
|
196
|
+
│ │ ├── .auth/ # Auth state files
|
|
197
|
+
│ │ └── auth.setup.ts # Auth setup
|
|
198
|
+
│ │
|
|
199
|
+
│ └── integration/ # Integration tests
|
|
200
|
+
│ ├── auth/ # Auth tests
|
|
201
|
+
│ ├── accounts/ # Account tests
|
|
202
|
+
│ ├── users/ # User tests
|
|
203
|
+
│ ├── security/ # Security tests
|
|
204
|
+
│ └── ...
|
|
205
|
+
│
|
|
206
|
+
├── scripts/ # Utility scripts
|
|
207
|
+
│ └── capture-prod-session.ts # OAuth session capture
|
|
208
|
+
│
|
|
209
|
+
├── docs/ # Documentation
|
|
210
|
+
│ └── testing.md # Testing guide
|
|
211
|
+
│
|
|
212
|
+
└── migrations/ # D1 SQL migrations
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Documentation
|
|
218
|
+
|
|
219
|
+
- `docs/app_spec.txt` - Canonical app specification and architecture overview
|
|
220
|
+
- `docs/architecture/README.md` - Architecture docs index
|
|
221
|
+
- `docs/testing.md` - Testing guide
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Internal CLI (BHono)
|
|
226
|
+
|
|
227
|
+
Use the internal CLI to scaffold new apps:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
# Recommended (no global install)
|
|
231
|
+
pnpm dlx @etus/bhono-app <project-name>
|
|
232
|
+
|
|
233
|
+
# npm shortcut (uses create-bhono-app)
|
|
234
|
+
npm init bhono-app <project-name>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Database Schema
|
|
240
|
+
|
|
241
|
+
### Core Tables
|
|
242
|
+
|
|
243
|
+
```sql
|
|
244
|
+
-- Users
|
|
245
|
+
users (
|
|
246
|
+
id UUID PRIMARY KEY,
|
|
247
|
+
google_id TEXT UNIQUE,
|
|
248
|
+
email TEXT NOT NULL,
|
|
249
|
+
name TEXT,
|
|
250
|
+
avatar_url TEXT,
|
|
251
|
+
status TEXT DEFAULT 'active',
|
|
252
|
+
is_super_admin BOOLEAN DEFAULT FALSE,
|
|
253
|
+
created_at TIMESTAMP,
|
|
254
|
+
updated_at TIMESTAMP,
|
|
255
|
+
deleted_at TIMESTAMP
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
-- Accounts (Workspaces/Organizations)
|
|
259
|
+
accounts (
|
|
260
|
+
id UUID PRIMARY KEY,
|
|
261
|
+
name TEXT NOT NULL,
|
|
262
|
+
description TEXT,
|
|
263
|
+
domain TEXT UNIQUE,
|
|
264
|
+
created_at TIMESTAMP,
|
|
265
|
+
updated_at TIMESTAMP,
|
|
266
|
+
deleted_at TIMESTAMP
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
-- User-Account Mapping with Roles
|
|
270
|
+
user_accounts (
|
|
271
|
+
user_id UUID REFERENCES users(id),
|
|
272
|
+
account_id UUID REFERENCES accounts(id),
|
|
273
|
+
role TEXT CHECK (role IN ('ADMIN', 'EDITOR', 'VIEWER')),
|
|
274
|
+
PRIMARY KEY (user_id, account_id)
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
-- Audit Logs
|
|
278
|
+
audit_logs (
|
|
279
|
+
id UUID PRIMARY KEY,
|
|
280
|
+
user_id UUID,
|
|
281
|
+
account_id UUID,
|
|
282
|
+
action TEXT,
|
|
283
|
+
resource_type TEXT,
|
|
284
|
+
resource_id TEXT,
|
|
285
|
+
changes JSONB,
|
|
286
|
+
ip_address TEXT,
|
|
287
|
+
user_agent TEXT,
|
|
288
|
+
created_at TIMESTAMP
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
-- Invitations
|
|
292
|
+
invitations (
|
|
293
|
+
id UUID PRIMARY KEY,
|
|
294
|
+
email TEXT NOT NULL,
|
|
295
|
+
account_id UUID,
|
|
296
|
+
invited_by UUID,
|
|
297
|
+
token TEXT UNIQUE,
|
|
298
|
+
accepted_at TIMESTAMP,
|
|
299
|
+
expires_at TIMESTAMP
|
|
300
|
+
)
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Migrations
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
# Apply migrations locally
|
|
307
|
+
pnpm db:migrate:local
|
|
308
|
+
|
|
309
|
+
# Apply migrations to production
|
|
310
|
+
pnpm db:migrate:remote
|
|
311
|
+
|
|
312
|
+
# Generate Cloudflare types
|
|
313
|
+
pnpm cf-typegen
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## API Reference
|
|
319
|
+
|
|
320
|
+
### Authentication
|
|
321
|
+
|
|
322
|
+
| Method | Endpoint | Description |
|
|
323
|
+
|--------|----------|-------------|
|
|
324
|
+
| `GET` | `/auth/login` | Initiate Google OAuth |
|
|
325
|
+
| `GET` | `/auth/callback` | OAuth callback |
|
|
326
|
+
| `POST` | `/auth/logout` | Destroy session |
|
|
327
|
+
| `GET` | `/auth/me` | Get current user |
|
|
328
|
+
| `POST` | `/auth/refresh` | Refresh token |
|
|
329
|
+
|
|
330
|
+
### Users
|
|
331
|
+
|
|
332
|
+
| Method | Endpoint | Description |
|
|
333
|
+
|--------|----------|-------------|
|
|
334
|
+
| `GET` | `/api/users` | List users (paginated) |
|
|
335
|
+
| `POST` | `/api/users` | Create user |
|
|
336
|
+
| `GET` | `/api/users/:id` | Get user by ID |
|
|
337
|
+
| `PATCH` | `/api/users/:id` | Update user |
|
|
338
|
+
| `DELETE` | `/api/users/:id` | Delete user |
|
|
339
|
+
|
|
340
|
+
### Accounts
|
|
341
|
+
|
|
342
|
+
| Method | Endpoint | Description |
|
|
343
|
+
|--------|----------|-------------|
|
|
344
|
+
| `GET` | `/api/accounts` | List accounts |
|
|
345
|
+
| `POST` | `/api/accounts` | Create account |
|
|
346
|
+
| `GET` | `/api/accounts/:id` | Get account |
|
|
347
|
+
| `PATCH` | `/api/accounts/:id` | Update account |
|
|
348
|
+
| `GET` | `/api/accounts/:id/members` | List members |
|
|
349
|
+
| `POST` | `/api/accounts/:id/members` | Add member |
|
|
350
|
+
| `DELETE` | `/api/accounts/:id/members/:userId` | Remove member |
|
|
351
|
+
|
|
352
|
+
### Invitations
|
|
353
|
+
|
|
354
|
+
| Method | Endpoint | Description |
|
|
355
|
+
|--------|----------|-------------|
|
|
356
|
+
| `GET` | `/api/invitations` | List invitations |
|
|
357
|
+
| `POST` | `/api/invitations` | Send invitation |
|
|
358
|
+
| `POST` | `/api/invitations/:id/accept` | Accept invitation |
|
|
359
|
+
| `POST` | `/api/invitations/:id/cancel` | Cancel invitation |
|
|
360
|
+
|
|
361
|
+
### Documentation
|
|
362
|
+
|
|
363
|
+
| Endpoint | Description |
|
|
364
|
+
|----------|-------------|
|
|
365
|
+
| `/api/doc` | OpenAPI 3.0 JSON |
|
|
366
|
+
| `/api/swagger` | Swagger UI |
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
## Testing
|
|
371
|
+
|
|
372
|
+
### Test Coverage
|
|
373
|
+
|
|
374
|
+
| Layer | Statements | Branches | Functions | Lines |
|
|
375
|
+
|-------|------------|----------|-----------|-------|
|
|
376
|
+
| **Server Unit** | 94.50% | 85.98% | 96.15% | 94.74% |
|
|
377
|
+
| **Integration** | 93.19% | 84.88% | 92.48% | 93.51% |
|
|
378
|
+
| **Client Unit** | 90.82% | 87.82% | 96.87% | 91.97% |
|
|
379
|
+
| **E2E** | 363 tests | - | - | 100% pass |
|
|
380
|
+
|
|
381
|
+
### Unit Tests
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
# Run server tests in watch mode
|
|
385
|
+
pnpm test
|
|
386
|
+
|
|
387
|
+
# Run server tests once with coverage
|
|
388
|
+
pnpm test:unit:server
|
|
389
|
+
|
|
390
|
+
# Run client tests with coverage
|
|
391
|
+
pnpm test:unit:client
|
|
392
|
+
|
|
393
|
+
# Run all unit tests
|
|
394
|
+
pnpm test:unit
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### Integration Tests
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
# Run integration tests
|
|
401
|
+
pnpm test:integration
|
|
402
|
+
|
|
403
|
+
# Run integration tests in watch mode
|
|
404
|
+
pnpm test:integration:watch
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### End-to-End Tests
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
# Run all E2E tests
|
|
411
|
+
pnpm test:e2e
|
|
412
|
+
|
|
413
|
+
# Interactive UI mode
|
|
414
|
+
pnpm test:e2e:ui
|
|
415
|
+
|
|
416
|
+
# Visible browser
|
|
417
|
+
pnpm test:e2e:headed
|
|
418
|
+
|
|
419
|
+
# Debug mode
|
|
420
|
+
pnpm test:e2e:debug
|
|
421
|
+
|
|
422
|
+
# View HTML report
|
|
423
|
+
pnpm test:e2e:report
|
|
424
|
+
|
|
425
|
+
# Run specific tests by tag
|
|
426
|
+
npx playwright test --grep "@smoke"
|
|
427
|
+
npx playwright test --grep "@critical"
|
|
428
|
+
npx playwright test --grep "@visual"
|
|
429
|
+
npx playwright test --grep "@a11y"
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Production Testing
|
|
433
|
+
|
|
434
|
+
Test against the live production deployment with OAuth authentication:
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
# Step 1: Capture OAuth session (opens browser for manual login)
|
|
438
|
+
pnpm test:e2e:prod:auth
|
|
439
|
+
|
|
440
|
+
# Step 2: Run tests against production
|
|
441
|
+
pnpm test:e2e:prod
|
|
442
|
+
|
|
443
|
+
# Or with custom URL
|
|
444
|
+
BASE_URL=https://your-app.workers.dev pnpm test:e2e
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### Test Categories
|
|
448
|
+
|
|
449
|
+
| Tag | Description |
|
|
450
|
+
|-----|-------------|
|
|
451
|
+
| `@smoke` | Basic smoke tests |
|
|
452
|
+
| `@critical` | Critical paths (all browsers) |
|
|
453
|
+
| `@crud` | CRUD operations |
|
|
454
|
+
| `@mobile` | Mobile responsive |
|
|
455
|
+
| `@visual` | Visual regression |
|
|
456
|
+
| `@a11y` | Accessibility |
|
|
457
|
+
| `@api` | API integration |
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## Deployment
|
|
462
|
+
|
|
463
|
+
### Cloudflare Workers
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
# Build the application
|
|
467
|
+
pnpm build
|
|
468
|
+
|
|
469
|
+
# Deploy to Cloudflare
|
|
470
|
+
wrangler deploy --config config/wrangler.json
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### Cloudflare Configuration (`config/wrangler.json`)
|
|
474
|
+
|
|
475
|
+
```json
|
|
476
|
+
{
|
|
477
|
+
"name": "{{projectName}}",
|
|
478
|
+
"main": "../src/server/index.ts",
|
|
479
|
+
"compatibility_date": "2025-01-01",
|
|
480
|
+
"compatibility_flags": ["nodejs_compat"],
|
|
481
|
+
"d1_databases": [{
|
|
482
|
+
"binding": "DB",
|
|
483
|
+
"database_name": "{{projectName}}-db"
|
|
484
|
+
}],
|
|
485
|
+
"r2_buckets": [{
|
|
486
|
+
"binding": "R2_BUCKET",
|
|
487
|
+
"bucket_name": "{{projectName}}-storage"
|
|
488
|
+
}],
|
|
489
|
+
"kv_namespaces": [{
|
|
490
|
+
"binding": "SESSIONS",
|
|
491
|
+
"id": "your-kv-namespace-id"
|
|
492
|
+
}],
|
|
493
|
+
"assets": {
|
|
494
|
+
"directory": "../dist",
|
|
495
|
+
"run_worker_first": ["/api/*", "/auth/*"]
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### Required Cloudflare Resources
|
|
501
|
+
|
|
502
|
+
1. **D1 Database**: Create via Cloudflare dashboard or CLI
|
|
503
|
+
2. **R2 Bucket**: For file storage
|
|
504
|
+
3. **KV Namespace**: For session management
|
|
505
|
+
|
|
506
|
+
```bash
|
|
507
|
+
# Create D1 database
|
|
508
|
+
wrangler d1 create {{projectName}}-db
|
|
509
|
+
|
|
510
|
+
# Create R2 bucket
|
|
511
|
+
wrangler r2 bucket create {{projectName}}-storage
|
|
512
|
+
|
|
513
|
+
# Create KV namespace
|
|
514
|
+
wrangler kv:namespace create SESSIONS
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
---
|
|
518
|
+
|
|
519
|
+
## Architecture
|
|
520
|
+
|
|
521
|
+
### Request Flow
|
|
522
|
+
|
|
523
|
+
```
|
|
524
|
+
Client (React SPA)
|
|
525
|
+
│
|
|
526
|
+
▼
|
|
527
|
+
Fetch API (cookies)
|
|
528
|
+
│
|
|
529
|
+
▼
|
|
530
|
+
┌───────────────────────────────────┐
|
|
531
|
+
│ Cloudflare Worker │
|
|
532
|
+
│ │
|
|
533
|
+
│ ┌─────────────────────────────┐ │
|
|
534
|
+
│ │ Middleware Stack │ │
|
|
535
|
+
│ │ - Error Handler │ │
|
|
536
|
+
│ │ - Request Context │ │
|
|
537
|
+
│ │ - Request Logger │ │
|
|
538
|
+
│ │ - CORS │ │
|
|
539
|
+
│ │ - Security Headers │ │
|
|
540
|
+
│ │ - Rate Limiting │ │
|
|
541
|
+
│ │ - Session Auth │ │
|
|
542
|
+
│ │ - Account Context │ │
|
|
543
|
+
│ └─────────────────────────────┘ │
|
|
544
|
+
│ │ │
|
|
545
|
+
│ ▼ │
|
|
546
|
+
│ ┌─────────────────────────────┐ │
|
|
547
|
+
│ │ Route Handler │ │
|
|
548
|
+
│ │ (Zod validation) │ │
|
|
549
|
+
│ └─────────────────────────────┘ │
|
|
550
|
+
│ │ │
|
|
551
|
+
│ ▼ │
|
|
552
|
+
│ ┌─────────────────────────────┐ │
|
|
553
|
+
│ │ Service Layer │ │
|
|
554
|
+
│ │ (Business logic) │ │
|
|
555
|
+
│ └─────────────────────────────┘ │
|
|
556
|
+
│ │ │
|
|
557
|
+
│ ▼ │
|
|
558
|
+
│ ┌─────────────────────────────┐ │
|
|
559
|
+
│ │ Drizzle ORM │ │
|
|
560
|
+
│ └─────────────────────────────┘ │
|
|
561
|
+
│ │ │
|
|
562
|
+
└──────────────┼────────────────────┘
|
|
563
|
+
▼
|
|
564
|
+
┌──────────────┐
|
|
565
|
+
│ D1 Database │
|
|
566
|
+
└──────────────┘
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
### Path Aliases
|
|
570
|
+
|
|
571
|
+
```typescript
|
|
572
|
+
import { Button } from '@/components/ui/button' // Client
|
|
573
|
+
import { userSchema } from '@shared/schemas' // Shared
|
|
574
|
+
import { createUser } from '@server/services/users' // Server
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
---
|
|
578
|
+
|
|
579
|
+
## Scripts Reference
|
|
580
|
+
|
|
581
|
+
| Script | Description |
|
|
582
|
+
|--------|-------------|
|
|
583
|
+
| `pnpm dev` | Start development server |
|
|
584
|
+
| `pnpm build` | Build for production |
|
|
585
|
+
| `pnpm preview` | Preview production build |
|
|
586
|
+
| `pnpm lint` | Run ESLint |
|
|
587
|
+
| `pnpm typecheck` | Run TypeScript checks |
|
|
588
|
+
| **Database** | |
|
|
589
|
+
| `pnpm db:migrate:local` | Apply local migrations |
|
|
590
|
+
| `pnpm db:migrate:remote` | Apply remote migrations |
|
|
591
|
+
| `pnpm db:seed` | Seed database |
|
|
592
|
+
| `pnpm cf-typegen` | Generate Cloudflare types |
|
|
593
|
+
| **API** | |
|
|
594
|
+
| `pnpm api:spec` | Generate OpenAPI spec (docs/openapi.json) |
|
|
595
|
+
| `pnpm api:types` | Generate TypeScript types from OpenAPI |
|
|
596
|
+
| **Testing** | |
|
|
597
|
+
| `pnpm test` | Run backend unit tests (watch) |
|
|
598
|
+
| `pnpm test:unit:server` | Backend tests with coverage |
|
|
599
|
+
| `pnpm test:unit:client` | Frontend tests with coverage |
|
|
600
|
+
| `pnpm test:integration` | Integration tests |
|
|
601
|
+
| `pnpm test:e2e` | Run E2E tests |
|
|
602
|
+
| `pnpm test:e2e:ui` | E2E interactive mode |
|
|
603
|
+
| `pnpm test:e2e:prod` | E2E against production |
|
|
604
|
+
| `pnpm test:e2e:prod:auth` | Capture OAuth session |
|
|
605
|
+
| **Deployment** | |
|
|
606
|
+
| `wrangler deploy --config config/wrangler.json` | Deploy to Cloudflare |
|
|
607
|
+
|
|
608
|
+
---
|
|
609
|
+
|
|
610
|
+
## Security
|
|
611
|
+
|
|
612
|
+
### Built-in Protections
|
|
613
|
+
|
|
614
|
+
- **CSRF**: SameSite cookies + CORS validation
|
|
615
|
+
- **XSS**: Secure headers + React's built-in escaping
|
|
616
|
+
- **Session Hijacking**: httpOnly cookies, secure flag in production
|
|
617
|
+
- **SQL Injection**: Parameterized queries via Drizzle ORM
|
|
618
|
+
- **Rate Limiting**: In-memory store with configurable limits per route
|
|
619
|
+
- **Fingerprint Validation**: User-agent validation for sessions
|
|
620
|
+
|
|
621
|
+
### Audit Logging
|
|
622
|
+
|
|
623
|
+
All state-changing operations are logged:
|
|
624
|
+
|
|
625
|
+
```typescript
|
|
626
|
+
{
|
|
627
|
+
action: 'CREATE' | 'UPDATE' | 'DELETE' | 'LOGIN' | 'LOGOUT',
|
|
628
|
+
resourceType: 'user' | 'account' | 'invitation',
|
|
629
|
+
resourceId: string,
|
|
630
|
+
changes: { before: any, after: any },
|
|
631
|
+
ipAddress: string,
|
|
632
|
+
userAgent: string,
|
|
633
|
+
transactionId: string,
|
|
634
|
+
createdAt: timestamp
|
|
635
|
+
}
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
---
|
|
639
|
+
|
|
640
|
+
## Contributing
|
|
641
|
+
|
|
642
|
+
1. Fork the repository
|
|
643
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
644
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
645
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
646
|
+
5. Open a Pull Request
|
|
647
|
+
|
|
648
|
+
### Code Quality
|
|
649
|
+
|
|
650
|
+
- Run `pnpm lint` before committing
|
|
651
|
+
- Ensure all tests pass: `pnpm test:unit && pnpm test:integration && pnpm test:e2e`
|
|
652
|
+
- Maintain coverage thresholds (90%+ for server, 85%+ for client)
|
|
653
|
+
- Follow existing code patterns
|
|
654
|
+
|
|
655
|
+
---
|
|
656
|
+
|
|
657
|
+
## License
|
|
658
|
+
|
|
659
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
660
|
+
|
|
661
|
+
---
|
|
662
|
+
|
|
663
|
+
## Acknowledgments
|
|
664
|
+
|
|
665
|
+
- [Hono.js](https://hono.dev/) - Ultrafast web framework
|
|
666
|
+
- [Drizzle ORM](https://orm.drizzle.team/) - TypeScript ORM
|
|
667
|
+
- [TanStack Router](https://tanstack.com/router) - Type-safe routing
|
|
668
|
+
- [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS
|
|
669
|
+
- [Cloudflare Workers](https://workers.cloudflare.com/) - Edge computing platform
|
|
670
|
+
- [Playwright](https://playwright.dev/) - E2E testing framework
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineConfig } from 'drizzle-kit'
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
schema: '../src/server/db/schema/index.ts',
|
|
5
|
+
out: '../src/server/db/migrations',
|
|
6
|
+
dialect: 'sqlite',
|
|
7
|
+
dbCredentials: {
|
|
8
|
+
url: '../.wrangler/state/v3/d1/miniflare-D1DatabaseObject/a9de77f83189-41d984dda38d3c9c27bd.sqlite',
|
|
9
|
+
},
|
|
10
|
+
})
|