@cherishxn/agent-scaffold 0.0.0-stage → 1.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.
- package/LICENSE +21 -0
- package/README.md +99 -2
- package/THIRD_PARTY_NOTICES.md +18 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +105 -0
- package/dist/diagnostics.d.ts +10 -0
- package/dist/diagnostics.js +27 -0
- package/dist/generate.d.ts +55 -0
- package/dist/generate.js +159 -0
- package/dist/model.d.ts +33 -0
- package/dist/model.js +24 -0
- package/dist/verify.d.ts +67 -0
- package/dist/verify.js +278 -0
- package/package.json +52 -4
- package/schemas/manifest.json +171 -0
- package/schemas/plan.json +164 -0
- package/schemas/result.json +97 -0
- package/schemas/spec.json +50 -0
- package/skills/scaffold-use/SKILL.md +24 -0
- package/templates/catalog.json +37 -0
- package/templates/next-fullstack-antd/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-antd/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-antd/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-antd/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-antd/.dockerignore +18 -0
- package/templates/next-fullstack-antd/.env.example +13 -0
- package/templates/next-fullstack-antd/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-antd/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-antd/.scaffold-checks.json +7 -0
- package/templates/next-fullstack-antd/AGENTS.md +11 -0
- package/templates/next-fullstack-antd/CLAUDE.md +1 -0
- package/templates/next-fullstack-antd/DESIGN.md +208 -0
- package/templates/next-fullstack-antd/LICENSE +21 -0
- package/templates/next-fullstack-antd/README.md +64 -0
- package/templates/next-fullstack-antd/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/next-fullstack-antd/compose.yaml +18 -0
- package/templates/next-fullstack-antd/design/guide.md +61 -0
- package/templates/next-fullstack-antd/design/layout.css +6 -0
- package/templates/next-fullstack-antd/design/structure.json +107 -0
- package/templates/next-fullstack-antd/design/tokens.json +171 -0
- package/templates/next-fullstack-antd/design/widgets.css +30 -0
- package/templates/next-fullstack-antd/design/widgets.json +233 -0
- package/templates/next-fullstack-antd/docs/PROJECT.md +32 -0
- package/templates/next-fullstack-antd/docs/api.d.ts +544 -0
- package/templates/next-fullstack-antd/docs/openapi.json +461 -0
- package/templates/next-fullstack-antd/gitignore.template +19 -0
- package/templates/next-fullstack-antd/licenses/fastapi.txt +21 -0
- package/templates/next-fullstack-antd/licenses/nest.txt +22 -0
- package/templates/next-fullstack-antd/licenses/next.txt +21 -0
- package/templates/next-fullstack-antd/licenses/shadcn.txt +21 -0
- package/templates/next-fullstack-antd/licenses/sources.json +27 -0
- package/templates/next-fullstack-antd/licenses/spring.txt +202 -0
- package/templates/next-fullstack-antd/package-lock.json +494 -0
- package/templates/next-fullstack-antd/package.json +26 -0
- package/templates/next-fullstack-antd/playwright.config.ts +3 -0
- package/templates/next-fullstack-antd/project.json +8 -0
- package/templates/next-fullstack-antd/scripts/api-check.mjs +18 -0
- package/templates/next-fullstack-antd/scripts/api-contract.mjs +46 -0
- package/templates/next-fullstack-antd/scripts/design-coverage.mjs +20 -0
- package/templates/next-fullstack-antd/scripts/design-next-cleanup.mjs +13 -0
- package/templates/next-fullstack-antd/scripts/design-verify.mjs +154 -0
- package/templates/next-fullstack-antd/scripts/design.mjs +108 -0
- package/templates/next-fullstack-antd/scripts/project.mjs +120 -0
- package/templates/next-fullstack-antd/tests/contract-client.ts +20 -0
- package/templates/next-fullstack-antd/tests/contract.spec.ts +49 -0
- package/templates/next-fullstack-antd/tests/design/harness.tsx +63 -0
- package/templates/next-fullstack-antd/tests/ui.spec.ts +61 -0
- package/templates/next-fullstack-antd/web/Dockerfile +12 -0
- package/templates/next-fullstack-antd/web/app/api/auth/login/route.ts +1 -0
- package/templates/next-fullstack-antd/web/app/api/auth/logout/route.ts +1 -0
- package/templates/next-fullstack-antd/web/app/api/auth/me/route.ts +1 -0
- package/templates/next-fullstack-antd/web/app/api/health/route.ts +1 -0
- package/templates/next-fullstack-antd/web/app/api/records/[id]/route.ts +5 -0
- package/templates/next-fullstack-antd/web/app/api/records/route.ts +3 -0
- package/templates/next-fullstack-antd/web/app/layout.tsx +5 -0
- package/templates/next-fullstack-antd/web/app/page.tsx +2 -0
- package/templates/next-fullstack-antd/web/eslint.config.mjs +3 -0
- package/templates/next-fullstack-antd/web/lib/api.ts +35 -0
- package/templates/next-fullstack-antd/web/lib/auth.ts +10 -0
- package/templates/next-fullstack-antd/web/lib/db.ts +3 -0
- package/templates/next-fullstack-antd/web/lib/session.test.ts +15 -0
- package/templates/next-fullstack-antd/web/lib/validation.test.ts +3 -0
- package/templates/next-fullstack-antd/web/lib/validation.ts +5 -0
- package/templates/next-fullstack-antd/web/next-env.d.ts +7 -0
- package/templates/next-fullstack-antd/web/next.config.ts +3 -0
- package/templates/next-fullstack-antd/web/package.json +35 -0
- package/templates/next-fullstack-antd/web/pnpm-lock.yaml +3756 -0
- package/templates/next-fullstack-antd/web/pnpm-workspace.yaml +7 -0
- package/templates/next-fullstack-antd/web/prisma/migrations/202610190001_initial/migration.sql +99 -0
- package/templates/next-fullstack-antd/web/prisma/migrations/migration_lock.toml +1 -0
- package/templates/next-fullstack-antd/web/prisma/schema.prisma +72 -0
- package/templates/next-fullstack-antd/web/scripts/seed.ts +4 -0
- package/templates/next-fullstack-antd/web/src/App.tsx +29 -0
- package/templates/next-fullstack-antd/web/src/design-layout.css +7 -0
- package/templates/next-fullstack-antd/web/src/design-runtime.json +511 -0
- package/templates/next-fullstack-antd/web/src/design-tokens.css +168 -0
- package/templates/next-fullstack-antd/web/src/design-widgets.css +31 -0
- package/templates/next-fullstack-antd/web/src/structure-view.tsx +16 -0
- package/templates/next-fullstack-antd/web/src/styles.css +3 -0
- package/templates/next-fullstack-antd/web/src/ui.tsx +30 -0
- package/templates/next-fullstack-antd/web/src/widget-icon.tsx +5 -0
- package/templates/next-fullstack-antd/web/src/widget-types.ts +13 -0
- package/templates/next-fullstack-antd/web/src/workspace-model.ts +85 -0
- package/templates/next-fullstack-antd/web/tsconfig.json +42 -0
- package/templates/next-fullstack-antd/web/vitest.config.ts +2 -0
- package/templates/next-fullstack-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-shadcn/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-shadcn/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-shadcn/.dockerignore +18 -0
- package/templates/next-fullstack-shadcn/.env.example +13 -0
- package/templates/next-fullstack-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/next-fullstack-shadcn/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/next-fullstack-shadcn/.scaffold-checks.json +7 -0
- package/templates/next-fullstack-shadcn/AGENTS.md +11 -0
- package/templates/next-fullstack-shadcn/CLAUDE.md +1 -0
- package/templates/next-fullstack-shadcn/DESIGN.md +208 -0
- package/templates/next-fullstack-shadcn/LICENSE +21 -0
- package/templates/next-fullstack-shadcn/README.md +64 -0
- package/templates/next-fullstack-shadcn/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/next-fullstack-shadcn/compose.yaml +18 -0
- package/templates/next-fullstack-shadcn/design/guide.md +61 -0
- package/templates/next-fullstack-shadcn/design/layout.css +6 -0
- package/templates/next-fullstack-shadcn/design/structure.json +107 -0
- package/templates/next-fullstack-shadcn/design/tokens.json +171 -0
- package/templates/next-fullstack-shadcn/design/widgets.css +30 -0
- package/templates/next-fullstack-shadcn/design/widgets.json +233 -0
- package/templates/next-fullstack-shadcn/docs/PROJECT.md +32 -0
- package/templates/next-fullstack-shadcn/docs/api.d.ts +544 -0
- package/templates/next-fullstack-shadcn/docs/openapi.json +461 -0
- package/templates/next-fullstack-shadcn/gitignore.template +19 -0
- package/templates/next-fullstack-shadcn/licenses/fastapi.txt +21 -0
- package/templates/next-fullstack-shadcn/licenses/nest.txt +22 -0
- package/templates/next-fullstack-shadcn/licenses/next.txt +21 -0
- package/templates/next-fullstack-shadcn/licenses/shadcn.txt +21 -0
- package/templates/next-fullstack-shadcn/licenses/sources.json +27 -0
- package/templates/next-fullstack-shadcn/licenses/spring.txt +202 -0
- package/templates/next-fullstack-shadcn/package-lock.json +494 -0
- package/templates/next-fullstack-shadcn/package.json +26 -0
- package/templates/next-fullstack-shadcn/playwright.config.ts +3 -0
- package/templates/next-fullstack-shadcn/project.json +8 -0
- package/templates/next-fullstack-shadcn/scripts/api-check.mjs +18 -0
- package/templates/next-fullstack-shadcn/scripts/api-contract.mjs +46 -0
- package/templates/next-fullstack-shadcn/scripts/design-coverage.mjs +20 -0
- package/templates/next-fullstack-shadcn/scripts/design-next-cleanup.mjs +13 -0
- package/templates/next-fullstack-shadcn/scripts/design-verify.mjs +154 -0
- package/templates/next-fullstack-shadcn/scripts/design.mjs +108 -0
- package/templates/next-fullstack-shadcn/scripts/project.mjs +120 -0
- package/templates/next-fullstack-shadcn/tests/contract-client.ts +20 -0
- package/templates/next-fullstack-shadcn/tests/contract.spec.ts +49 -0
- package/templates/next-fullstack-shadcn/tests/design/harness.tsx +63 -0
- package/templates/next-fullstack-shadcn/tests/ui.spec.ts +61 -0
- package/templates/next-fullstack-shadcn/web/Dockerfile +12 -0
- package/templates/next-fullstack-shadcn/web/app/api/auth/login/route.ts +1 -0
- package/templates/next-fullstack-shadcn/web/app/api/auth/logout/route.ts +1 -0
- package/templates/next-fullstack-shadcn/web/app/api/auth/me/route.ts +1 -0
- package/templates/next-fullstack-shadcn/web/app/api/health/route.ts +1 -0
- package/templates/next-fullstack-shadcn/web/app/api/records/[id]/route.ts +5 -0
- package/templates/next-fullstack-shadcn/web/app/api/records/route.ts +3 -0
- package/templates/next-fullstack-shadcn/web/app/layout.tsx +4 -0
- package/templates/next-fullstack-shadcn/web/app/page.tsx +2 -0
- package/templates/next-fullstack-shadcn/web/eslint.config.mjs +3 -0
- package/templates/next-fullstack-shadcn/web/lib/api.ts +35 -0
- package/templates/next-fullstack-shadcn/web/lib/auth.ts +10 -0
- package/templates/next-fullstack-shadcn/web/lib/db.ts +3 -0
- package/templates/next-fullstack-shadcn/web/lib/session.test.ts +15 -0
- package/templates/next-fullstack-shadcn/web/lib/validation.test.ts +3 -0
- package/templates/next-fullstack-shadcn/web/lib/validation.ts +5 -0
- package/templates/next-fullstack-shadcn/web/next-env.d.ts +7 -0
- package/templates/next-fullstack-shadcn/web/next.config.ts +3 -0
- package/templates/next-fullstack-shadcn/web/package.json +39 -0
- package/templates/next-fullstack-shadcn/web/pnpm-lock.yaml +3286 -0
- package/templates/next-fullstack-shadcn/web/pnpm-workspace.yaml +7 -0
- package/templates/next-fullstack-shadcn/web/postcss.config.mjs +1 -0
- package/templates/next-fullstack-shadcn/web/prisma/migrations/202610190001_initial/migration.sql +99 -0
- package/templates/next-fullstack-shadcn/web/prisma/migrations/migration_lock.toml +1 -0
- package/templates/next-fullstack-shadcn/web/prisma/schema.prisma +72 -0
- package/templates/next-fullstack-shadcn/web/scripts/seed.ts +4 -0
- package/templates/next-fullstack-shadcn/web/src/App.tsx +30 -0
- package/templates/next-fullstack-shadcn/web/src/design-layout.css +7 -0
- package/templates/next-fullstack-shadcn/web/src/design-runtime.json +511 -0
- package/templates/next-fullstack-shadcn/web/src/design-tokens.css +168 -0
- package/templates/next-fullstack-shadcn/web/src/design-widgets.css +31 -0
- package/templates/next-fullstack-shadcn/web/src/structure-view.tsx +16 -0
- package/templates/next-fullstack-shadcn/web/src/styles.css +3 -0
- package/templates/next-fullstack-shadcn/web/src/tailwind.css +2 -0
- package/templates/next-fullstack-shadcn/web/src/ui.tsx +13 -0
- package/templates/next-fullstack-shadcn/web/src/widget-icon.tsx +5 -0
- package/templates/next-fullstack-shadcn/web/src/widget-types.ts +13 -0
- package/templates/next-fullstack-shadcn/web/src/workspace-model.ts +85 -0
- package/templates/next-fullstack-shadcn/web/tsconfig.json +42 -0
- package/templates/next-fullstack-shadcn/web/vitest.config.ts +2 -0
- package/templates/react-fastapi-antd/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-antd/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-antd/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-antd/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-antd/.dockerignore +18 -0
- package/templates/react-fastapi-antd/.env.example +13 -0
- package/templates/react-fastapi-antd/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-antd/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-antd/.scaffold-checks.json +7 -0
- package/templates/react-fastapi-antd/AGENTS.md +11 -0
- package/templates/react-fastapi-antd/CLAUDE.md +1 -0
- package/templates/react-fastapi-antd/DESIGN.md +208 -0
- package/templates/react-fastapi-antd/LICENSE +21 -0
- package/templates/react-fastapi-antd/README.md +64 -0
- package/templates/react-fastapi-antd/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-fastapi-antd/backend/.python-version +1 -0
- package/templates/react-fastapi-antd/backend/Dockerfile +10 -0
- package/templates/react-fastapi-antd/backend/alembic.ini +3 -0
- package/templates/react-fastapi-antd/backend/app/__init__.py +0 -0
- package/templates/react-fastapi-antd/backend/app/core/__init__.py +0 -0
- package/templates/react-fastapi-antd/backend/app/core/security.py +25 -0
- package/templates/react-fastapi-antd/backend/app/db.py +11 -0
- package/templates/react-fastapi-antd/backend/app/main.py +146 -0
- package/templates/react-fastapi-antd/backend/app/models.py +21 -0
- package/templates/react-fastapi-antd/backend/app/seed.py +21 -0
- package/templates/react-fastapi-antd/backend/migrations/env.py +9 -0
- package/templates/react-fastapi-antd/backend/migrations/versions/0001_initial.py +18 -0
- package/templates/react-fastapi-antd/backend/pyproject.toml +16 -0
- package/templates/react-fastapi-antd/backend/tests/test_api.py +27 -0
- package/templates/react-fastapi-antd/backend/uv.lock +1085 -0
- package/templates/react-fastapi-antd/compose.yaml +18 -0
- package/templates/react-fastapi-antd/design/guide.md +61 -0
- package/templates/react-fastapi-antd/design/layout.css +6 -0
- package/templates/react-fastapi-antd/design/structure.json +107 -0
- package/templates/react-fastapi-antd/design/tokens.json +171 -0
- package/templates/react-fastapi-antd/design/widgets.css +30 -0
- package/templates/react-fastapi-antd/design/widgets.json +233 -0
- package/templates/react-fastapi-antd/docs/PROJECT.md +32 -0
- package/templates/react-fastapi-antd/docs/api.d.ts +544 -0
- package/templates/react-fastapi-antd/docs/openapi.json +461 -0
- package/templates/react-fastapi-antd/gitignore.template +19 -0
- package/templates/react-fastapi-antd/licenses/fastapi.txt +21 -0
- package/templates/react-fastapi-antd/licenses/nest.txt +22 -0
- package/templates/react-fastapi-antd/licenses/next.txt +21 -0
- package/templates/react-fastapi-antd/licenses/shadcn.txt +21 -0
- package/templates/react-fastapi-antd/licenses/sources.json +27 -0
- package/templates/react-fastapi-antd/licenses/spring.txt +202 -0
- package/templates/react-fastapi-antd/package-lock.json +494 -0
- package/templates/react-fastapi-antd/package.json +26 -0
- package/templates/react-fastapi-antd/playwright.config.ts +3 -0
- package/templates/react-fastapi-antd/project.json +8 -0
- package/templates/react-fastapi-antd/scripts/api-check.mjs +18 -0
- package/templates/react-fastapi-antd/scripts/api-contract.mjs +46 -0
- package/templates/react-fastapi-antd/scripts/design-coverage.mjs +20 -0
- package/templates/react-fastapi-antd/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-fastapi-antd/scripts/design-verify.mjs +154 -0
- package/templates/react-fastapi-antd/scripts/design.mjs +108 -0
- package/templates/react-fastapi-antd/scripts/project.mjs +120 -0
- package/templates/react-fastapi-antd/tests/contract-client.ts +20 -0
- package/templates/react-fastapi-antd/tests/contract.spec.ts +49 -0
- package/templates/react-fastapi-antd/tests/design/harness.tsx +63 -0
- package/templates/react-fastapi-antd/tests/ui.spec.ts +61 -0
- package/templates/react-fastapi-antd/web/bun.lock +442 -0
- package/templates/react-fastapi-antd/web/eslint.config.mjs +3 -0
- package/templates/react-fastapi-antd/web/index.html +1 -0
- package/templates/react-fastapi-antd/web/package.json +28 -0
- package/templates/react-fastapi-antd/web/src/App.tsx +29 -0
- package/templates/react-fastapi-antd/web/src/design-layout.css +7 -0
- package/templates/react-fastapi-antd/web/src/design-runtime.json +511 -0
- package/templates/react-fastapi-antd/web/src/design-tokens.css +168 -0
- package/templates/react-fastapi-antd/web/src/design-widgets.css +31 -0
- package/templates/react-fastapi-antd/web/src/main.tsx +6 -0
- package/templates/react-fastapi-antd/web/src/structure-view.tsx +16 -0
- package/templates/react-fastapi-antd/web/src/styles.css +3 -0
- package/templates/react-fastapi-antd/web/src/ui.tsx +30 -0
- package/templates/react-fastapi-antd/web/src/widget-icon.tsx +5 -0
- package/templates/react-fastapi-antd/web/src/widget-types.ts +13 -0
- package/templates/react-fastapi-antd/web/src/workspace-model.ts +85 -0
- package/templates/react-fastapi-antd/web/tsconfig.json +22 -0
- package/templates/react-fastapi-antd/web/vite.config.ts +3 -0
- package/templates/react-fastapi-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-shadcn/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-shadcn/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-shadcn/.dockerignore +18 -0
- package/templates/react-fastapi-shadcn/.env.example +13 -0
- package/templates/react-fastapi-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-fastapi-shadcn/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-fastapi-shadcn/.scaffold-checks.json +7 -0
- package/templates/react-fastapi-shadcn/AGENTS.md +11 -0
- package/templates/react-fastapi-shadcn/CLAUDE.md +1 -0
- package/templates/react-fastapi-shadcn/DESIGN.md +208 -0
- package/templates/react-fastapi-shadcn/LICENSE +21 -0
- package/templates/react-fastapi-shadcn/README.md +64 -0
- package/templates/react-fastapi-shadcn/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-fastapi-shadcn/backend/.python-version +1 -0
- package/templates/react-fastapi-shadcn/backend/Dockerfile +10 -0
- package/templates/react-fastapi-shadcn/backend/alembic.ini +3 -0
- package/templates/react-fastapi-shadcn/backend/app/__init__.py +0 -0
- package/templates/react-fastapi-shadcn/backend/app/core/__init__.py +0 -0
- package/templates/react-fastapi-shadcn/backend/app/core/security.py +25 -0
- package/templates/react-fastapi-shadcn/backend/app/db.py +11 -0
- package/templates/react-fastapi-shadcn/backend/app/main.py +146 -0
- package/templates/react-fastapi-shadcn/backend/app/models.py +21 -0
- package/templates/react-fastapi-shadcn/backend/app/seed.py +21 -0
- package/templates/react-fastapi-shadcn/backend/migrations/env.py +9 -0
- package/templates/react-fastapi-shadcn/backend/migrations/versions/0001_initial.py +18 -0
- package/templates/react-fastapi-shadcn/backend/pyproject.toml +16 -0
- package/templates/react-fastapi-shadcn/backend/tests/test_api.py +27 -0
- package/templates/react-fastapi-shadcn/backend/uv.lock +1085 -0
- package/templates/react-fastapi-shadcn/compose.yaml +18 -0
- package/templates/react-fastapi-shadcn/design/guide.md +61 -0
- package/templates/react-fastapi-shadcn/design/layout.css +6 -0
- package/templates/react-fastapi-shadcn/design/structure.json +107 -0
- package/templates/react-fastapi-shadcn/design/tokens.json +171 -0
- package/templates/react-fastapi-shadcn/design/widgets.css +30 -0
- package/templates/react-fastapi-shadcn/design/widgets.json +233 -0
- package/templates/react-fastapi-shadcn/docs/PROJECT.md +32 -0
- package/templates/react-fastapi-shadcn/docs/api.d.ts +544 -0
- package/templates/react-fastapi-shadcn/docs/openapi.json +461 -0
- package/templates/react-fastapi-shadcn/gitignore.template +19 -0
- package/templates/react-fastapi-shadcn/licenses/fastapi.txt +21 -0
- package/templates/react-fastapi-shadcn/licenses/nest.txt +22 -0
- package/templates/react-fastapi-shadcn/licenses/next.txt +21 -0
- package/templates/react-fastapi-shadcn/licenses/shadcn.txt +21 -0
- package/templates/react-fastapi-shadcn/licenses/sources.json +27 -0
- package/templates/react-fastapi-shadcn/licenses/spring.txt +202 -0
- package/templates/react-fastapi-shadcn/package-lock.json +494 -0
- package/templates/react-fastapi-shadcn/package.json +26 -0
- package/templates/react-fastapi-shadcn/playwright.config.ts +3 -0
- package/templates/react-fastapi-shadcn/project.json +8 -0
- package/templates/react-fastapi-shadcn/scripts/api-check.mjs +18 -0
- package/templates/react-fastapi-shadcn/scripts/api-contract.mjs +46 -0
- package/templates/react-fastapi-shadcn/scripts/design-coverage.mjs +20 -0
- package/templates/react-fastapi-shadcn/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-fastapi-shadcn/scripts/design-verify.mjs +154 -0
- package/templates/react-fastapi-shadcn/scripts/design.mjs +108 -0
- package/templates/react-fastapi-shadcn/scripts/project.mjs +120 -0
- package/templates/react-fastapi-shadcn/tests/contract-client.ts +20 -0
- package/templates/react-fastapi-shadcn/tests/contract.spec.ts +49 -0
- package/templates/react-fastapi-shadcn/tests/design/harness.tsx +63 -0
- package/templates/react-fastapi-shadcn/tests/ui.spec.ts +61 -0
- package/templates/react-fastapi-shadcn/web/bun.lock +413 -0
- package/templates/react-fastapi-shadcn/web/eslint.config.mjs +3 -0
- package/templates/react-fastapi-shadcn/web/index.html +1 -0
- package/templates/react-fastapi-shadcn/web/package.json +33 -0
- package/templates/react-fastapi-shadcn/web/src/App.tsx +30 -0
- package/templates/react-fastapi-shadcn/web/src/design-layout.css +7 -0
- package/templates/react-fastapi-shadcn/web/src/design-runtime.json +511 -0
- package/templates/react-fastapi-shadcn/web/src/design-tokens.css +168 -0
- package/templates/react-fastapi-shadcn/web/src/design-widgets.css +31 -0
- package/templates/react-fastapi-shadcn/web/src/main.tsx +6 -0
- package/templates/react-fastapi-shadcn/web/src/structure-view.tsx +16 -0
- package/templates/react-fastapi-shadcn/web/src/styles.css +3 -0
- package/templates/react-fastapi-shadcn/web/src/tailwind.css +2 -0
- package/templates/react-fastapi-shadcn/web/src/ui.tsx +13 -0
- package/templates/react-fastapi-shadcn/web/src/widget-icon.tsx +5 -0
- package/templates/react-fastapi-shadcn/web/src/widget-types.ts +13 -0
- package/templates/react-fastapi-shadcn/web/src/workspace-model.ts +85 -0
- package/templates/react-fastapi-shadcn/web/tsconfig.json +22 -0
- package/templates/react-fastapi-shadcn/web/vite.config.ts +4 -0
- package/templates/react-nest-antd/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-antd/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-antd/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-antd/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-antd/.dockerignore +18 -0
- package/templates/react-nest-antd/.env.example +13 -0
- package/templates/react-nest-antd/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-antd/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-antd/.scaffold-checks.json +7 -0
- package/templates/react-nest-antd/AGENTS.md +11 -0
- package/templates/react-nest-antd/CLAUDE.md +1 -0
- package/templates/react-nest-antd/DESIGN.md +208 -0
- package/templates/react-nest-antd/LICENSE +21 -0
- package/templates/react-nest-antd/README.md +64 -0
- package/templates/react-nest-antd/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-nest-antd/backend/Dockerfile +12 -0
- package/templates/react-nest-antd/backend/eslint.config.mjs +3 -0
- package/templates/react-nest-antd/backend/jest.config.cjs +1 -0
- package/templates/react-nest-antd/backend/package.json +40 -0
- package/templates/react-nest-antd/backend/pnpm-lock.yaml +5165 -0
- package/templates/react-nest-antd/backend/pnpm-workspace.yaml +6 -0
- package/templates/react-nest-antd/backend/prisma/migrations/202610190001_initial/migration.sql +3 -0
- package/templates/react-nest-antd/backend/prisma/migrations/migration_lock.toml +1 -0
- package/templates/react-nest-antd/backend/prisma/schema.prisma +25 -0
- package/templates/react-nest-antd/backend/scripts/seed.ts +4 -0
- package/templates/react-nest-antd/backend/src/app.module.ts +43 -0
- package/templates/react-nest-antd/backend/src/main.ts +6 -0
- package/templates/react-nest-antd/backend/src/password.ts +3 -0
- package/templates/react-nest-antd/backend/src/validation.ts +7 -0
- package/templates/react-nest-antd/backend/test/api.test.ts +25 -0
- package/templates/react-nest-antd/backend/tsconfig.build.json +15 -0
- package/templates/react-nest-antd/backend/tsconfig.json +17 -0
- package/templates/react-nest-antd/compose.yaml +18 -0
- package/templates/react-nest-antd/design/guide.md +61 -0
- package/templates/react-nest-antd/design/layout.css +6 -0
- package/templates/react-nest-antd/design/structure.json +107 -0
- package/templates/react-nest-antd/design/tokens.json +171 -0
- package/templates/react-nest-antd/design/widgets.css +30 -0
- package/templates/react-nest-antd/design/widgets.json +233 -0
- package/templates/react-nest-antd/docs/PROJECT.md +32 -0
- package/templates/react-nest-antd/docs/api.d.ts +544 -0
- package/templates/react-nest-antd/docs/openapi.json +461 -0
- package/templates/react-nest-antd/gitignore.template +19 -0
- package/templates/react-nest-antd/licenses/fastapi.txt +21 -0
- package/templates/react-nest-antd/licenses/nest.txt +22 -0
- package/templates/react-nest-antd/licenses/next.txt +21 -0
- package/templates/react-nest-antd/licenses/shadcn.txt +21 -0
- package/templates/react-nest-antd/licenses/sources.json +27 -0
- package/templates/react-nest-antd/licenses/spring.txt +202 -0
- package/templates/react-nest-antd/package-lock.json +494 -0
- package/templates/react-nest-antd/package.json +26 -0
- package/templates/react-nest-antd/playwright.config.ts +3 -0
- package/templates/react-nest-antd/project.json +8 -0
- package/templates/react-nest-antd/scripts/api-check.mjs +18 -0
- package/templates/react-nest-antd/scripts/api-contract.mjs +46 -0
- package/templates/react-nest-antd/scripts/design-coverage.mjs +20 -0
- package/templates/react-nest-antd/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-nest-antd/scripts/design-verify.mjs +154 -0
- package/templates/react-nest-antd/scripts/design.mjs +108 -0
- package/templates/react-nest-antd/scripts/project.mjs +120 -0
- package/templates/react-nest-antd/tests/contract-client.ts +20 -0
- package/templates/react-nest-antd/tests/contract.spec.ts +49 -0
- package/templates/react-nest-antd/tests/design/harness.tsx +63 -0
- package/templates/react-nest-antd/tests/ui.spec.ts +61 -0
- package/templates/react-nest-antd/web/eslint.config.mjs +3 -0
- package/templates/react-nest-antd/web/index.html +1 -0
- package/templates/react-nest-antd/web/package.json +28 -0
- package/templates/react-nest-antd/web/pnpm-lock.yaml +2215 -0
- package/templates/react-nest-antd/web/src/App.tsx +29 -0
- package/templates/react-nest-antd/web/src/design-layout.css +7 -0
- package/templates/react-nest-antd/web/src/design-runtime.json +511 -0
- package/templates/react-nest-antd/web/src/design-tokens.css +168 -0
- package/templates/react-nest-antd/web/src/design-widgets.css +31 -0
- package/templates/react-nest-antd/web/src/main.tsx +6 -0
- package/templates/react-nest-antd/web/src/structure-view.tsx +16 -0
- package/templates/react-nest-antd/web/src/styles.css +3 -0
- package/templates/react-nest-antd/web/src/ui.tsx +30 -0
- package/templates/react-nest-antd/web/src/widget-icon.tsx +5 -0
- package/templates/react-nest-antd/web/src/widget-types.ts +13 -0
- package/templates/react-nest-antd/web/src/workspace-model.ts +85 -0
- package/templates/react-nest-antd/web/tsconfig.json +22 -0
- package/templates/react-nest-antd/web/vite.config.ts +3 -0
- package/templates/react-nest-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-shadcn/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-shadcn/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-shadcn/.dockerignore +18 -0
- package/templates/react-nest-shadcn/.env.example +13 -0
- package/templates/react-nest-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-nest-shadcn/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-nest-shadcn/.scaffold-checks.json +7 -0
- package/templates/react-nest-shadcn/AGENTS.md +11 -0
- package/templates/react-nest-shadcn/CLAUDE.md +1 -0
- package/templates/react-nest-shadcn/DESIGN.md +208 -0
- package/templates/react-nest-shadcn/LICENSE +21 -0
- package/templates/react-nest-shadcn/README.md +64 -0
- package/templates/react-nest-shadcn/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-nest-shadcn/backend/Dockerfile +12 -0
- package/templates/react-nest-shadcn/backend/eslint.config.mjs +3 -0
- package/templates/react-nest-shadcn/backend/jest.config.cjs +1 -0
- package/templates/react-nest-shadcn/backend/package.json +40 -0
- package/templates/react-nest-shadcn/backend/pnpm-lock.yaml +5165 -0
- package/templates/react-nest-shadcn/backend/pnpm-workspace.yaml +6 -0
- package/templates/react-nest-shadcn/backend/prisma/migrations/202610190001_initial/migration.sql +3 -0
- package/templates/react-nest-shadcn/backend/prisma/migrations/migration_lock.toml +1 -0
- package/templates/react-nest-shadcn/backend/prisma/schema.prisma +25 -0
- package/templates/react-nest-shadcn/backend/scripts/seed.ts +4 -0
- package/templates/react-nest-shadcn/backend/src/app.module.ts +43 -0
- package/templates/react-nest-shadcn/backend/src/main.ts +6 -0
- package/templates/react-nest-shadcn/backend/src/password.ts +3 -0
- package/templates/react-nest-shadcn/backend/src/validation.ts +7 -0
- package/templates/react-nest-shadcn/backend/test/api.test.ts +25 -0
- package/templates/react-nest-shadcn/backend/tsconfig.build.json +15 -0
- package/templates/react-nest-shadcn/backend/tsconfig.json +17 -0
- package/templates/react-nest-shadcn/compose.yaml +18 -0
- package/templates/react-nest-shadcn/design/guide.md +61 -0
- package/templates/react-nest-shadcn/design/layout.css +6 -0
- package/templates/react-nest-shadcn/design/structure.json +107 -0
- package/templates/react-nest-shadcn/design/tokens.json +171 -0
- package/templates/react-nest-shadcn/design/widgets.css +30 -0
- package/templates/react-nest-shadcn/design/widgets.json +233 -0
- package/templates/react-nest-shadcn/docs/PROJECT.md +32 -0
- package/templates/react-nest-shadcn/docs/api.d.ts +544 -0
- package/templates/react-nest-shadcn/docs/openapi.json +461 -0
- package/templates/react-nest-shadcn/gitignore.template +19 -0
- package/templates/react-nest-shadcn/licenses/fastapi.txt +21 -0
- package/templates/react-nest-shadcn/licenses/nest.txt +22 -0
- package/templates/react-nest-shadcn/licenses/next.txt +21 -0
- package/templates/react-nest-shadcn/licenses/shadcn.txt +21 -0
- package/templates/react-nest-shadcn/licenses/sources.json +27 -0
- package/templates/react-nest-shadcn/licenses/spring.txt +202 -0
- package/templates/react-nest-shadcn/package-lock.json +494 -0
- package/templates/react-nest-shadcn/package.json +26 -0
- package/templates/react-nest-shadcn/playwright.config.ts +3 -0
- package/templates/react-nest-shadcn/project.json +8 -0
- package/templates/react-nest-shadcn/scripts/api-check.mjs +18 -0
- package/templates/react-nest-shadcn/scripts/api-contract.mjs +46 -0
- package/templates/react-nest-shadcn/scripts/design-coverage.mjs +20 -0
- package/templates/react-nest-shadcn/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-nest-shadcn/scripts/design-verify.mjs +154 -0
- package/templates/react-nest-shadcn/scripts/design.mjs +108 -0
- package/templates/react-nest-shadcn/scripts/project.mjs +120 -0
- package/templates/react-nest-shadcn/tests/contract-client.ts +20 -0
- package/templates/react-nest-shadcn/tests/contract.spec.ts +49 -0
- package/templates/react-nest-shadcn/tests/design/harness.tsx +63 -0
- package/templates/react-nest-shadcn/tests/ui.spec.ts +61 -0
- package/templates/react-nest-shadcn/web/eslint.config.mjs +3 -0
- package/templates/react-nest-shadcn/web/index.html +1 -0
- package/templates/react-nest-shadcn/web/package.json +33 -0
- package/templates/react-nest-shadcn/web/pnpm-lock.yaml +1788 -0
- package/templates/react-nest-shadcn/web/src/App.tsx +30 -0
- package/templates/react-nest-shadcn/web/src/design-layout.css +7 -0
- package/templates/react-nest-shadcn/web/src/design-runtime.json +511 -0
- package/templates/react-nest-shadcn/web/src/design-tokens.css +168 -0
- package/templates/react-nest-shadcn/web/src/design-widgets.css +31 -0
- package/templates/react-nest-shadcn/web/src/main.tsx +6 -0
- package/templates/react-nest-shadcn/web/src/structure-view.tsx +16 -0
- package/templates/react-nest-shadcn/web/src/styles.css +3 -0
- package/templates/react-nest-shadcn/web/src/tailwind.css +2 -0
- package/templates/react-nest-shadcn/web/src/ui.tsx +13 -0
- package/templates/react-nest-shadcn/web/src/widget-icon.tsx +5 -0
- package/templates/react-nest-shadcn/web/src/widget-types.ts +13 -0
- package/templates/react-nest-shadcn/web/src/workspace-model.ts +85 -0
- package/templates/react-nest-shadcn/web/tsconfig.json +22 -0
- package/templates/react-nest-shadcn/web/vite.config.ts +4 -0
- package/templates/react-spring-antd/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-antd/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-antd/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-antd/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-antd/.dockerignore +18 -0
- package/templates/react-spring-antd/.env.example +13 -0
- package/templates/react-spring-antd/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-antd/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-antd/.scaffold-checks.json +7 -0
- package/templates/react-spring-antd/AGENTS.md +11 -0
- package/templates/react-spring-antd/CLAUDE.md +1 -0
- package/templates/react-spring-antd/DESIGN.md +208 -0
- package/templates/react-spring-antd/LICENSE +21 -0
- package/templates/react-spring-antd/README.md +64 -0
- package/templates/react-spring-antd/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-spring-antd/backend/.mvn/wrapper/maven-wrapper.properties +3 -0
- package/templates/react-spring-antd/backend/Dockerfile +11 -0
- package/templates/react-spring-antd/backend/mvnw +295 -0
- package/templates/react-spring-antd/backend/pom.xml +15 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Api.java +38 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/AppUser.java +11 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Application.java +7 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Errors.java +13 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/PersonalRecord.java +15 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Records.java +14 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Security.java +28 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Seed.java +13 -0
- package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Users.java +5 -0
- package/templates/react-spring-antd/backend/src/main/resources/application.properties +17 -0
- package/templates/react-spring-antd/backend/src/main/resources/db/migration/V1__initial.sql +3 -0
- package/templates/react-spring-antd/backend/src/main/resources/openapi.json +461 -0
- package/templates/react-spring-antd/backend/src/test/java/dev/scaffold/app/ApiTest.java +28 -0
- package/templates/react-spring-antd/backend/src/test/java/dev/scaffold/app/SessionExpiryTest.java +37 -0
- package/templates/react-spring-antd/compose.yaml +18 -0
- package/templates/react-spring-antd/design/guide.md +61 -0
- package/templates/react-spring-antd/design/layout.css +6 -0
- package/templates/react-spring-antd/design/structure.json +107 -0
- package/templates/react-spring-antd/design/tokens.json +171 -0
- package/templates/react-spring-antd/design/widgets.css +30 -0
- package/templates/react-spring-antd/design/widgets.json +233 -0
- package/templates/react-spring-antd/docs/PROJECT.md +32 -0
- package/templates/react-spring-antd/docs/api.d.ts +544 -0
- package/templates/react-spring-antd/docs/openapi.json +461 -0
- package/templates/react-spring-antd/gitignore.template +19 -0
- package/templates/react-spring-antd/licenses/fastapi.txt +21 -0
- package/templates/react-spring-antd/licenses/nest.txt +22 -0
- package/templates/react-spring-antd/licenses/next.txt +21 -0
- package/templates/react-spring-antd/licenses/shadcn.txt +21 -0
- package/templates/react-spring-antd/licenses/sources.json +27 -0
- package/templates/react-spring-antd/licenses/spring.txt +202 -0
- package/templates/react-spring-antd/package-lock.json +494 -0
- package/templates/react-spring-antd/package.json +26 -0
- package/templates/react-spring-antd/playwright.config.ts +3 -0
- package/templates/react-spring-antd/project.json +8 -0
- package/templates/react-spring-antd/scripts/api-check.mjs +18 -0
- package/templates/react-spring-antd/scripts/api-contract.mjs +46 -0
- package/templates/react-spring-antd/scripts/design-coverage.mjs +20 -0
- package/templates/react-spring-antd/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-spring-antd/scripts/design-verify.mjs +154 -0
- package/templates/react-spring-antd/scripts/design.mjs +108 -0
- package/templates/react-spring-antd/scripts/project.mjs +120 -0
- package/templates/react-spring-antd/tests/contract-client.ts +20 -0
- package/templates/react-spring-antd/tests/contract.spec.ts +49 -0
- package/templates/react-spring-antd/tests/design/harness.tsx +63 -0
- package/templates/react-spring-antd/tests/ui.spec.ts +61 -0
- package/templates/react-spring-antd/web/eslint.config.mjs +3 -0
- package/templates/react-spring-antd/web/index.html +1 -0
- package/templates/react-spring-antd/web/package.json +28 -0
- package/templates/react-spring-antd/web/pnpm-lock.yaml +2215 -0
- package/templates/react-spring-antd/web/src/App.tsx +29 -0
- package/templates/react-spring-antd/web/src/design-layout.css +7 -0
- package/templates/react-spring-antd/web/src/design-runtime.json +511 -0
- package/templates/react-spring-antd/web/src/design-tokens.css +168 -0
- package/templates/react-spring-antd/web/src/design-widgets.css +31 -0
- package/templates/react-spring-antd/web/src/main.tsx +6 -0
- package/templates/react-spring-antd/web/src/structure-view.tsx +16 -0
- package/templates/react-spring-antd/web/src/styles.css +3 -0
- package/templates/react-spring-antd/web/src/ui.tsx +30 -0
- package/templates/react-spring-antd/web/src/widget-icon.tsx +5 -0
- package/templates/react-spring-antd/web/src/widget-types.ts +13 -0
- package/templates/react-spring-antd/web/src/workspace-model.ts +85 -0
- package/templates/react-spring-antd/web/tsconfig.json +22 -0
- package/templates/react-spring-antd/web/vite.config.ts +3 -0
- package/templates/react-spring-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-shadcn/.agents/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-shadcn/.claude/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-shadcn/.dockerignore +18 -0
- package/templates/react-spring-shadcn/.env.example +13 -0
- package/templates/react-spring-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
- package/templates/react-spring-shadcn/.grok/skills/project-work/SKILL.md +10 -0
- package/templates/react-spring-shadcn/.scaffold-checks.json +7 -0
- package/templates/react-spring-shadcn/AGENTS.md +11 -0
- package/templates/react-spring-shadcn/CLAUDE.md +1 -0
- package/templates/react-spring-shadcn/DESIGN.md +208 -0
- package/templates/react-spring-shadcn/LICENSE +21 -0
- package/templates/react-spring-shadcn/README.md +64 -0
- package/templates/react-spring-shadcn/THIRD_PARTY_NOTICES.md +18 -0
- package/templates/react-spring-shadcn/backend/.mvn/wrapper/maven-wrapper.properties +3 -0
- package/templates/react-spring-shadcn/backend/Dockerfile +11 -0
- package/templates/react-spring-shadcn/backend/mvnw +295 -0
- package/templates/react-spring-shadcn/backend/pom.xml +15 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Api.java +38 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/AppUser.java +11 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Application.java +7 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Errors.java +13 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/PersonalRecord.java +15 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Records.java +14 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Security.java +28 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Seed.java +13 -0
- package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Users.java +5 -0
- package/templates/react-spring-shadcn/backend/src/main/resources/application.properties +17 -0
- package/templates/react-spring-shadcn/backend/src/main/resources/db/migration/V1__initial.sql +3 -0
- package/templates/react-spring-shadcn/backend/src/main/resources/openapi.json +461 -0
- package/templates/react-spring-shadcn/backend/src/test/java/dev/scaffold/app/ApiTest.java +28 -0
- package/templates/react-spring-shadcn/backend/src/test/java/dev/scaffold/app/SessionExpiryTest.java +37 -0
- package/templates/react-spring-shadcn/compose.yaml +18 -0
- package/templates/react-spring-shadcn/design/guide.md +61 -0
- package/templates/react-spring-shadcn/design/layout.css +6 -0
- package/templates/react-spring-shadcn/design/structure.json +107 -0
- package/templates/react-spring-shadcn/design/tokens.json +171 -0
- package/templates/react-spring-shadcn/design/widgets.css +30 -0
- package/templates/react-spring-shadcn/design/widgets.json +233 -0
- package/templates/react-spring-shadcn/docs/PROJECT.md +32 -0
- package/templates/react-spring-shadcn/docs/api.d.ts +544 -0
- package/templates/react-spring-shadcn/docs/openapi.json +461 -0
- package/templates/react-spring-shadcn/gitignore.template +19 -0
- package/templates/react-spring-shadcn/licenses/fastapi.txt +21 -0
- package/templates/react-spring-shadcn/licenses/nest.txt +22 -0
- package/templates/react-spring-shadcn/licenses/next.txt +21 -0
- package/templates/react-spring-shadcn/licenses/shadcn.txt +21 -0
- package/templates/react-spring-shadcn/licenses/sources.json +27 -0
- package/templates/react-spring-shadcn/licenses/spring.txt +202 -0
- package/templates/react-spring-shadcn/package-lock.json +494 -0
- package/templates/react-spring-shadcn/package.json +26 -0
- package/templates/react-spring-shadcn/playwright.config.ts +3 -0
- package/templates/react-spring-shadcn/project.json +8 -0
- package/templates/react-spring-shadcn/scripts/api-check.mjs +18 -0
- package/templates/react-spring-shadcn/scripts/api-contract.mjs +46 -0
- package/templates/react-spring-shadcn/scripts/design-coverage.mjs +20 -0
- package/templates/react-spring-shadcn/scripts/design-next-cleanup.mjs +13 -0
- package/templates/react-spring-shadcn/scripts/design-verify.mjs +154 -0
- package/templates/react-spring-shadcn/scripts/design.mjs +108 -0
- package/templates/react-spring-shadcn/scripts/project.mjs +120 -0
- package/templates/react-spring-shadcn/tests/contract-client.ts +20 -0
- package/templates/react-spring-shadcn/tests/contract.spec.ts +49 -0
- package/templates/react-spring-shadcn/tests/design/harness.tsx +63 -0
- package/templates/react-spring-shadcn/tests/ui.spec.ts +61 -0
- package/templates/react-spring-shadcn/web/eslint.config.mjs +3 -0
- package/templates/react-spring-shadcn/web/index.html +1 -0
- package/templates/react-spring-shadcn/web/package.json +33 -0
- package/templates/react-spring-shadcn/web/pnpm-lock.yaml +1788 -0
- package/templates/react-spring-shadcn/web/src/App.tsx +30 -0
- package/templates/react-spring-shadcn/web/src/design-layout.css +7 -0
- package/templates/react-spring-shadcn/web/src/design-runtime.json +511 -0
- package/templates/react-spring-shadcn/web/src/design-tokens.css +168 -0
- package/templates/react-spring-shadcn/web/src/design-widgets.css +31 -0
- package/templates/react-spring-shadcn/web/src/main.tsx +6 -0
- package/templates/react-spring-shadcn/web/src/structure-view.tsx +16 -0
- package/templates/react-spring-shadcn/web/src/styles.css +3 -0
- package/templates/react-spring-shadcn/web/src/tailwind.css +2 -0
- package/templates/react-spring-shadcn/web/src/ui.tsx +13 -0
- package/templates/react-spring-shadcn/web/src/widget-icon.tsx +5 -0
- package/templates/react-spring-shadcn/web/src/widget-types.ts +13 -0
- package/templates/react-spring-shadcn/web/src/workspace-model.ts +85 -0
- package/templates/react-spring-shadcn/web/tsconfig.json +22 -0
- package/templates/react-spring-shadcn/web/vite.config.ts +4 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
package dev.scaffold.app;
|
|
2
|
+
import org.springframework.web.bind.annotation.*;
|
|
3
|
+
import org.springframework.web.server.ResponseStatusException;
|
|
4
|
+
import org.springframework.http.HttpStatus;
|
|
5
|
+
import org.springframework.security.authentication.*;
|
|
6
|
+
import org.springframework.security.core.Authentication;
|
|
7
|
+
import org.springframework.security.core.context.SecurityContextHolder;
|
|
8
|
+
import org.springframework.security.core.AuthenticationException;
|
|
9
|
+
import org.springframework.security.web.context.HttpSessionSecurityContextRepository;
|
|
10
|
+
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
|
|
11
|
+
import org.springframework.data.domain.PageRequest;
|
|
12
|
+
import org.springframework.data.domain.Sort;
|
|
13
|
+
import org.springframework.transaction.annotation.Transactional;
|
|
14
|
+
import org.springframework.core.io.ClassPathResource;
|
|
15
|
+
import jakarta.servlet.http.*;
|
|
16
|
+
import java.util.*;
|
|
17
|
+
import java.time.Instant;
|
|
18
|
+
@RestController @RequestMapping("/api")
|
|
19
|
+
public class Api {
|
|
20
|
+
private final Users users;private final Records records;private final AuthenticationManager manager;
|
|
21
|
+
public Api(Users users,Records records,AuthenticationManager manager){this.users=users;this.records=records;this.manager=manager;}
|
|
22
|
+
private static ResponseStatusException invalid(){return new ResponseStatusException(HttpStatus.UNPROCESSABLE_ENTITY);}
|
|
23
|
+
private static UUID id(String value){try{return UUID.fromString(value);}catch(IllegalArgumentException e){throw invalid();}}
|
|
24
|
+
private AppUser user(Authentication auth){return users.findByEmail(auth.getName()).orElseThrow(()->new ResponseStatusException(HttpStatus.UNAUTHORIZED));}
|
|
25
|
+
private static String[] input(Map<String,Object> body){if(!body.keySet().equals(Set.of("title","content"))||!(body.get("title") instanceof String)||!(body.get("content") instanceof String))throw invalid();String title=((String)body.get("title")).strip(),content=(String)body.get("content");int n=title.codePointCount(0,title.length());if(n<1||n>120||content.codePointCount(0,content.length())>10000)throw invalid();return new String[]{title,content};}
|
|
26
|
+
private static Map<String,Object> out(PersonalRecord r){return Map.of("id",r.id.toString(),"title",r.title,"content",r.content,"created_at",r.createdAt.toString(),"updated_at",r.updatedAt.toString());}
|
|
27
|
+
private PersonalRecord owned(UUID id,UUID owner){return records.findByIdAndOwnerId(id,owner).orElseThrow(()->new ResponseStatusException(HttpStatus.NOT_FOUND));}
|
|
28
|
+
@GetMapping("/health") public Map<String,String> health(){return Map.of("status","ok");}
|
|
29
|
+
@GetMapping(value="/openapi.json",produces="application/json") public ClassPathResource openapi(){return new ClassPathResource("openapi.json");}
|
|
30
|
+
@PostMapping("/auth/login") public Map<String,Object> login(@RequestBody Map<String,Object> body,HttpServletRequest request,HttpServletResponse response){if(!body.keySet().equals(Set.of("email","password"))||!(body.get("email") instanceof String)||!(body.get("password") instanceof String))throw invalid();try{var auth=manager.authenticate(UsernamePasswordAuthenticationToken.unauthenticated(((String)body.get("email")).strip().toLowerCase(Locale.ROOT),body.get("password")));var context=SecurityContextHolder.createEmptyContext();context.setAuthentication(auth);request.getSession(true);request.changeSessionId();SecurityContextHolder.setContext(context);new HttpSessionSecurityContextRepository().saveContext(context,request,response);var u=user(auth);return Map.of("user",Map.of("id",u.id.toString(),"email",u.email),"mode","session");}catch(AuthenticationException e){throw new ResponseStatusException(HttpStatus.UNAUTHORIZED);}}
|
|
31
|
+
@GetMapping("/auth/me") public Map<String,Object> me(Authentication auth){var u=user(auth);return Map.of("user",Map.of("id",u.id.toString(),"email",u.email));}
|
|
32
|
+
@PostMapping("/auth/logout") @ResponseStatus(HttpStatus.NO_CONTENT) public void logout(HttpServletRequest req,HttpServletResponse res,Authentication auth){new SecurityContextLogoutHandler().logout(req,res,auth);}
|
|
33
|
+
@GetMapping("/records") public Map<String,Object> list(Authentication auth,@RequestParam(defaultValue="1") int page,@RequestParam(defaultValue="10") int pageSize){if(page<1||page>1000000||pageSize<1||pageSize>100)throw invalid();var rows=records.findByOwnerId(user(auth).id,PageRequest.of(page-1,pageSize,Sort.by(Sort.Direction.DESC,"createdAt","id")));return Map.of("items",rows.getContent().stream().map(Api::out).toList(),"total",rows.getTotalElements(),"page",page,"pageSize",pageSize);}
|
|
34
|
+
@PostMapping("/records") @ResponseStatus(HttpStatus.CREATED) public Map<String,Object> create(Authentication auth,@RequestBody Map<String,Object> body){var data=input(body);return out(records.saveAndFlush(new PersonalRecord(user(auth).id,data[0],data[1])));}
|
|
35
|
+
@GetMapping("/records/{recordId}") public Map<String,Object> detail(Authentication auth,@PathVariable String recordId){return out(owned(id(recordId),user(auth).id));}
|
|
36
|
+
@PutMapping("/records/{recordId}") @Transactional public Map<String,Object> update(Authentication auth,@PathVariable String recordId,@RequestBody Map<String,Object> body){var data=input(body);var owner=user(auth).id;var key=id(recordId);if(records.updateOwned(key,owner,data[0],data[1],Instant.now())==0)throw new ResponseStatusException(HttpStatus.NOT_FOUND);return out(owned(key,owner));}
|
|
37
|
+
@DeleteMapping("/records/{recordId}") @Transactional @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(Authentication auth,@PathVariable String recordId){if(records.deleteOwned(id(recordId),user(auth).id)==0)throw new ResponseStatusException(HttpStatus.NOT_FOUND);}
|
|
38
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
package dev.scaffold.app;
|
|
2
|
+
import jakarta.persistence.*;
|
|
3
|
+
import java.util.UUID;
|
|
4
|
+
@Entity @Table(name="app_user")
|
|
5
|
+
public class AppUser {
|
|
6
|
+
@Id UUID id=UUID.randomUUID();
|
|
7
|
+
@Column(nullable=false,unique=true,length=320) String email;
|
|
8
|
+
@Column(nullable=false) String password;
|
|
9
|
+
protected AppUser(){}
|
|
10
|
+
AppUser(String email,String password){this.email=email;this.password=password;}
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
package dev.scaffold.app;
|
|
2
|
+
import org.springframework.boot.SpringApplication;
|
|
3
|
+
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
4
|
+
@SpringBootApplication
|
|
5
|
+
public class Application {
|
|
6
|
+
public static void main(String[] args) { var context=SpringApplication.run(Application.class,args);if(context.getEnvironment().getProperty("scaffold.migrate-only",Boolean.class,false)||context.getEnvironment().getProperty("scaffold.seed-only",Boolean.class,false)){SpringApplication.exit(context);}}
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
package dev.scaffold.app;
|
|
2
|
+
import org.springframework.web.bind.annotation.*;
|
|
3
|
+
import org.springframework.web.server.ResponseStatusException;
|
|
4
|
+
import org.springframework.http.ResponseEntity;
|
|
5
|
+
import org.springframework.http.converter.HttpMessageNotReadableException;
|
|
6
|
+
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
|
|
7
|
+
import java.util.Map;
|
|
8
|
+
@RestControllerAdvice
|
|
9
|
+
public class Errors {
|
|
10
|
+
@ExceptionHandler(ResponseStatusException.class) ResponseEntity<?> status(ResponseStatusException e){return error(e.getStatusCode().value());}
|
|
11
|
+
@ExceptionHandler({HttpMessageNotReadableException.class,MethodArgumentTypeMismatchException.class}) ResponseEntity<?> invalid(Exception e){return error(422);}
|
|
12
|
+
private ResponseEntity<?> error(int status){String message=switch(status){case 401->"请重新登录。";case 404->"记录不存在。";case 422->"输入不合法,请检查字段和长度。";default->"请求失败。";};return ResponseEntity.status(status).body(Map.of("error",Map.of("code",String.valueOf(status),"message",message)));}
|
|
13
|
+
}
|
package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/PersonalRecord.java
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
package dev.scaffold.app;
|
|
2
|
+
import jakarta.persistence.*;
|
|
3
|
+
import java.time.Instant;
|
|
4
|
+
import java.util.UUID;
|
|
5
|
+
@Entity @Table(name="personal_record")
|
|
6
|
+
public class PersonalRecord {
|
|
7
|
+
@Id UUID id=UUID.randomUUID();
|
|
8
|
+
@Column(name="owner_id",nullable=false) UUID ownerId;
|
|
9
|
+
@Column(nullable=false,length=120) String title;
|
|
10
|
+
@Column(nullable=false,columnDefinition="text") String content;
|
|
11
|
+
@Column(name="created_at",nullable=false) Instant createdAt=Instant.now();
|
|
12
|
+
@Column(name="updated_at",nullable=false) Instant updatedAt=Instant.now();
|
|
13
|
+
protected PersonalRecord(){}
|
|
14
|
+
PersonalRecord(UUID ownerId,String title,String content){this.ownerId=ownerId;this.title=title;this.content=content;}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
package dev.scaffold.app;
|
|
2
|
+
import org.springframework.data.jpa.repository.JpaRepository;
|
|
3
|
+
import org.springframework.data.jpa.repository.Modifying;
|
|
4
|
+
import org.springframework.data.jpa.repository.Query;
|
|
5
|
+
import org.springframework.data.domain.Page;
|
|
6
|
+
import org.springframework.data.domain.Pageable;
|
|
7
|
+
import java.util.Optional;
|
|
8
|
+
import java.util.UUID;
|
|
9
|
+
public interface Records extends JpaRepository<PersonalRecord,UUID>{
|
|
10
|
+
Page<PersonalRecord> findByOwnerId(UUID ownerId,Pageable page);
|
|
11
|
+
Optional<PersonalRecord> findByIdAndOwnerId(UUID id,UUID ownerId);
|
|
12
|
+
@Modifying @Query("delete from PersonalRecord r where r.id=:id and r.ownerId=:ownerId") int deleteOwned(UUID id,UUID ownerId);
|
|
13
|
+
@Modifying @Query("update PersonalRecord r set r.title=:title,r.content=:content,r.updatedAt=:now where r.id=:id and r.ownerId=:ownerId") int updateOwned(UUID id,UUID ownerId,String title,String content,java.time.Instant now);
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
package dev.scaffold.app;
|
|
2
|
+
import org.springframework.context.annotation.*;
|
|
3
|
+
import org.springframework.security.authentication.*;
|
|
4
|
+
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
|
|
5
|
+
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
6
|
+
import org.springframework.security.config.http.SessionCreationPolicy;
|
|
7
|
+
import org.springframework.security.core.userdetails.*;
|
|
8
|
+
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
9
|
+
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
10
|
+
import org.springframework.security.web.SecurityFilterChain;
|
|
11
|
+
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
|
12
|
+
import org.springframework.web.filter.OncePerRequestFilter;
|
|
13
|
+
import jakarta.servlet.*;
|
|
14
|
+
import jakarta.servlet.http.*;
|
|
15
|
+
import java.io.IOException;
|
|
16
|
+
import java.util.Set;
|
|
17
|
+
@Configuration
|
|
18
|
+
public class Security {
|
|
19
|
+
@Bean PasswordEncoder encoder(){return new BCryptPasswordEncoder();}
|
|
20
|
+
@Bean UserDetailsService userDetails(Users users){return email->users.findByEmail(email).map(u->User.withUsername(u.email).password(u.password).roles("USER").build()).orElseThrow(()->new UsernameNotFoundException("Unknown account"));}
|
|
21
|
+
@Bean AuthenticationManager authenticationManager(UserDetailsService service,PasswordEncoder encoder){var provider=new DaoAuthenticationProvider(service);provider.setPasswordEncoder(encoder);return new ProviderManager(provider);}
|
|
22
|
+
@Bean SecurityFilterChain filter(HttpSecurity http) throws Exception {
|
|
23
|
+
String origin=System.getenv("APP_ORIGIN");if(origin==null)throw new IllegalStateException("APP_ORIGIN is required");
|
|
24
|
+
var originCheck=new OncePerRequestFilter(){protected void doFilterInternal(HttpServletRequest request,HttpServletResponse response,FilterChain chain)throws ServletException,IOException{if(!Set.of("GET","HEAD","OPTIONS").contains(request.getMethod())&&!origin.equals(request.getHeader("Origin"))){response.setStatus(403);response.setContentType("application/json");response.getWriter().write("{\"error\":{\"code\":\"403\",\"message\":\"Invalid request origin\"}}");return;}chain.doFilter(request,response);}};
|
|
25
|
+
http.csrf(csrf->csrf.disable()).addFilterBefore(originCheck,UsernamePasswordAuthenticationFilter.class).sessionManagement(s->s.sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED)).authorizeHttpRequests(a->a.requestMatchers("/api/health","/api/auth/login","/api/openapi.json","/error").permitAll().anyRequest().authenticated()).exceptionHandling(e->e.authenticationEntryPoint((req,res,ex)->{res.setStatus(401);res.setContentType("application/json");res.getWriter().write("{\"error\":{\"code\":\"401\",\"message\":\"Please sign in\"}}");}));
|
|
26
|
+
return http.build();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
package dev.scaffold.app;
|
|
2
|
+
import org.springframework.boot.ApplicationRunner;
|
|
3
|
+
import org.springframework.boot.ApplicationArguments;
|
|
4
|
+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
5
|
+
import org.springframework.stereotype.Component;
|
|
6
|
+
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
7
|
+
import java.util.Locale;
|
|
8
|
+
@Component @ConditionalOnProperty(name="scaffold.seed-only",havingValue="true")
|
|
9
|
+
public class Seed implements ApplicationRunner {
|
|
10
|
+
private final Users users;private final PasswordEncoder encoder;
|
|
11
|
+
public Seed(Users users,PasswordEncoder encoder){this.users=users;this.encoder=encoder;}
|
|
12
|
+
public void run(ApplicationArguments args){var password=System.getenv("SEED_PASSWORD");if(password==null||password.length()<12)throw new IllegalStateException("Provide an explicit seed password with 12+ characters");for(String key:new String[]{"SEED_A_EMAIL","SEED_B_EMAIL"}){var raw=System.getenv(key);if(raw==null)throw new IllegalStateException("Missing "+key);var email=raw.strip().toLowerCase(Locale.ROOT);if(users.findByEmail(email).isEmpty())users.saveAndFlush(new AppUser(email,encoder.encode(password)));}}
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
server.port=${PORT:8000}
|
|
2
|
+
server.address=127.0.0.1
|
|
3
|
+
server.servlet.session.timeout=15m
|
|
4
|
+
server.servlet.session.cookie.http-only=true
|
|
5
|
+
server.servlet.session.cookie.same-site=lax
|
|
6
|
+
server.servlet.session.cookie.secure=${SESSION_COOKIE_SECURE:true}
|
|
7
|
+
spring.datasource.url=${SPRING_DATASOURCE_URL}
|
|
8
|
+
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
|
|
9
|
+
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
|
|
10
|
+
spring.jpa.hibernate.ddl-auto=validate
|
|
11
|
+
spring.jpa.open-in-view=false
|
|
12
|
+
spring.jpa.show-sql=false
|
|
13
|
+
spring.jackson.deserialization.fail-on-unknown-properties=true
|
|
14
|
+
server.error.include-message=never
|
|
15
|
+
server.error.include-stacktrace=never
|
|
16
|
+
logging.level.root=WARN
|
|
17
|
+
spring.main.banner-mode=off
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
CREATE TABLE app_user (id UUID PRIMARY KEY, email VARCHAR(320) NOT NULL UNIQUE, password VARCHAR(255) NOT NULL);
|
|
2
|
+
CREATE TABLE personal_record (id UUID PRIMARY KEY, owner_id UUID NOT NULL REFERENCES app_user(id), title VARCHAR(120) NOT NULL, content TEXT NOT NULL, created_at TIMESTAMP WITH TIME ZONE NOT NULL, updated_at TIMESTAMP WITH TIME ZONE NOT NULL);
|
|
3
|
+
CREATE INDEX personal_record_owner_idx ON personal_record(owner_id);
|
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.3",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Personal Records",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "JWT or Session according to selected template. Session writes require the configured Origin."
|
|
7
|
+
},
|
|
8
|
+
"paths": {
|
|
9
|
+
"/api/health": {
|
|
10
|
+
"get": {
|
|
11
|
+
"responses": {
|
|
12
|
+
"200": {
|
|
13
|
+
"description": "Success",
|
|
14
|
+
"content": {
|
|
15
|
+
"application/json": {
|
|
16
|
+
"schema": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"status": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": [
|
|
24
|
+
"status"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"/api/auth/login": {
|
|
34
|
+
"post": {
|
|
35
|
+
"requestBody": {
|
|
36
|
+
"required": true,
|
|
37
|
+
"content": {
|
|
38
|
+
"application/json": {
|
|
39
|
+
"schema": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": [
|
|
43
|
+
"email",
|
|
44
|
+
"password"
|
|
45
|
+
],
|
|
46
|
+
"properties": {
|
|
47
|
+
"email": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
"password": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"writeOnly": true
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"responses": {
|
|
60
|
+
"200": {
|
|
61
|
+
"description": "Success",
|
|
62
|
+
"content": {
|
|
63
|
+
"application/json": {
|
|
64
|
+
"schema": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"user": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": [
|
|
70
|
+
"id",
|
|
71
|
+
"email"
|
|
72
|
+
],
|
|
73
|
+
"properties": {
|
|
74
|
+
"id": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"email": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"token": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"mode": {
|
|
86
|
+
"enum": [
|
|
87
|
+
"jwt",
|
|
88
|
+
"session"
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"required": [
|
|
93
|
+
"user",
|
|
94
|
+
"mode"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"401": {
|
|
101
|
+
"description": "Identity missing or expired"
|
|
102
|
+
},
|
|
103
|
+
"404": {
|
|
104
|
+
"description": "Record absent or owned by another user"
|
|
105
|
+
},
|
|
106
|
+
"422": {
|
|
107
|
+
"description": "Invalid input or protected field"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"/api/auth/me": {
|
|
113
|
+
"get": {
|
|
114
|
+
"responses": {
|
|
115
|
+
"200": {
|
|
116
|
+
"description": "Success",
|
|
117
|
+
"content": {
|
|
118
|
+
"application/json": {
|
|
119
|
+
"schema": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"properties": {
|
|
122
|
+
"user": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"required": [
|
|
125
|
+
"id",
|
|
126
|
+
"email"
|
|
127
|
+
],
|
|
128
|
+
"properties": {
|
|
129
|
+
"id": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
"email": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"user"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"401": {
|
|
146
|
+
"description": "Identity missing or expired"
|
|
147
|
+
},
|
|
148
|
+
"404": {
|
|
149
|
+
"description": "Record absent or owned by another user"
|
|
150
|
+
},
|
|
151
|
+
"422": {
|
|
152
|
+
"description": "Invalid input or protected field"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"/api/auth/logout": {
|
|
158
|
+
"post": {
|
|
159
|
+
"responses": {
|
|
160
|
+
"204": {
|
|
161
|
+
"description": "Logged out; JWT is cleared client-side"
|
|
162
|
+
},
|
|
163
|
+
"401": {
|
|
164
|
+
"description": "Identity missing or expired"
|
|
165
|
+
},
|
|
166
|
+
"404": {
|
|
167
|
+
"description": "Record absent or owned by another user"
|
|
168
|
+
},
|
|
169
|
+
"422": {
|
|
170
|
+
"description": "Invalid input or protected field"
|
|
171
|
+
},
|
|
172
|
+
"403": {
|
|
173
|
+
"description": "Cross-origin session write rejected"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"/api/records": {
|
|
179
|
+
"get": {
|
|
180
|
+
"parameters": [
|
|
181
|
+
{
|
|
182
|
+
"name": "page",
|
|
183
|
+
"in": "query",
|
|
184
|
+
"schema": {
|
|
185
|
+
"type": "integer",
|
|
186
|
+
"minimum": 1,
|
|
187
|
+
"maximum": 1000000,
|
|
188
|
+
"default": 1
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "pageSize",
|
|
193
|
+
"in": "query",
|
|
194
|
+
"schema": {
|
|
195
|
+
"type": "integer",
|
|
196
|
+
"minimum": 1,
|
|
197
|
+
"maximum": 100,
|
|
198
|
+
"default": 10
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"responses": {
|
|
203
|
+
"200": {
|
|
204
|
+
"description": "Success",
|
|
205
|
+
"content": {
|
|
206
|
+
"application/json": {
|
|
207
|
+
"schema": {
|
|
208
|
+
"type": "object",
|
|
209
|
+
"required": [
|
|
210
|
+
"items",
|
|
211
|
+
"total",
|
|
212
|
+
"page",
|
|
213
|
+
"pageSize"
|
|
214
|
+
],
|
|
215
|
+
"properties": {
|
|
216
|
+
"items": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": {
|
|
219
|
+
"$ref": "#/components/schemas/Record"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"total": {
|
|
223
|
+
"type": "integer"
|
|
224
|
+
},
|
|
225
|
+
"page": {
|
|
226
|
+
"type": "integer"
|
|
227
|
+
},
|
|
228
|
+
"pageSize": {
|
|
229
|
+
"type": "integer"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"401": {
|
|
237
|
+
"description": "Identity missing or expired"
|
|
238
|
+
},
|
|
239
|
+
"404": {
|
|
240
|
+
"description": "Record absent or owned by another user"
|
|
241
|
+
},
|
|
242
|
+
"422": {
|
|
243
|
+
"description": "Invalid input or protected field"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"post": {
|
|
248
|
+
"requestBody": {
|
|
249
|
+
"required": true,
|
|
250
|
+
"content": {
|
|
251
|
+
"application/json": {
|
|
252
|
+
"schema": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"additionalProperties": false,
|
|
255
|
+
"required": [
|
|
256
|
+
"title",
|
|
257
|
+
"content"
|
|
258
|
+
],
|
|
259
|
+
"properties": {
|
|
260
|
+
"title": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"minLength": 1,
|
|
263
|
+
"maxLength": 120
|
|
264
|
+
},
|
|
265
|
+
"content": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"maxLength": 10000
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"responses": {
|
|
275
|
+
"201": {
|
|
276
|
+
"description": "Success",
|
|
277
|
+
"content": {
|
|
278
|
+
"application/json": {
|
|
279
|
+
"schema": {
|
|
280
|
+
"$ref": "#/components/schemas/Record"
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"401": {
|
|
286
|
+
"description": "Identity missing or expired"
|
|
287
|
+
},
|
|
288
|
+
"404": {
|
|
289
|
+
"description": "Record absent or owned by another user"
|
|
290
|
+
},
|
|
291
|
+
"422": {
|
|
292
|
+
"description": "Invalid input or protected field"
|
|
293
|
+
},
|
|
294
|
+
"403": {
|
|
295
|
+
"description": "Cross-origin session write rejected"
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"/api/records/{id}": {
|
|
301
|
+
"parameters": [
|
|
302
|
+
{
|
|
303
|
+
"name": "id",
|
|
304
|
+
"in": "path",
|
|
305
|
+
"required": true,
|
|
306
|
+
"schema": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"format": "uuid"
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"get": {
|
|
313
|
+
"responses": {
|
|
314
|
+
"200": {
|
|
315
|
+
"description": "Success",
|
|
316
|
+
"content": {
|
|
317
|
+
"application/json": {
|
|
318
|
+
"schema": {
|
|
319
|
+
"$ref": "#/components/schemas/Record"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"401": {
|
|
325
|
+
"description": "Identity missing or expired"
|
|
326
|
+
},
|
|
327
|
+
"404": {
|
|
328
|
+
"description": "Record absent or owned by another user"
|
|
329
|
+
},
|
|
330
|
+
"422": {
|
|
331
|
+
"description": "Invalid input or protected field"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"put": {
|
|
336
|
+
"requestBody": {
|
|
337
|
+
"required": true,
|
|
338
|
+
"content": {
|
|
339
|
+
"application/json": {
|
|
340
|
+
"schema": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"additionalProperties": false,
|
|
343
|
+
"required": [
|
|
344
|
+
"title",
|
|
345
|
+
"content"
|
|
346
|
+
],
|
|
347
|
+
"properties": {
|
|
348
|
+
"title": {
|
|
349
|
+
"type": "string",
|
|
350
|
+
"minLength": 1,
|
|
351
|
+
"maxLength": 120
|
|
352
|
+
},
|
|
353
|
+
"content": {
|
|
354
|
+
"type": "string",
|
|
355
|
+
"maxLength": 10000
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"responses": {
|
|
363
|
+
"200": {
|
|
364
|
+
"description": "Success",
|
|
365
|
+
"content": {
|
|
366
|
+
"application/json": {
|
|
367
|
+
"schema": {
|
|
368
|
+
"$ref": "#/components/schemas/Record"
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"401": {
|
|
374
|
+
"description": "Identity missing or expired"
|
|
375
|
+
},
|
|
376
|
+
"404": {
|
|
377
|
+
"description": "Record absent or owned by another user"
|
|
378
|
+
},
|
|
379
|
+
"422": {
|
|
380
|
+
"description": "Invalid input or protected field"
|
|
381
|
+
},
|
|
382
|
+
"403": {
|
|
383
|
+
"description": "Cross-origin session write rejected"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"delete": {
|
|
388
|
+
"responses": {
|
|
389
|
+
"204": {
|
|
390
|
+
"description": "Deleted"
|
|
391
|
+
},
|
|
392
|
+
"401": {
|
|
393
|
+
"description": "Identity missing or expired"
|
|
394
|
+
},
|
|
395
|
+
"404": {
|
|
396
|
+
"description": "Record absent or owned by another user"
|
|
397
|
+
},
|
|
398
|
+
"422": {
|
|
399
|
+
"description": "Invalid input or protected field"
|
|
400
|
+
},
|
|
401
|
+
"403": {
|
|
402
|
+
"description": "Cross-origin session write rejected"
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"components": {
|
|
409
|
+
"schemas": {
|
|
410
|
+
"Record": {
|
|
411
|
+
"type": "object",
|
|
412
|
+
"required": [
|
|
413
|
+
"id",
|
|
414
|
+
"title",
|
|
415
|
+
"content",
|
|
416
|
+
"created_at",
|
|
417
|
+
"updated_at"
|
|
418
|
+
],
|
|
419
|
+
"properties": {
|
|
420
|
+
"id": {
|
|
421
|
+
"type": "string",
|
|
422
|
+
"format": "uuid"
|
|
423
|
+
},
|
|
424
|
+
"title": {
|
|
425
|
+
"type": "string"
|
|
426
|
+
},
|
|
427
|
+
"content": {
|
|
428
|
+
"type": "string"
|
|
429
|
+
},
|
|
430
|
+
"created_at": {
|
|
431
|
+
"type": "string",
|
|
432
|
+
"format": "date-time"
|
|
433
|
+
},
|
|
434
|
+
"updated_at": {
|
|
435
|
+
"type": "string",
|
|
436
|
+
"format": "date-time"
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"RecordInput": {
|
|
441
|
+
"type": "object",
|
|
442
|
+
"additionalProperties": false,
|
|
443
|
+
"required": [
|
|
444
|
+
"title",
|
|
445
|
+
"content"
|
|
446
|
+
],
|
|
447
|
+
"properties": {
|
|
448
|
+
"title": {
|
|
449
|
+
"type": "string",
|
|
450
|
+
"minLength": 1,
|
|
451
|
+
"maxLength": 120
|
|
452
|
+
},
|
|
453
|
+
"content": {
|
|
454
|
+
"type": "string",
|
|
455
|
+
"maxLength": 10000
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|