create-huenei-template 0.2.2
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/README.md +132 -0
- package/bin/create-huenei-template.js +2 -0
- package/dist/config/templates.js +54 -0
- package/dist/core/dependency-manager.js +55 -0
- package/dist/core/errors.js +43 -0
- package/dist/core/file-operations.js +25 -0
- package/dist/core/prompts.js +183 -0
- package/dist/core/template-resolver.js +18 -0
- package/dist/index.js +85 -0
- package/dist/templates/backend/.gitkeep +1 -0
- package/dist/templates/backend/nestjs-api/.prettierrc +4 -0
- package/dist/templates/backend/nestjs-api/README.md +98 -0
- package/dist/templates/backend/nestjs-api/eslint.config.mjs +35 -0
- package/dist/templates/backend/nestjs-api/nest-cli.json +8 -0
- package/dist/templates/backend/nestjs-api/package.json +71 -0
- package/dist/templates/backend/nestjs-api/pnpm-lock.yaml +6233 -0
- package/dist/templates/backend/nestjs-api/src/app.controller.spec.ts +22 -0
- package/dist/templates/backend/nestjs-api/src/app.controller.ts +12 -0
- package/dist/templates/backend/nestjs-api/src/app.module.ts +10 -0
- package/dist/templates/backend/nestjs-api/src/app.service.ts +8 -0
- package/dist/templates/backend/nestjs-api/src/main.ts +8 -0
- package/dist/templates/backend/nestjs-api/test/app.e2e-spec.ts +25 -0
- package/dist/templates/backend/nestjs-api/test/jest-e2e.json +9 -0
- package/dist/templates/backend/nestjs-api/tsconfig.build.json +4 -0
- package/dist/templates/backend/nestjs-api/tsconfig.json +25 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/commands/new-endpoint.md +209 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/commands/new-model.md +201 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/rules/api-rest.mdc +126 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/rules/authentication-security.mdc +86 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/rules/dto-validation.mdc +93 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/rules/general-rules.mdc +126 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/rules/nestjs-architecture.mdc +83 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/rules/prisma-standards.mdc +90 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/rules/swagger-documentation.mdc +90 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/skills/api-security-best-practices/SKILL.md +907 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/skills/docker-expert/SKILL.md +409 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/skills/nestjs-expert/SKILL.md +552 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/skills/nestjs-the-best-practices/AGENTS.md +5958 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/skills/nestjs-the-best-practices/SKILL.md +130 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/skills/nodejs-best-practices/SKILL.md +333 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/skills/postgresql-table-design/SKILL.md +202 -0
- package/dist/templates/backend/nestjs-api-postgres/.cursor/skills/prisma-expert/SKILL.md +355 -0
- package/dist/templates/backend/nestjs-api-postgres/.dockerignore +50 -0
- package/dist/templates/backend/nestjs-api-postgres/.env.example +18 -0
- package/dist/templates/backend/nestjs-api-postgres/.env.test +18 -0
- package/dist/templates/backend/nestjs-api-postgres/.prettierrc +4 -0
- package/dist/templates/backend/nestjs-api-postgres/README.md +1502 -0
- package/dist/templates/backend/nestjs-api-postgres/docker-compose.yml +24 -0
- package/dist/templates/backend/nestjs-api-postgres/eslint.config.mjs +41 -0
- package/dist/templates/backend/nestjs-api-postgres/nest-cli.json +8 -0
- package/dist/templates/backend/nestjs-api-postgres/package.json +107 -0
- package/dist/templates/backend/nestjs-api-postgres/prisma/migrations/20260126125423_init/migration.sql +84 -0
- package/dist/templates/backend/nestjs-api-postgres/prisma/migrations/migration_lock.toml +3 -0
- package/dist/templates/backend/nestjs-api-postgres/prisma/schema.prisma +76 -0
- package/dist/templates/backend/nestjs-api-postgres/prisma/seed.ts +220 -0
- package/dist/templates/backend/nestjs-api-postgres/prisma.config.ts +10 -0
- package/dist/templates/backend/nestjs-api-postgres/src/app.module.ts +39 -0
- package/dist/templates/backend/nestjs-api-postgres/src/app.service.ts +8 -0
- package/dist/templates/backend/nestjs-api-postgres/src/auth/auth.controller.ts +36 -0
- package/dist/templates/backend/nestjs-api-postgres/src/auth/auth.module.ts +22 -0
- package/dist/templates/backend/nestjs-api-postgres/src/auth/auth.service.ts +63 -0
- package/dist/templates/backend/nestjs-api-postgres/src/auth/decorators/roles.decorator.ts +5 -0
- package/dist/templates/backend/nestjs-api-postgres/src/auth/dto/login-response.dto.ts +23 -0
- package/dist/templates/backend/nestjs-api-postgres/src/auth/dto/login.dto.ts +27 -0
- package/dist/templates/backend/nestjs-api-postgres/src/auth/guards/jwt-auth.guard.ts +20 -0
- package/dist/templates/backend/nestjs-api-postgres/src/auth/guards/roles.guard.ts +23 -0
- package/dist/templates/backend/nestjs-api-postgres/src/auth/strategies/jwt.strategy.ts +32 -0
- package/dist/templates/backend/nestjs-api-postgres/src/auth/types.ts +18 -0
- package/dist/templates/backend/nestjs-api-postgres/src/common/dto/paginated-response.dto.ts +16 -0
- package/dist/templates/backend/nestjs-api-postgres/src/common/dto/pagination.dto.ts +31 -0
- package/dist/templates/backend/nestjs-api-postgres/src/common/filters/http-exception.filter.ts +53 -0
- package/dist/templates/backend/nestjs-api-postgres/src/config/env.validation.ts +41 -0
- package/dist/templates/backend/nestjs-api-postgres/src/health/health.controller.ts +35 -0
- package/dist/templates/backend/nestjs-api-postgres/src/health/health.module.ts +7 -0
- package/dist/templates/backend/nestjs-api-postgres/src/main.ts +87 -0
- package/dist/templates/backend/nestjs-api-postgres/src/posts/dto/create-post.dto.ts +32 -0
- package/dist/templates/backend/nestjs-api-postgres/src/posts/dto/post-response.dto.ts +41 -0
- package/dist/templates/backend/nestjs-api-postgres/src/posts/dto/update-post.dto.ts +31 -0
- package/dist/templates/backend/nestjs-api-postgres/src/posts/posts.controller.ts +161 -0
- package/dist/templates/backend/nestjs-api-postgres/src/posts/posts.module.ts +12 -0
- package/dist/templates/backend/nestjs-api-postgres/src/posts/posts.service.ts +171 -0
- package/dist/templates/backend/nestjs-api-postgres/src/prisma/prisma.module.ts +9 -0
- package/dist/templates/backend/nestjs-api-postgres/src/prisma/prisma.service.ts +27 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/constants/settings.constants.ts +9 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/dto/profile-response.dto.ts +39 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/dto/settings-response.dto.ts +18 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/dto/update-profile.dto.ts +48 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/dto/update-settings.dto.ts +40 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/dto/user-response.dto.ts +18 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/profile.service.ts +49 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/settings.service.ts +82 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/users.controller.ts +102 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/users.module.ts +14 -0
- package/dist/templates/backend/nestjs-api-postgres/src/users/users.service.ts +27 -0
- package/dist/templates/backend/nestjs-api-postgres/test/README.md +412 -0
- package/dist/templates/backend/nestjs-api-postgres/test/e2e/auth.e2e-spec.ts +147 -0
- package/dist/templates/backend/nestjs-api-postgres/test/e2e/health.e2e-spec.ts +62 -0
- package/dist/templates/backend/nestjs-api-postgres/test/e2e/posts.e2e-spec.ts +407 -0
- package/dist/templates/backend/nestjs-api-postgres/test/e2e/users.e2e-spec.ts +287 -0
- package/dist/templates/backend/nestjs-api-postgres/test/fixtures/test-data.ts +109 -0
- package/dist/templates/backend/nestjs-api-postgres/test/helpers/auth.helper.ts +54 -0
- package/dist/templates/backend/nestjs-api-postgres/test/helpers/db.helper.ts +73 -0
- package/dist/templates/backend/nestjs-api-postgres/test/jest-e2e.json +12 -0
- package/dist/templates/backend/nestjs-api-postgres/test/setup-e2e.ts +8 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/app.service.spec.ts +24 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/auth.controller.spec.ts +91 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/auth.service.spec.ts +161 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/health.controller.spec.ts +78 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/http-exception.filter.spec.ts +150 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/jwt-auth.guard.spec.ts +50 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/jwt.strategy.spec.ts +41 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/posts.controller.spec.ts +249 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/posts.service.spec.ts +328 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/profile.service.spec.ts +146 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/settings.service.spec.ts +242 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/users.controller.spec.ts +178 -0
- package/dist/templates/backend/nestjs-api-postgres/test/unit/users.service.spec.ts +96 -0
- package/dist/templates/backend/nestjs-api-postgres/tsconfig.build.json +4 -0
- package/dist/templates/backend/nestjs-api-postgres/tsconfig.json +28 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/commands/new-endpoint.md +209 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/commands/new-model.md +201 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/rules/api-rest.mdc +126 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/rules/authentication-security.mdc +86 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/rules/dto-validation.mdc +93 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/rules/general-rules.mdc +126 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/rules/nestjs-architecture.mdc +83 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/rules/prisma-standards.mdc +90 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/rules/swagger-documentation.mdc +90 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/skills/api-security-best-practices/SKILL.md +907 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/skills/nestjs-expert/SKILL.md +552 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/skills/nestjs-the-best-practices/AGENTS.md +5958 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/skills/nestjs-the-best-practices/SKILL.md +130 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/skills/nodejs-best-practices/SKILL.md +333 -0
- package/dist/templates/backend/nestjs-api-sqlite/.cursor/skills/prisma-expert/SKILL.md +355 -0
- package/dist/templates/backend/nestjs-api-sqlite/.env.example +4 -0
- package/dist/templates/backend/nestjs-api-sqlite/.env.test +4 -0
- package/dist/templates/backend/nestjs-api-sqlite/.prettierrc +4 -0
- package/dist/templates/backend/nestjs-api-sqlite/FINAL_IMPLEMENTATION_SUMMARY.md +537 -0
- package/dist/templates/backend/nestjs-api-sqlite/IMPLEMENTATION_REPORT.md +229 -0
- package/dist/templates/backend/nestjs-api-sqlite/IMPLEMENTATION_SUMMARY.md +275 -0
- package/dist/templates/backend/nestjs-api-sqlite/PRISMA_7_MIGRATION.md +175 -0
- package/dist/templates/backend/nestjs-api-sqlite/README.md +1464 -0
- package/dist/templates/backend/nestjs-api-sqlite/SWAGGER_INTEGRATION.md +194 -0
- package/dist/templates/backend/nestjs-api-sqlite/TESTING_IMPLEMENTATION_REPORT.md +368 -0
- package/dist/templates/backend/nestjs-api-sqlite/TESTING_SUMMARY.md +293 -0
- package/dist/templates/backend/nestjs-api-sqlite/Untitled +218 -0
- package/dist/templates/backend/nestjs-api-sqlite/eslint.config.mjs +41 -0
- package/dist/templates/backend/nestjs-api-sqlite/nest-cli.json +8 -0
- package/dist/templates/backend/nestjs-api-sqlite/package.json +105 -0
- package/dist/templates/backend/nestjs-api-sqlite/pnpm-lock.yaml +7630 -0
- package/dist/templates/backend/nestjs-api-sqlite/prisma/migrations/20260123190258_init/migration.sql +12 -0
- package/dist/templates/backend/nestjs-api-sqlite/prisma/migrations/20260123205000_add_roles_and_posts/migration.sql +32 -0
- package/dist/templates/backend/nestjs-api-sqlite/prisma/migrations/20260124163749_init_with_profile_and_settings/migration.sql +33 -0
- package/dist/templates/backend/nestjs-api-sqlite/prisma/migrations/20260124190929_add_render_model/migration.sql +13 -0
- package/dist/templates/backend/nestjs-api-sqlite/prisma/migrations/20260124200534_add_post_indexes/migration.sql +16 -0
- package/dist/templates/backend/nestjs-api-sqlite/prisma/migrations/migration_lock.toml +3 -0
- package/dist/templates/backend/nestjs-api-sqlite/prisma/schema.prisma +76 -0
- package/dist/templates/backend/nestjs-api-sqlite/prisma/seed.ts +218 -0
- package/dist/templates/backend/nestjs-api-sqlite/prisma.config.ts +10 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/app.module.ts +39 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/app.service.ts +8 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/auth/auth.controller.ts +36 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/auth/auth.module.ts +22 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/auth/auth.service.ts +63 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/auth/decorators/roles.decorator.ts +5 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/auth/dto/login-response.dto.ts +23 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/auth/dto/login.dto.ts +27 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/auth/guards/jwt-auth.guard.ts +20 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/auth/guards/roles.guard.ts +23 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/auth/strategies/jwt.strategy.ts +32 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/auth/types.ts +18 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/common/dto/paginated-response.dto.ts +16 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/common/dto/pagination.dto.ts +31 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/common/filters/http-exception.filter.ts +53 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/config/env.validation.ts +35 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/health/health.controller.ts +35 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/health/health.module.ts +7 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/main.ts +87 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/posts/dto/create-post.dto.ts +32 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/posts/dto/post-response.dto.ts +41 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/posts/dto/update-post.dto.ts +31 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/posts/posts.controller.ts +161 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/posts/posts.module.ts +12 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/posts/posts.service.ts +171 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/prisma/prisma.module.ts +9 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/prisma/prisma.service.ts +29 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/constants/settings.constants.ts +9 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/dto/profile-response.dto.ts +39 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/dto/settings-response.dto.ts +18 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/dto/update-profile.dto.ts +48 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/dto/update-settings.dto.ts +40 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/dto/user-response.dto.ts +18 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/profile.service.ts +49 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/settings.service.ts +82 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/users.controller.ts +102 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/users.module.ts +14 -0
- package/dist/templates/backend/nestjs-api-sqlite/src/users/users.service.ts +27 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/README.md +412 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/e2e/auth.e2e-spec.ts +147 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/e2e/health.e2e-spec.ts +62 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/e2e/posts.e2e-spec.ts +407 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/e2e/users.e2e-spec.ts +287 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/fixtures/test-data.ts +109 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/helpers/auth.helper.ts +54 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/helpers/db.helper.ts +72 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/jest-e2e.json +12 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/setup-e2e.ts +8 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/app.service.spec.ts +24 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/auth.controller.spec.ts +91 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/auth.service.spec.ts +161 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/health.controller.spec.ts +78 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/http-exception.filter.spec.ts +150 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/jwt-auth.guard.spec.ts +50 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/jwt.strategy.spec.ts +41 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/posts.controller.spec.ts +249 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/posts.service.spec.ts +328 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/profile.service.spec.ts +146 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/settings.service.spec.ts +242 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/users.controller.spec.ts +178 -0
- package/dist/templates/backend/nestjs-api-sqlite/test/unit/users.service.spec.ts +96 -0
- package/dist/templates/backend/nestjs-api-sqlite/tsconfig.build.json +4 -0
- package/dist/templates/backend/nestjs-api-sqlite/tsconfig.json +28 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-component/SKILL.md +288 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-component/references/component-patterns.md +358 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-di/SKILL.md +387 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-di/references/di-patterns.md +519 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-directives/SKILL.md +437 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-directives/references/directive-patterns.md +570 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-forms/SKILL.md +434 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-forms/references/form-patterns.md +398 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-http/SKILL.md +366 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-http/references/http-patterns.md +448 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-routing/SKILL.md +395 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-routing/references/routing-patterns.md +472 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-signals/SKILL.md +302 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-signals/references/signal-patterns.md +404 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-ssr/SKILL.md +435 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-ssr/references/ssr-patterns.md +497 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-testing/SKILL.md +660 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-testing/references/testing-patterns.md +707 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-tooling/SKILL.md +352 -0
- package/dist/templates/frontend/angular-base/.agents/skills/angular-tooling/references/tooling-patterns.md +448 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-accessibility/SKILL.md +780 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-advanced-components/SKILL.md +718 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-advanced-design-systems/SKILL.md +612 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-advanced-layouts/SKILL.md +594 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-animations/SKILL.md +432 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-animations/references/animation-patterns.md +427 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-debugging/SKILL.md +354 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-debugging/references/troubleshooting-guide.md +306 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-framework-integration/SKILL.md +578 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-framework-integration/references/react-patterns.md +353 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-fundamentals-v4/SKILL.md +608 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-fundamentals-v4/references/advanced-theme-patterns.md +215 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-fundamentals-v4/references/custom-utilities-guide.md +281 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-mobile-first/SKILL.md +768 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-performance/SKILL.md +374 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-performance/references/bundle-optimization.md +244 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-plugins/SKILL.md +505 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-responsive-darkmode/SKILL.md +601 -0
- package/dist/templates/frontend/angular-base/.agents/skills/tailwindcss-responsive-darkmode/references/advanced-responsive-patterns.md +485 -0
- package/dist/templates/frontend/angular-base/.agents/skills/web-design-guidelines/SKILL.md +39 -0
- package/dist/templates/frontend/angular-base/.cursor/mcp.json +12 -0
- package/dist/templates/frontend/angular-base/.cursor/rules/angular-expert.mdc +153 -0
- package/dist/templates/frontend/angular-base/.editorconfig +17 -0
- package/dist/templates/frontend/angular-base/.eslintrc.json +52 -0
- package/dist/templates/frontend/angular-base/.github/workflows/ci.yml +122 -0
- package/dist/templates/frontend/angular-base/.husky/pre-commit +1 -0
- package/dist/templates/frontend/angular-base/.husky/pre-push +1 -0
- package/dist/templates/frontend/angular-base/.postcssrc.json +5 -0
- package/dist/templates/frontend/angular-base/.prettierignore +8 -0
- package/dist/templates/frontend/angular-base/.prettierrc.json +15 -0
- package/dist/templates/frontend/angular-base/.vscode/extensions.json +4 -0
- package/dist/templates/frontend/angular-base/.vscode/launch.json +20 -0
- package/dist/templates/frontend/angular-base/.vscode/mcp.json +9 -0
- package/dist/templates/frontend/angular-base/.vscode/tasks.json +42 -0
- package/dist/templates/frontend/angular-base/CONTRIBUTING.md +230 -0
- package/dist/templates/frontend/angular-base/README.md +383 -0
- package/dist/templates/frontend/angular-base/angular.json +84 -0
- package/dist/templates/frontend/angular-base/cypress/e2e/app.cy.ts +39 -0
- package/dist/templates/frontend/angular-base/cypress/e2e/auth.cy.ts +196 -0
- package/dist/templates/frontend/angular-base/cypress/e2e/dashboard.cy.ts +56 -0
- package/dist/templates/frontend/angular-base/cypress/e2e/home.cy.ts +35 -0
- package/dist/templates/frontend/angular-base/cypress/fixtures/example.json +4 -0
- package/dist/templates/frontend/angular-base/cypress/support/commands.ts +8 -0
- package/dist/templates/frontend/angular-base/cypress/support/e2e.ts +11 -0
- package/dist/templates/frontend/angular-base/cypress.config.ts +11 -0
- package/dist/templates/frontend/angular-base/docs/ARCHITECTURE.md +337 -0
- package/dist/templates/frontend/angular-base/docs/AUTHENTICATION.md +491 -0
- package/dist/templates/frontend/angular-base/docs/DEPLOYMENT.md +507 -0
- package/dist/templates/frontend/angular-base/docs/FEATURES.md +404 -0
- package/dist/templates/frontend/angular-base/docs/TESTING.md +418 -0
- package/dist/templates/frontend/angular-base/docs/THEMING.md +333 -0
- package/dist/templates/frontend/angular-base/docs/UI_LIBRARIES.md +380 -0
- package/dist/templates/frontend/angular-base/docs/USER_PROFILE_FLOW.md +431 -0
- package/dist/templates/frontend/angular-base/package-lock.json +13321 -0
- package/dist/templates/frontend/angular-base/package.json +93 -0
- package/dist/templates/frontend/angular-base/public/favicon.ico +0 -0
- package/dist/templates/frontend/angular-base/src/app/app.config.server.ts +14 -0
- package/dist/templates/frontend/angular-base/src/app/app.config.ts +32 -0
- package/dist/templates/frontend/angular-base/src/app/app.css +0 -0
- package/dist/templates/frontend/angular-base/src/app/app.html +1 -0
- package/dist/templates/frontend/angular-base/src/app/app.routes.server.ts +28 -0
- package/dist/templates/frontend/angular-base/src/app/app.routes.ts +67 -0
- package/dist/templates/frontend/angular-base/src/app/app.spec.ts +23 -0
- package/dist/templates/frontend/angular-base/src/app/app.ts +12 -0
- package/dist/templates/frontend/angular-base/src/app/core/guards/admin.guard.ts +16 -0
- package/dist/templates/frontend/angular-base/src/app/core/guards/auth.guard.spec.ts +43 -0
- package/dist/templates/frontend/angular-base/src/app/core/guards/auth.guard.ts +15 -0
- package/dist/templates/frontend/angular-base/src/app/core/index.ts +10 -0
- package/dist/templates/frontend/angular-base/src/app/core/interceptors/http-error.interceptor.spec.ts +43 -0
- package/dist/templates/frontend/angular-base/src/app/core/interceptors/http-error.interceptor.ts +53 -0
- package/dist/templates/frontend/angular-base/src/app/core/services/auth.service.spec.ts +33 -0
- package/dist/templates/frontend/angular-base/src/app/core/services/auth.service.ts +91 -0
- package/dist/templates/frontend/angular-base/src/app/core/services/theme.service.spec.ts +33 -0
- package/dist/templates/frontend/angular-base/src/app/core/services/theme.service.ts +136 -0
- package/dist/templates/frontend/angular-base/src/app/features/admin/index.ts +3 -0
- package/dist/templates/frontend/angular-base/src/app/features/admin/routes.ts +21 -0
- package/dist/templates/frontend/angular-base/src/app/features/admin/users/models/admin-user.model.ts +32 -0
- package/dist/templates/frontend/angular-base/src/app/features/admin/users/pages/user-form.page.ts +279 -0
- package/dist/templates/frontend/angular-base/src/app/features/admin/users/pages/user-list.page.ts +336 -0
- package/dist/templates/frontend/angular-base/src/app/features/admin/users/services/admin-user.service.ts +151 -0
- package/dist/templates/frontend/angular-base/src/app/features/auth/index.ts +2 -0
- package/dist/templates/frontend/angular-base/src/app/features/auth/models/auth.model.ts +39 -0
- package/dist/templates/frontend/angular-base/src/app/features/auth/pages/login.page.spec.ts +44 -0
- package/dist/templates/frontend/angular-base/src/app/features/auth/pages/login.page.ts +187 -0
- package/dist/templates/frontend/angular-base/src/app/features/auth/pages/password-recovery.page.spec.ts +48 -0
- package/dist/templates/frontend/angular-base/src/app/features/auth/pages/password-recovery.page.ts +171 -0
- package/dist/templates/frontend/angular-base/src/app/features/auth/pages/signup.page.spec.ts +53 -0
- package/dist/templates/frontend/angular-base/src/app/features/auth/pages/signup.page.ts +269 -0
- package/dist/templates/frontend/angular-base/src/app/features/auth/routes.ts +22 -0
- package/dist/templates/frontend/angular-base/src/app/features/customers/index.ts +3 -0
- package/dist/templates/frontend/angular-base/src/app/features/customers/models/customer.model.ts +41 -0
- package/dist/templates/frontend/angular-base/src/app/features/customers/pages/customer-detail.page.ts +299 -0
- package/dist/templates/frontend/angular-base/src/app/features/customers/pages/customer-form.page.ts +302 -0
- package/dist/templates/frontend/angular-base/src/app/features/customers/pages/customer-list.page.ts +439 -0
- package/dist/templates/frontend/angular-base/src/app/features/customers/routes.ts +21 -0
- package/dist/templates/frontend/angular-base/src/app/features/customers/services/customer.service.ts +162 -0
- package/dist/templates/frontend/angular-base/src/app/features/dashboard/components/stats-card/stats-card.component.spec.ts +23 -0
- package/dist/templates/frontend/angular-base/src/app/features/dashboard/components/stats-card/stats-card.component.ts +52 -0
- package/dist/templates/frontend/angular-base/src/app/features/dashboard/index.ts +1 -0
- package/dist/templates/frontend/angular-base/src/app/features/dashboard/pages/dashboard.page.spec.ts +21 -0
- package/dist/templates/frontend/angular-base/src/app/features/dashboard/pages/dashboard.page.ts +122 -0
- package/dist/templates/frontend/angular-base/src/app/features/dashboard/routes.ts +8 -0
- package/dist/templates/frontend/angular-base/src/app/features/dashboard/services/dashboard.service.spec.ts +37 -0
- package/dist/templates/frontend/angular-base/src/app/features/dashboard/services/dashboard.service.ts +48 -0
- package/dist/templates/frontend/angular-base/src/app/features/errors/index.ts +1 -0
- package/dist/templates/frontend/angular-base/src/app/features/errors/pages/forbidden.page.ts +50 -0
- package/dist/templates/frontend/angular-base/src/app/features/errors/pages/maintenance.page.ts +46 -0
- package/dist/templates/frontend/angular-base/src/app/features/errors/pages/not-found.page.ts +49 -0
- package/dist/templates/frontend/angular-base/src/app/features/errors/pages/server-error.page.ts +60 -0
- package/dist/templates/frontend/angular-base/src/app/features/errors/routes.ts +25 -0
- package/dist/templates/frontend/angular-base/src/app/features/home/index.ts +1 -0
- package/dist/templates/frontend/angular-base/src/app/features/home/pages/home.page.spec.ts +23 -0
- package/dist/templates/frontend/angular-base/src/app/features/home/pages/home.page.ts +105 -0
- package/dist/templates/frontend/angular-base/src/app/features/home/routes.ts +8 -0
- package/dist/templates/frontend/angular-base/src/app/features/projects/index.ts +3 -0
- package/dist/templates/frontend/angular-base/src/app/features/projects/models/project.model.ts +48 -0
- package/dist/templates/frontend/angular-base/src/app/features/projects/pages/project-detail.page.ts +444 -0
- package/dist/templates/frontend/angular-base/src/app/features/projects/pages/project-form.page.ts +393 -0
- package/dist/templates/frontend/angular-base/src/app/features/projects/pages/project-list.page.ts +411 -0
- package/dist/templates/frontend/angular-base/src/app/features/projects/routes.ts +21 -0
- package/dist/templates/frontend/angular-base/src/app/features/projects/services/project.service.ts +227 -0
- package/dist/templates/frontend/angular-base/src/app/features/reports/index.ts +3 -0
- package/dist/templates/frontend/angular-base/src/app/features/reports/models/report.model.ts +27 -0
- package/dist/templates/frontend/angular-base/src/app/features/reports/pages/analytics.page.html +246 -0
- package/dist/templates/frontend/angular-base/src/app/features/reports/pages/analytics.page.ts +135 -0
- package/dist/templates/frontend/angular-base/src/app/features/reports/routes.ts +13 -0
- package/dist/templates/frontend/angular-base/src/app/features/reports/services/report.service.ts +141 -0
- package/dist/templates/frontend/angular-base/src/app/features/user/index.ts +3 -0
- package/dist/templates/frontend/angular-base/src/app/features/user/models/user.model.ts +23 -0
- package/dist/templates/frontend/angular-base/src/app/features/user/pages/privacy.page.spec.ts +27 -0
- package/dist/templates/frontend/angular-base/src/app/features/user/pages/privacy.page.ts +414 -0
- package/dist/templates/frontend/angular-base/src/app/features/user/pages/profile.page.spec.ts +39 -0
- package/dist/templates/frontend/angular-base/src/app/features/user/pages/profile.page.ts +232 -0
- package/dist/templates/frontend/angular-base/src/app/features/user/pages/settings.page.spec.ts +28 -0
- package/dist/templates/frontend/angular-base/src/app/features/user/pages/settings.page.ts +284 -0
- package/dist/templates/frontend/angular-base/src/app/features/user/routes.ts +21 -0
- package/dist/templates/frontend/angular-base/src/app/features/user/services/user.service.ts +74 -0
- package/dist/templates/frontend/angular-base/src/app/layout/footer/footer.component.spec.ts +25 -0
- package/dist/templates/frontend/angular-base/src/app/layout/footer/footer.component.ts +67 -0
- package/dist/templates/frontend/angular-base/src/app/layout/index.ts +3 -0
- package/dist/templates/frontend/angular-base/src/app/layout/main-layout/main-layout.component.spec.ts +23 -0
- package/dist/templates/frontend/angular-base/src/app/layout/main-layout/main-layout.component.ts +30 -0
- package/dist/templates/frontend/angular-base/src/app/layout/navbar/navbar.component.spec.ts +23 -0
- package/dist/templates/frontend/angular-base/src/app/layout/navbar/navbar.component.ts +293 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/badge/badge.component.spec.ts +36 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/badge/badge.component.ts +70 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/button/button.component.spec.ts +44 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/button/button.component.ts +64 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/card/card.component.spec.ts +29 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/card/card.component.ts +60 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/data-table/data-table.component.spec.ts +49 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/data-table/data-table.component.ts +280 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/empty-state/empty-state.component.spec.ts +36 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/empty-state/empty-state.component.ts +56 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/modal/modal.component.spec.ts +32 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/modal/modal.component.ts +131 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/pagination/pagination.component.spec.ts +38 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/pagination/pagination.component.ts +194 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/search-input/search-input.component.spec.ts +37 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/search-input/search-input.component.ts +125 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/skeleton-loader/skeleton-loader.component.spec.ts +30 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/skeleton-loader/skeleton-loader.component.ts +55 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/toggle/toggle.component.spec.ts +49 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/toggle/toggle.component.ts +101 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/user-dropdown/user-dropdown.component.spec.ts +65 -0
- package/dist/templates/frontend/angular-base/src/app/shared/components/user-dropdown/user-dropdown.component.ts +219 -0
- package/dist/templates/frontend/angular-base/src/app/shared/directives/auto-focus.directive.spec.ts +33 -0
- package/dist/templates/frontend/angular-base/src/app/shared/directives/auto-focus.directive.ts +25 -0
- package/dist/templates/frontend/angular-base/src/app/shared/index.ts +18 -0
- package/dist/templates/frontend/angular-base/src/app/shared/pipes/date-format.pipe.spec.ts +29 -0
- package/dist/templates/frontend/angular-base/src/app/shared/pipes/date-format.pipe.ts +39 -0
- package/dist/templates/frontend/angular-base/src/environments/environment.development.ts +4 -0
- package/dist/templates/frontend/angular-base/src/environments/environment.ts +4 -0
- package/dist/templates/frontend/angular-base/src/index.html +44 -0
- package/dist/templates/frontend/angular-base/src/main.server.ts +7 -0
- package/dist/templates/frontend/angular-base/src/main.ts +5 -0
- package/dist/templates/frontend/angular-base/src/server.ts +66 -0
- package/dist/templates/frontend/angular-base/src/styles.css +209 -0
- package/dist/templates/frontend/angular-base/src/test-setup.ts +10 -0
- package/dist/templates/frontend/angular-base/tsconfig.app.json +17 -0
- package/dist/templates/frontend/angular-base/tsconfig.json +41 -0
- package/dist/templates/frontend/angular-base/tsconfig.spec.json +15 -0
- package/dist/templates/frontend/angular-base/vitest.config.ts +25 -0
- package/dist/templates/frontend/react-vite/.cursor/skills/architecture/SKILL.md +26 -0
- package/dist/templates/frontend/react-vite/.cursor/skills/components-shadcn/SKILL.md +23 -0
- package/dist/templates/frontend/react-vite/.cursor/skills/daisyui/SKILL.md +98 -0
- package/dist/templates/frontend/react-vite/.cursor/skills/routing/SKILL.md +32 -0
- package/dist/templates/frontend/react-vite/.cursor/skills/testing/SKILL.md +55 -0
- package/dist/templates/frontend/react-vite/.cursor/skills/tooling-and-scripts/SKILL.md +24 -0
- package/dist/templates/frontend/react-vite/.cursor/skills/ui-and-styling/SKILL.md +32 -0
- package/dist/templates/frontend/react-vite/.cursor/skills/vibe-and-ia/SKILL.md +23 -0
- package/dist/templates/frontend/react-vite/.prettierrc +6 -0
- package/dist/templates/frontend/react-vite/.tanstack/tmp/c28007bb-2319511cf318e28129c8d8eb723db5fd +9 -0
- package/dist/templates/frontend/react-vite/.tanstack/tmp/c28007bb-bcef89e9e4593777e1c15ec4b4f32eea +9 -0
- package/dist/templates/frontend/react-vite/.vscode/extensions.json +7 -0
- package/dist/templates/frontend/react-vite/README.md +75 -0
- package/dist/templates/frontend/react-vite/components.json +22 -0
- package/dist/templates/frontend/react-vite/eslint.config.js +31 -0
- package/dist/templates/frontend/react-vite/index.html +13 -0
- package/dist/templates/frontend/react-vite/package.json +62 -0
- package/dist/templates/frontend/react-vite/pnpm-lock.yaml +4487 -0
- package/dist/templates/frontend/react-vite/pnpm-workspace.yaml +2 -0
- package/dist/templates/frontend/react-vite/src/assets/react.svg +1 -0
- package/dist/templates/frontend/react-vite/src/components/ui/badge.tsx +37 -0
- package/dist/templates/frontend/react-vite/src/components/ui/breadcrumb.tsx +106 -0
- package/dist/templates/frontend/react-vite/src/components/ui/button.tsx +58 -0
- package/dist/templates/frontend/react-vite/src/components/ui/card.tsx +72 -0
- package/dist/templates/frontend/react-vite/src/components/ui/form.tsx +165 -0
- package/dist/templates/frontend/react-vite/src/components/ui/input.tsx +22 -0
- package/dist/templates/frontend/react-vite/src/components/ui/label.tsx +24 -0
- package/dist/templates/frontend/react-vite/src/components/ui/password-input.tsx +41 -0
- package/dist/templates/frontend/react-vite/src/components/ui/separator.tsx +28 -0
- package/dist/templates/frontend/react-vite/src/components/ui/tabs.tsx +62 -0
- package/dist/templates/frontend/react-vite/src/components/ui/textarea.tsx +21 -0
- package/dist/templates/frontend/react-vite/src/index.css +104 -0
- package/dist/templates/frontend/react-vite/src/lib/queryClient.ts +11 -0
- package/dist/templates/frontend/react-vite/src/lib/utils.ts +6 -0
- package/dist/templates/frontend/react-vite/src/main.tsx +33 -0
- package/dist/templates/frontend/react-vite/src/routeTree.gen.ts +77 -0
- package/dist/templates/frontend/react-vite/src/router.tsx +13 -0
- package/dist/templates/frontend/react-vite/src/routes/__root.tsx +82 -0
- package/dist/templates/frontend/react-vite/src/routes/index.tsx +187 -0
- package/dist/templates/frontend/react-vite/src/routes/otra-ruta.tsx +319 -0
- package/dist/templates/frontend/react-vite/src/test/setup.ts +1 -0
- package/dist/templates/frontend/react-vite/tsconfig.app.json +34 -0
- package/dist/templates/frontend/react-vite/tsconfig.json +10 -0
- package/dist/templates/frontend/react-vite/tsconfig.node.json +26 -0
- package/dist/templates/frontend/react-vite/vite.config.ts +22 -0
- package/dist/templates/frontend/react-vite/vitest.config.ts +9 -0
- package/dist/templates/frontend/react-vite-help/.cursor/skills/architecture/SKILL.md +26 -0
- package/dist/templates/frontend/react-vite-help/.cursor/skills/components-shadcn/SKILL.md +23 -0
- package/dist/templates/frontend/react-vite-help/.cursor/skills/daisyui/SKILL.md +98 -0
- package/dist/templates/frontend/react-vite-help/.cursor/skills/routing/SKILL.md +32 -0
- package/dist/templates/frontend/react-vite-help/.cursor/skills/testing/SKILL.md +55 -0
- package/dist/templates/frontend/react-vite-help/.cursor/skills/tooling-and-scripts/SKILL.md +24 -0
- package/dist/templates/frontend/react-vite-help/.cursor/skills/ui-and-styling/SKILL.md +32 -0
- package/dist/templates/frontend/react-vite-help/.cursor/skills/vibe-and-ia/SKILL.md +23 -0
- package/dist/templates/frontend/react-vite-help/.prettierrc +6 -0
- package/dist/templates/frontend/react-vite-help/.tanstack/tmp/c28007bb-2319511cf318e28129c8d8eb723db5fd +9 -0
- package/dist/templates/frontend/react-vite-help/.tanstack/tmp/c28007bb-bcef89e9e4593777e1c15ec4b4f32eea +9 -0
- package/dist/templates/frontend/react-vite-help/.vscode/extensions.json +7 -0
- package/dist/templates/frontend/react-vite-help/README.md +75 -0
- package/dist/templates/frontend/react-vite-help/components.json +22 -0
- package/dist/templates/frontend/react-vite-help/eslint.config.js +31 -0
- package/dist/templates/frontend/react-vite-help/index.html +13 -0
- package/dist/templates/frontend/react-vite-help/package.json +62 -0
- package/dist/templates/frontend/react-vite-help/pnpm-lock.yaml +4487 -0
- package/dist/templates/frontend/react-vite-help/pnpm-workspace.yaml +2 -0
- package/dist/templates/frontend/react-vite-help/src/assets/react.svg +1 -0
- package/dist/templates/frontend/react-vite-help/src/components/documentacion/entorno.tsx +99 -0
- package/dist/templates/frontend/react-vite-help/src/components/documentacion/estructura.tsx +100 -0
- package/dist/templates/frontend/react-vite-help/src/components/documentacion/figma-mcp.tsx +200 -0
- package/dist/templates/frontend/react-vite-help/src/components/documentacion/inicio.tsx +69 -0
- package/dist/templates/frontend/react-vite-help/src/components/documentacion/instalacion.tsx +72 -0
- package/dist/templates/frontend/react-vite-help/src/components/documentacion/personalizacion.tsx +163 -0
- package/dist/templates/frontend/react-vite-help/src/components/documentacion/rutas.tsx +138 -0
- package/dist/templates/frontend/react-vite-help/src/components/documentacion/stack.tsx +401 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/badge.tsx +37 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/breadcrumb.tsx +106 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/button.tsx +58 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/card.tsx +72 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/form.tsx +165 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/input.tsx +22 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/label.tsx +24 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/password-input.tsx +41 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/separator.tsx +28 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/tabs.tsx +62 -0
- package/dist/templates/frontend/react-vite-help/src/components/ui/textarea.tsx +21 -0
- package/dist/templates/frontend/react-vite-help/src/data/proyectos.json +56 -0
- package/dist/templates/frontend/react-vite-help/src/index.css +104 -0
- package/dist/templates/frontend/react-vite-help/src/lib/queryClient.ts +11 -0
- package/dist/templates/frontend/react-vite-help/src/lib/utils.ts +6 -0
- package/dist/templates/frontend/react-vite-help/src/main.tsx +33 -0
- package/dist/templates/frontend/react-vite-help/src/routeTree.gen.ts +241 -0
- package/dist/templates/frontend/react-vite-help/src/router.tsx +13 -0
- package/dist/templates/frontend/react-vite-help/src/routes/__root.tsx +92 -0
- package/dist/templates/frontend/react-vite-help/src/routes/auth/iniciar-sesion.tsx +139 -0
- package/dist/templates/frontend/react-vite-help/src/routes/auth/registro.tsx +205 -0
- package/dist/templates/frontend/react-vite-help/src/routes/contacto.tsx +60 -0
- package/dist/templates/frontend/react-vite-help/src/routes/dashbord.tsx +9 -0
- package/dist/templates/frontend/react-vite-help/src/routes/documentacion.tsx +80 -0
- package/dist/templates/frontend/react-vite-help/src/routes/index.test.tsx +42 -0
- package/dist/templates/frontend/react-vite-help/src/routes/index.tsx +211 -0
- package/dist/templates/frontend/react-vite-help/src/routes/perfil.tsx +9 -0
- package/dist/templates/frontend/react-vite-help/src/routes/proyectos.$proyectoId.tsx +156 -0
- package/dist/templates/frontend/react-vite-help/src/routes/proyectos.tsx +93 -0
- package/dist/templates/frontend/react-vite-help/src/test/setup.ts +1 -0
- package/dist/templates/frontend/react-vite-help/tsconfig.app.json +34 -0
- package/dist/templates/frontend/react-vite-help/tsconfig.json +10 -0
- package/dist/templates/frontend/react-vite-help/tsconfig.node.json +26 -0
- package/dist/templates/frontend/react-vite-help/vite.config.ts +22 -0
- package/dist/templates/frontend/react-vite-help/vitest.config.ts +9 -0
- package/dist/templates/mobile/.gitkeep +1 -0
- package/dist/templates/mobile/expo-base/.cursor/rules/general-rules.mdc +231 -0
- package/dist/templates/mobile/expo-base/.cursor/rules/react-native-rules.mdc +1348 -0
- package/dist/templates/mobile/expo-base/.env +1 -0
- package/dist/templates/mobile/expo-base/.husky/commit-msg +4 -0
- package/dist/templates/mobile/expo-base/.husky/pre-commit +1 -0
- package/dist/templates/mobile/expo-base/.lintstagedrc.js +25 -0
- package/dist/templates/mobile/expo-base/.prettierignore +10 -0
- package/dist/templates/mobile/expo-base/.prettierrc +11 -0
- package/dist/templates/mobile/expo-base/.vscode/extensions.json +1 -0
- package/dist/templates/mobile/expo-base/.vscode/settings.json +7 -0
- package/dist/templates/mobile/expo-base/CHANGELOG.md +155 -0
- package/dist/templates/mobile/expo-base/IMPLEMENTATION_SUMMARY.md +413 -0
- package/dist/templates/mobile/expo-base/README.md +510 -0
- package/dist/templates/mobile/expo-base/SETUP_NOTES.md +233 -0
- package/dist/templates/mobile/expo-base/TEMPLATE_USAGE.md +623 -0
- package/dist/templates/mobile/expo-base/WARP.md +123 -0
- package/dist/templates/mobile/expo-base/app/(public)/_layout.tsx +21 -0
- package/dist/templates/mobile/expo-base/app/(public)/forgot-password.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/(public)/login.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/(public)/register.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/(tabs)/_layout.tsx +60 -0
- package/dist/templates/mobile/expo-base/app/(tabs)/explore.tsx +235 -0
- package/dist/templates/mobile/expo-base/app/(tabs)/index.tsx +290 -0
- package/dist/templates/mobile/expo-base/app/(tabs)/profile.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/_layout.tsx +143 -0
- package/dist/templates/mobile/expo-base/app/modal.tsx +29 -0
- package/dist/templates/mobile/expo-base/app/onboarding.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/profile/_layout.tsx +44 -0
- package/dist/templates/mobile/expo-base/app/profile/change-password.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/profile/edit.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/settings/_layout.tsx +62 -0
- package/dist/templates/mobile/expo-base/app/settings/about.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/settings/index.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/settings/language.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/settings/notifications.tsx +3 -0
- package/dist/templates/mobile/expo-base/app/settings/theme.tsx +3 -0
- package/dist/templates/mobile/expo-base/app.json +31 -0
- package/dist/templates/mobile/expo-base/commitlint.config.js +50 -0
- package/dist/templates/mobile/expo-base/docs/ARCHITECTURE.md +565 -0
- package/dist/templates/mobile/expo-base/docs/CI_CD.md +461 -0
- package/dist/templates/mobile/expo-base/docs/COMPONENTS.md +1103 -0
- package/dist/templates/mobile/expo-base/docs/CONTRIBUTING.md +733 -0
- package/dist/templates/mobile/expo-base/docs/DESIGN_TOKENS.md +832 -0
- package/dist/templates/mobile/expo-base/docs/GIT_CONVENTIONS.md +411 -0
- package/dist/templates/mobile/expo-base/docs/I18N.md +701 -0
- package/dist/templates/mobile/expo-base/docs/TESTING.md +565 -0
- package/dist/templates/mobile/expo-base/docs/THEMING.md +753 -0
- package/dist/templates/mobile/expo-base/docs/VERSIONING.md +518 -0
- package/dist/templates/mobile/expo-base/eslint.config.js +180 -0
- package/dist/templates/mobile/expo-base/jest.config.js +51 -0
- package/dist/templates/mobile/expo-base/jest.setup.js +106 -0
- package/dist/templates/mobile/expo-base/package.json +74 -0
- package/dist/templates/mobile/expo-base/pnpm-lock.yaml +11354 -0
- package/dist/templates/mobile/expo-base/pnpm-workspace.yaml +4 -0
- package/dist/templates/mobile/expo-base/src/__tests__/helpers/test-utils.tsx +77 -0
- package/dist/templates/mobile/expo-base/src/__tests__/mocks/api.ts +65 -0
- package/dist/templates/mobile/expo-base/src/__tests__/mocks/i18n.ts +22 -0
- package/dist/templates/mobile/expo-base/src/__tests__/mocks/index.ts +7 -0
- package/dist/templates/mobile/expo-base/src/__tests__/mocks/navigation.ts +47 -0
- package/dist/templates/mobile/expo-base/src/__tests__/mocks/theme.ts +46 -0
- package/dist/templates/mobile/expo-base/src/assets/images/android-icon-background.png +0 -0
- package/dist/templates/mobile/expo-base/src/assets/images/android-icon-foreground.png +0 -0
- package/dist/templates/mobile/expo-base/src/assets/images/android-icon-monochrome.png +0 -0
- package/dist/templates/mobile/expo-base/src/assets/images/favicon.png +0 -0
- package/dist/templates/mobile/expo-base/src/assets/images/icon.png +0 -0
- package/dist/templates/mobile/expo-base/src/assets/images/partial-react-logo.png +0 -0
- package/dist/templates/mobile/expo-base/src/assets/images/react-logo.png +0 -0
- package/dist/templates/mobile/expo-base/src/assets/images/react-logo@2x.png +0 -0
- package/dist/templates/mobile/expo-base/src/assets/images/react-logo@3x.png +0 -0
- package/dist/templates/mobile/expo-base/src/assets/images/splash-icon.png +0 -0
- package/dist/templates/mobile/expo-base/src/components/external-link.tsx +25 -0
- package/dist/templates/mobile/expo-base/src/components/feedback/empty-state.tsx +150 -0
- package/dist/templates/mobile/expo-base/src/components/feedback/error-boundary.tsx +145 -0
- package/dist/templates/mobile/expo-base/src/components/feedback/error-screen.tsx +121 -0
- package/dist/templates/mobile/expo-base/src/components/feedback/index.ts +11 -0
- package/dist/templates/mobile/expo-base/src/components/feedback/loading.tsx +155 -0
- package/dist/templates/mobile/expo-base/src/components/haptic-tab.tsx +18 -0
- package/dist/templates/mobile/expo-base/src/components/hello-wave.tsx +19 -0
- package/dist/templates/mobile/expo-base/src/components/layout/column.tsx +49 -0
- package/dist/templates/mobile/expo-base/src/components/layout/container.tsx +41 -0
- package/dist/templates/mobile/expo-base/src/components/layout/index.ts +14 -0
- package/dist/templates/mobile/expo-base/src/components/layout/row.tsx +52 -0
- package/dist/templates/mobile/expo-base/src/components/layout/screen.tsx +110 -0
- package/dist/templates/mobile/expo-base/src/components/layout/section.tsx +37 -0
- package/dist/templates/mobile/expo-base/src/components/parallax-scroll-view.tsx +79 -0
- package/dist/templates/mobile/expo-base/src/components/themed-text.tsx +60 -0
- package/dist/templates/mobile/expo-base/src/components/themed-view.tsx +14 -0
- package/dist/templates/mobile/expo-base/src/components/ui/__tests__/button.test.tsx +206 -0
- package/dist/templates/mobile/expo-base/src/components/ui/avatar.tsx +141 -0
- package/dist/templates/mobile/expo-base/src/components/ui/badge.tsx +175 -0
- package/dist/templates/mobile/expo-base/src/components/ui/button.tsx +247 -0
- package/dist/templates/mobile/expo-base/src/components/ui/card.tsx +127 -0
- package/dist/templates/mobile/expo-base/src/components/ui/collapsible.tsx +45 -0
- package/dist/templates/mobile/expo-base/src/components/ui/divider.tsx +50 -0
- package/dist/templates/mobile/expo-base/src/components/ui/icon-symbol.ios.tsx +32 -0
- package/dist/templates/mobile/expo-base/src/components/ui/icon-symbol.tsx +41 -0
- package/dist/templates/mobile/expo-base/src/components/ui/icon.tsx +137 -0
- package/dist/templates/mobile/expo-base/src/components/ui/index.ts +20 -0
- package/dist/templates/mobile/expo-base/src/components/ui/input.tsx +242 -0
- package/dist/templates/mobile/expo-base/src/constants/theme.ts +53 -0
- package/dist/templates/mobile/expo-base/src/contexts/auth-context.tsx +246 -0
- package/dist/templates/mobile/expo-base/src/contexts/index.ts +8 -0
- package/dist/templates/mobile/expo-base/src/contexts/query-client.tsx +43 -0
- package/dist/templates/mobile/expo-base/src/contexts/theme-context.tsx +111 -0
- package/dist/templates/mobile/expo-base/src/features/auth/forgot-password-screen.tsx +164 -0
- package/dist/templates/mobile/expo-base/src/features/auth/index.ts +7 -0
- package/dist/templates/mobile/expo-base/src/features/auth/login-screen.tsx +177 -0
- package/dist/templates/mobile/expo-base/src/features/auth/register-screen.tsx +220 -0
- package/dist/templates/mobile/expo-base/src/features/onboarding/README.md +190 -0
- package/dist/templates/mobile/expo-base/src/features/onboarding/index.ts +7 -0
- package/dist/templates/mobile/expo-base/src/features/onboarding/onboarding-debug.tsx +120 -0
- package/dist/templates/mobile/expo-base/src/features/onboarding/onboarding-screen.tsx +242 -0
- package/dist/templates/mobile/expo-base/src/features/onboarding/onboarding-utils.ts +49 -0
- package/dist/templates/mobile/expo-base/src/features/profile/change-password-screen.tsx +154 -0
- package/dist/templates/mobile/expo-base/src/features/profile/edit-profile-screen.tsx +183 -0
- package/dist/templates/mobile/expo-base/src/features/profile/index.ts +7 -0
- package/dist/templates/mobile/expo-base/src/features/profile/profile-screen.tsx +177 -0
- package/dist/templates/mobile/expo-base/src/features/settings/about-screen.tsx +167 -0
- package/dist/templates/mobile/expo-base/src/features/settings/index.ts +9 -0
- package/dist/templates/mobile/expo-base/src/features/settings/language-settings-screen.tsx +97 -0
- package/dist/templates/mobile/expo-base/src/features/settings/notifications-settings-screen.tsx +128 -0
- package/dist/templates/mobile/expo-base/src/features/settings/settings-screen.tsx +141 -0
- package/dist/templates/mobile/expo-base/src/features/settings/theme-settings-screen.tsx +149 -0
- package/dist/templates/mobile/expo-base/src/hooks/__tests__/use-theme.test.ts +151 -0
- package/dist/templates/mobile/expo-base/src/hooks/index.ts +13 -0
- package/dist/templates/mobile/expo-base/src/hooks/use-api.ts +206 -0
- package/dist/templates/mobile/expo-base/src/hooks/use-auth.ts +7 -0
- package/dist/templates/mobile/expo-base/src/hooks/use-color-scheme.ts +19 -0
- package/dist/templates/mobile/expo-base/src/hooks/use-color-scheme.web.ts +31 -0
- package/dist/templates/mobile/expo-base/src/hooks/use-theme-color.ts +21 -0
- package/dist/templates/mobile/expo-base/src/hooks/use-theme.ts +60 -0
- package/dist/templates/mobile/expo-base/src/hooks/use-translation.ts +48 -0
- package/dist/templates/mobile/expo-base/src/i18n/index.ts +113 -0
- package/dist/templates/mobile/expo-base/src/i18n/locales/en-US.json +134 -0
- package/dist/templates/mobile/expo-base/src/i18n/locales/es-AR.json +134 -0
- package/dist/templates/mobile/expo-base/src/scripts/reset-project.js +112 -0
- package/dist/templates/mobile/expo-base/src/services/api/client.ts +190 -0
- package/dist/templates/mobile/expo-base/src/services/api/endpoints.ts +45 -0
- package/dist/templates/mobile/expo-base/src/services/api/index.ts +7 -0
- package/dist/templates/mobile/expo-base/src/services/storage/secure-storage.ts +56 -0
- package/dist/templates/mobile/expo-base/src/theme/colors.ts +147 -0
- package/dist/templates/mobile/expo-base/src/theme/index.ts +40 -0
- package/dist/templates/mobile/expo-base/src/theme/semantic-colors.ts +221 -0
- package/dist/templates/mobile/expo-base/src/theme/shadows.ts +123 -0
- package/dist/templates/mobile/expo-base/src/theme/spacing.ts +118 -0
- package/dist/templates/mobile/expo-base/src/theme/theme-config.ts +111 -0
- package/dist/templates/mobile/expo-base/src/theme/tokens.ts +218 -0
- package/dist/templates/mobile/expo-base/src/theme/typography.ts +152 -0
- package/dist/templates/mobile/expo-base/src/types/index.ts +6 -0
- package/dist/templates/mobile/expo-base/src/types/models.ts +153 -0
- package/dist/templates/mobile/expo-base/src/types/navigation.ts +67 -0
- package/dist/templates/mobile/expo-base/src/utils/__tests__/validators.test.ts +312 -0
- package/dist/templates/mobile/expo-base/src/utils/constants.ts +167 -0
- package/dist/templates/mobile/expo-base/src/utils/formatters.ts +222 -0
- package/dist/templates/mobile/expo-base/src/utils/index.ts +7 -0
- package/dist/templates/mobile/expo-base/src/utils/validators.ts +187 -0
- package/dist/templates/mobile/expo-base/tsconfig.json +26 -0
- package/dist/test-cli.js +40 -0
- package/dist/types/index.js +1 -0
- package/package.json +25 -0
- package/templates/backend/.gitkeep +1 -0
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-endpoint.md +209 -0
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-model.md +201 -0
- package/templates/backend/nestjs-api-postgres/.cursor/rules/api-rest.mdc +126 -0
- package/templates/backend/nestjs-api-postgres/.cursor/rules/authentication-security.mdc +86 -0
- package/templates/backend/nestjs-api-postgres/.cursor/rules/dto-validation.mdc +93 -0
- package/templates/backend/nestjs-api-postgres/.cursor/rules/general-rules.mdc +126 -0
- package/templates/backend/nestjs-api-postgres/.cursor/rules/nestjs-architecture.mdc +83 -0
- package/templates/backend/nestjs-api-postgres/.cursor/rules/prisma-standards.mdc +90 -0
- package/templates/backend/nestjs-api-postgres/.cursor/rules/swagger-documentation.mdc +90 -0
- package/templates/backend/nestjs-api-postgres/.cursor/skills/api-security-best-practices/SKILL.md +907 -0
- package/templates/backend/nestjs-api-postgres/.cursor/skills/docker-expert/SKILL.md +409 -0
- package/templates/backend/nestjs-api-postgres/.cursor/skills/nestjs-expert/SKILL.md +552 -0
- package/templates/backend/nestjs-api-postgres/.cursor/skills/nestjs-the-best-practices/AGENTS.md +5958 -0
- package/templates/backend/nestjs-api-postgres/.cursor/skills/nestjs-the-best-practices/SKILL.md +130 -0
- package/templates/backend/nestjs-api-postgres/.cursor/skills/nodejs-best-practices/SKILL.md +333 -0
- package/templates/backend/nestjs-api-postgres/.cursor/skills/postgresql-table-design/SKILL.md +202 -0
- package/templates/backend/nestjs-api-postgres/.cursor/skills/prisma-expert/SKILL.md +355 -0
- package/templates/backend/nestjs-api-postgres/.dockerignore +50 -0
- package/templates/backend/nestjs-api-postgres/.env.example +18 -0
- package/templates/backend/nestjs-api-postgres/.env.test +18 -0
- package/templates/backend/nestjs-api-postgres/.prettierrc +4 -0
- package/templates/backend/nestjs-api-postgres/README.md +1502 -0
- package/templates/backend/nestjs-api-postgres/docker-compose.yml +24 -0
- package/templates/backend/nestjs-api-postgres/eslint.config.mjs +41 -0
- package/templates/backend/nestjs-api-postgres/nest-cli.json +8 -0
- package/templates/backend/nestjs-api-postgres/package.json +107 -0
- package/templates/backend/nestjs-api-postgres/prisma/migrations/20260126125423_init/migration.sql +84 -0
- package/templates/backend/nestjs-api-postgres/prisma/migrations/migration_lock.toml +3 -0
- package/templates/backend/nestjs-api-postgres/prisma/schema.prisma +76 -0
- package/templates/backend/nestjs-api-postgres/prisma/seed.ts +220 -0
- package/templates/backend/nestjs-api-postgres/prisma.config.ts +10 -0
- package/templates/backend/nestjs-api-postgres/src/app.module.ts +39 -0
- package/templates/backend/nestjs-api-postgres/src/app.service.ts +8 -0
- package/templates/backend/nestjs-api-postgres/src/auth/auth.controller.ts +36 -0
- package/templates/backend/nestjs-api-postgres/src/auth/auth.module.ts +22 -0
- package/templates/backend/nestjs-api-postgres/src/auth/auth.service.ts +63 -0
- package/templates/backend/nestjs-api-postgres/src/auth/decorators/roles.decorator.ts +5 -0
- package/templates/backend/nestjs-api-postgres/src/auth/dto/login-response.dto.ts +23 -0
- package/templates/backend/nestjs-api-postgres/src/auth/dto/login.dto.ts +27 -0
- package/templates/backend/nestjs-api-postgres/src/auth/guards/jwt-auth.guard.ts +20 -0
- package/templates/backend/nestjs-api-postgres/src/auth/guards/roles.guard.ts +23 -0
- package/templates/backend/nestjs-api-postgres/src/auth/strategies/jwt.strategy.ts +32 -0
- package/templates/backend/nestjs-api-postgres/src/auth/types.ts +18 -0
- package/templates/backend/nestjs-api-postgres/src/common/dto/paginated-response.dto.ts +16 -0
- package/templates/backend/nestjs-api-postgres/src/common/dto/pagination.dto.ts +31 -0
- package/templates/backend/nestjs-api-postgres/src/common/filters/http-exception.filter.ts +53 -0
- package/templates/backend/nestjs-api-postgres/src/config/env.validation.ts +41 -0
- package/templates/backend/nestjs-api-postgres/src/health/health.controller.ts +35 -0
- package/templates/backend/nestjs-api-postgres/src/health/health.module.ts +7 -0
- package/templates/backend/nestjs-api-postgres/src/main.ts +87 -0
- package/templates/backend/nestjs-api-postgres/src/posts/dto/create-post.dto.ts +32 -0
- package/templates/backend/nestjs-api-postgres/src/posts/dto/post-response.dto.ts +41 -0
- package/templates/backend/nestjs-api-postgres/src/posts/dto/update-post.dto.ts +31 -0
- package/templates/backend/nestjs-api-postgres/src/posts/posts.controller.ts +161 -0
- package/templates/backend/nestjs-api-postgres/src/posts/posts.module.ts +12 -0
- package/templates/backend/nestjs-api-postgres/src/posts/posts.service.ts +171 -0
- package/templates/backend/nestjs-api-postgres/src/prisma/prisma.module.ts +9 -0
- package/templates/backend/nestjs-api-postgres/src/prisma/prisma.service.ts +27 -0
- package/templates/backend/nestjs-api-postgres/src/users/constants/settings.constants.ts +9 -0
- package/templates/backend/nestjs-api-postgres/src/users/dto/profile-response.dto.ts +39 -0
- package/templates/backend/nestjs-api-postgres/src/users/dto/settings-response.dto.ts +18 -0
- package/templates/backend/nestjs-api-postgres/src/users/dto/update-profile.dto.ts +48 -0
- package/templates/backend/nestjs-api-postgres/src/users/dto/update-settings.dto.ts +40 -0
- package/templates/backend/nestjs-api-postgres/src/users/dto/user-response.dto.ts +18 -0
- package/templates/backend/nestjs-api-postgres/src/users/profile.service.ts +49 -0
- package/templates/backend/nestjs-api-postgres/src/users/settings.service.ts +82 -0
- package/templates/backend/nestjs-api-postgres/src/users/users.controller.ts +102 -0
- package/templates/backend/nestjs-api-postgres/src/users/users.module.ts +14 -0
- package/templates/backend/nestjs-api-postgres/src/users/users.service.ts +27 -0
- package/templates/backend/nestjs-api-postgres/test/README.md +412 -0
- package/templates/backend/nestjs-api-postgres/test/e2e/auth.e2e-spec.ts +147 -0
- package/templates/backend/nestjs-api-postgres/test/e2e/health.e2e-spec.ts +62 -0
- package/templates/backend/nestjs-api-postgres/test/e2e/posts.e2e-spec.ts +407 -0
- package/templates/backend/nestjs-api-postgres/test/e2e/users.e2e-spec.ts +287 -0
- package/templates/backend/nestjs-api-postgres/test/fixtures/test-data.ts +109 -0
- package/templates/backend/nestjs-api-postgres/test/helpers/auth.helper.ts +54 -0
- package/templates/backend/nestjs-api-postgres/test/helpers/db.helper.ts +73 -0
- package/templates/backend/nestjs-api-postgres/test/jest-e2e.json +12 -0
- package/templates/backend/nestjs-api-postgres/test/setup-e2e.ts +8 -0
- package/templates/backend/nestjs-api-postgres/test/unit/app.service.spec.ts +24 -0
- package/templates/backend/nestjs-api-postgres/test/unit/auth.controller.spec.ts +91 -0
- package/templates/backend/nestjs-api-postgres/test/unit/auth.service.spec.ts +161 -0
- package/templates/backend/nestjs-api-postgres/test/unit/health.controller.spec.ts +78 -0
- package/templates/backend/nestjs-api-postgres/test/unit/http-exception.filter.spec.ts +150 -0
- package/templates/backend/nestjs-api-postgres/test/unit/jwt-auth.guard.spec.ts +50 -0
- package/templates/backend/nestjs-api-postgres/test/unit/jwt.strategy.spec.ts +41 -0
- package/templates/backend/nestjs-api-postgres/test/unit/posts.controller.spec.ts +249 -0
- package/templates/backend/nestjs-api-postgres/test/unit/posts.service.spec.ts +328 -0
- package/templates/backend/nestjs-api-postgres/test/unit/profile.service.spec.ts +146 -0
- package/templates/backend/nestjs-api-postgres/test/unit/settings.service.spec.ts +242 -0
- package/templates/backend/nestjs-api-postgres/test/unit/users.controller.spec.ts +178 -0
- package/templates/backend/nestjs-api-postgres/test/unit/users.service.spec.ts +96 -0
- package/templates/backend/nestjs-api-postgres/tsconfig.build.json +4 -0
- package/templates/backend/nestjs-api-postgres/tsconfig.json +28 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-endpoint.md +209 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-model.md +201 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/rules/api-rest.mdc +126 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/rules/authentication-security.mdc +86 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/rules/dto-validation.mdc +93 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/rules/general-rules.mdc +126 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/rules/nestjs-architecture.mdc +83 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/rules/prisma-standards.mdc +90 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/rules/swagger-documentation.mdc +90 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/skills/api-security-best-practices/SKILL.md +907 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/skills/nestjs-expert/SKILL.md +552 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/skills/nestjs-the-best-practices/AGENTS.md +5958 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/skills/nestjs-the-best-practices/SKILL.md +130 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/skills/nodejs-best-practices/SKILL.md +333 -0
- package/templates/backend/nestjs-api-sqlite/.cursor/skills/prisma-expert/SKILL.md +355 -0
- package/templates/backend/nestjs-api-sqlite/.env.example +4 -0
- package/templates/backend/nestjs-api-sqlite/.env.test +4 -0
- package/templates/backend/nestjs-api-sqlite/.prettierrc +4 -0
- package/templates/backend/nestjs-api-sqlite/README.md +1464 -0
- package/templates/backend/nestjs-api-sqlite/eslint.config.mjs +41 -0
- package/templates/backend/nestjs-api-sqlite/nest-cli.json +8 -0
- package/templates/backend/nestjs-api-sqlite/package.json +105 -0
- package/templates/backend/nestjs-api-sqlite/pnpm-lock.yaml +7630 -0
- package/templates/backend/nestjs-api-sqlite/prisma/migrations/20260123190258_init/migration.sql +12 -0
- package/templates/backend/nestjs-api-sqlite/prisma/migrations/20260123205000_add_roles_and_posts/migration.sql +32 -0
- package/templates/backend/nestjs-api-sqlite/prisma/migrations/20260124163749_init_with_profile_and_settings/migration.sql +33 -0
- package/templates/backend/nestjs-api-sqlite/prisma/migrations/20260124190929_add_render_model/migration.sql +13 -0
- package/templates/backend/nestjs-api-sqlite/prisma/migrations/20260124200534_add_post_indexes/migration.sql +16 -0
- package/templates/backend/nestjs-api-sqlite/prisma/migrations/migration_lock.toml +3 -0
- package/templates/backend/nestjs-api-sqlite/prisma/schema.prisma +76 -0
- package/templates/backend/nestjs-api-sqlite/prisma/seed.ts +218 -0
- package/templates/backend/nestjs-api-sqlite/prisma.config.ts +10 -0
- package/templates/backend/nestjs-api-sqlite/src/app.module.ts +39 -0
- package/templates/backend/nestjs-api-sqlite/src/app.service.ts +8 -0
- package/templates/backend/nestjs-api-sqlite/src/auth/auth.controller.ts +36 -0
- package/templates/backend/nestjs-api-sqlite/src/auth/auth.module.ts +22 -0
- package/templates/backend/nestjs-api-sqlite/src/auth/auth.service.ts +63 -0
- package/templates/backend/nestjs-api-sqlite/src/auth/decorators/roles.decorator.ts +5 -0
- package/templates/backend/nestjs-api-sqlite/src/auth/dto/login-response.dto.ts +23 -0
- package/templates/backend/nestjs-api-sqlite/src/auth/dto/login.dto.ts +27 -0
- package/templates/backend/nestjs-api-sqlite/src/auth/guards/jwt-auth.guard.ts +20 -0
- package/templates/backend/nestjs-api-sqlite/src/auth/guards/roles.guard.ts +23 -0
- package/templates/backend/nestjs-api-sqlite/src/auth/strategies/jwt.strategy.ts +32 -0
- package/templates/backend/nestjs-api-sqlite/src/auth/types.ts +18 -0
- package/templates/backend/nestjs-api-sqlite/src/common/dto/paginated-response.dto.ts +16 -0
- package/templates/backend/nestjs-api-sqlite/src/common/dto/pagination.dto.ts +31 -0
- package/templates/backend/nestjs-api-sqlite/src/common/filters/http-exception.filter.ts +53 -0
- package/templates/backend/nestjs-api-sqlite/src/config/env.validation.ts +35 -0
- package/templates/backend/nestjs-api-sqlite/src/health/health.controller.ts +35 -0
- package/templates/backend/nestjs-api-sqlite/src/health/health.module.ts +7 -0
- package/templates/backend/nestjs-api-sqlite/src/main.ts +87 -0
- package/templates/backend/nestjs-api-sqlite/src/posts/dto/create-post.dto.ts +32 -0
- package/templates/backend/nestjs-api-sqlite/src/posts/dto/post-response.dto.ts +41 -0
- package/templates/backend/nestjs-api-sqlite/src/posts/dto/update-post.dto.ts +31 -0
- package/templates/backend/nestjs-api-sqlite/src/posts/posts.controller.ts +161 -0
- package/templates/backend/nestjs-api-sqlite/src/posts/posts.module.ts +12 -0
- package/templates/backend/nestjs-api-sqlite/src/posts/posts.service.ts +171 -0
- package/templates/backend/nestjs-api-sqlite/src/prisma/prisma.module.ts +9 -0
- package/templates/backend/nestjs-api-sqlite/src/prisma/prisma.service.ts +29 -0
- package/templates/backend/nestjs-api-sqlite/src/users/constants/settings.constants.ts +9 -0
- package/templates/backend/nestjs-api-sqlite/src/users/dto/profile-response.dto.ts +39 -0
- package/templates/backend/nestjs-api-sqlite/src/users/dto/settings-response.dto.ts +18 -0
- package/templates/backend/nestjs-api-sqlite/src/users/dto/update-profile.dto.ts +48 -0
- package/templates/backend/nestjs-api-sqlite/src/users/dto/update-settings.dto.ts +40 -0
- package/templates/backend/nestjs-api-sqlite/src/users/dto/user-response.dto.ts +18 -0
- package/templates/backend/nestjs-api-sqlite/src/users/profile.service.ts +49 -0
- package/templates/backend/nestjs-api-sqlite/src/users/settings.service.ts +82 -0
- package/templates/backend/nestjs-api-sqlite/src/users/users.controller.ts +102 -0
- package/templates/backend/nestjs-api-sqlite/src/users/users.module.ts +14 -0
- package/templates/backend/nestjs-api-sqlite/src/users/users.service.ts +27 -0
- package/templates/backend/nestjs-api-sqlite/test/README.md +412 -0
- package/templates/backend/nestjs-api-sqlite/test/e2e/auth.e2e-spec.ts +147 -0
- package/templates/backend/nestjs-api-sqlite/test/e2e/health.e2e-spec.ts +62 -0
- package/templates/backend/nestjs-api-sqlite/test/e2e/posts.e2e-spec.ts +407 -0
- package/templates/backend/nestjs-api-sqlite/test/e2e/users.e2e-spec.ts +287 -0
- package/templates/backend/nestjs-api-sqlite/test/fixtures/test-data.ts +109 -0
- package/templates/backend/nestjs-api-sqlite/test/helpers/auth.helper.ts +54 -0
- package/templates/backend/nestjs-api-sqlite/test/helpers/db.helper.ts +72 -0
- package/templates/backend/nestjs-api-sqlite/test/jest-e2e.json +12 -0
- package/templates/backend/nestjs-api-sqlite/test/setup-e2e.ts +8 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/app.service.spec.ts +24 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/auth.controller.spec.ts +91 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/auth.service.spec.ts +161 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/health.controller.spec.ts +78 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/http-exception.filter.spec.ts +150 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/jwt-auth.guard.spec.ts +50 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/jwt.strategy.spec.ts +41 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/posts.controller.spec.ts +249 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/posts.service.spec.ts +328 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/profile.service.spec.ts +146 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/settings.service.spec.ts +242 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/users.controller.spec.ts +178 -0
- package/templates/backend/nestjs-api-sqlite/test/unit/users.service.spec.ts +96 -0
- package/templates/backend/nestjs-api-sqlite/tsconfig.build.json +4 -0
- package/templates/backend/nestjs-api-sqlite/tsconfig.json +28 -0
- package/templates/frontend/angular-base/.agents/skills/angular-component/SKILL.md +288 -0
- package/templates/frontend/angular-base/.agents/skills/angular-component/references/component-patterns.md +358 -0
- package/templates/frontend/angular-base/.agents/skills/angular-di/SKILL.md +387 -0
- package/templates/frontend/angular-base/.agents/skills/angular-di/references/di-patterns.md +519 -0
- package/templates/frontend/angular-base/.agents/skills/angular-directives/SKILL.md +437 -0
- package/templates/frontend/angular-base/.agents/skills/angular-directives/references/directive-patterns.md +570 -0
- package/templates/frontend/angular-base/.agents/skills/angular-forms/SKILL.md +434 -0
- package/templates/frontend/angular-base/.agents/skills/angular-forms/references/form-patterns.md +398 -0
- package/templates/frontend/angular-base/.agents/skills/angular-http/SKILL.md +366 -0
- package/templates/frontend/angular-base/.agents/skills/angular-http/references/http-patterns.md +448 -0
- package/templates/frontend/angular-base/.agents/skills/angular-routing/SKILL.md +395 -0
- package/templates/frontend/angular-base/.agents/skills/angular-routing/references/routing-patterns.md +472 -0
- package/templates/frontend/angular-base/.agents/skills/angular-signals/SKILL.md +302 -0
- package/templates/frontend/angular-base/.agents/skills/angular-signals/references/signal-patterns.md +404 -0
- package/templates/frontend/angular-base/.agents/skills/angular-ssr/SKILL.md +435 -0
- package/templates/frontend/angular-base/.agents/skills/angular-ssr/references/ssr-patterns.md +497 -0
- package/templates/frontend/angular-base/.agents/skills/angular-testing/SKILL.md +660 -0
- package/templates/frontend/angular-base/.agents/skills/angular-testing/references/testing-patterns.md +707 -0
- package/templates/frontend/angular-base/.agents/skills/angular-tooling/SKILL.md +352 -0
- package/templates/frontend/angular-base/.agents/skills/angular-tooling/references/tooling-patterns.md +448 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-accessibility/SKILL.md +780 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-advanced-components/SKILL.md +718 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-advanced-design-systems/SKILL.md +612 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-advanced-layouts/SKILL.md +594 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-animations/SKILL.md +432 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-animations/references/animation-patterns.md +427 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-debugging/SKILL.md +354 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-debugging/references/troubleshooting-guide.md +306 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-framework-integration/SKILL.md +578 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-framework-integration/references/react-patterns.md +353 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-fundamentals-v4/SKILL.md +608 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-fundamentals-v4/references/advanced-theme-patterns.md +215 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-fundamentals-v4/references/custom-utilities-guide.md +281 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-mobile-first/SKILL.md +768 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-performance/SKILL.md +374 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-performance/references/bundle-optimization.md +244 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-plugins/SKILL.md +505 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-responsive-darkmode/SKILL.md +601 -0
- package/templates/frontend/angular-base/.agents/skills/tailwindcss-responsive-darkmode/references/advanced-responsive-patterns.md +485 -0
- package/templates/frontend/angular-base/.agents/skills/web-design-guidelines/SKILL.md +39 -0
- package/templates/frontend/angular-base/.cursor/mcp.json +12 -0
- package/templates/frontend/angular-base/.cursor/rules/angular-expert.mdc +153 -0
- package/templates/frontend/angular-base/.editorconfig +17 -0
- package/templates/frontend/angular-base/.eslintrc.json +52 -0
- package/templates/frontend/angular-base/.github/workflows/ci.yml +122 -0
- package/templates/frontend/angular-base/.husky/pre-commit +1 -0
- package/templates/frontend/angular-base/.husky/pre-push +1 -0
- package/templates/frontend/angular-base/.postcssrc.json +5 -0
- package/templates/frontend/angular-base/.prettierignore +8 -0
- package/templates/frontend/angular-base/.prettierrc.json +15 -0
- package/templates/frontend/angular-base/.vscode/extensions.json +4 -0
- package/templates/frontend/angular-base/.vscode/launch.json +20 -0
- package/templates/frontend/angular-base/.vscode/mcp.json +9 -0
- package/templates/frontend/angular-base/.vscode/tasks.json +42 -0
- package/templates/frontend/angular-base/CONTRIBUTING.md +230 -0
- package/templates/frontend/angular-base/README.md +383 -0
- package/templates/frontend/angular-base/angular.json +84 -0
- package/templates/frontend/angular-base/cypress/e2e/app.cy.ts +39 -0
- package/templates/frontend/angular-base/cypress/e2e/auth.cy.ts +196 -0
- package/templates/frontend/angular-base/cypress/e2e/dashboard.cy.ts +56 -0
- package/templates/frontend/angular-base/cypress/e2e/home.cy.ts +35 -0
- package/templates/frontend/angular-base/cypress/fixtures/example.json +4 -0
- package/templates/frontend/angular-base/cypress/support/commands.ts +8 -0
- package/templates/frontend/angular-base/cypress/support/e2e.ts +11 -0
- package/templates/frontend/angular-base/cypress.config.ts +11 -0
- package/templates/frontend/angular-base/docs/ARCHITECTURE.md +337 -0
- package/templates/frontend/angular-base/docs/AUTHENTICATION.md +491 -0
- package/templates/frontend/angular-base/docs/DEPLOYMENT.md +507 -0
- package/templates/frontend/angular-base/docs/FEATURES.md +404 -0
- package/templates/frontend/angular-base/docs/TESTING.md +418 -0
- package/templates/frontend/angular-base/docs/THEMING.md +333 -0
- package/templates/frontend/angular-base/docs/UI_LIBRARIES.md +380 -0
- package/templates/frontend/angular-base/docs/USER_PROFILE_FLOW.md +431 -0
- package/templates/frontend/angular-base/package-lock.json +13321 -0
- package/templates/frontend/angular-base/package.json +93 -0
- package/templates/frontend/angular-base/public/favicon.ico +0 -0
- package/templates/frontend/angular-base/src/app/app.config.server.ts +14 -0
- package/templates/frontend/angular-base/src/app/app.config.ts +32 -0
- package/templates/frontend/angular-base/src/app/app.css +0 -0
- package/templates/frontend/angular-base/src/app/app.html +1 -0
- package/templates/frontend/angular-base/src/app/app.routes.server.ts +28 -0
- package/templates/frontend/angular-base/src/app/app.routes.ts +67 -0
- package/templates/frontend/angular-base/src/app/app.spec.ts +23 -0
- package/templates/frontend/angular-base/src/app/app.ts +12 -0
- package/templates/frontend/angular-base/src/app/core/guards/admin.guard.ts +16 -0
- package/templates/frontend/angular-base/src/app/core/guards/auth.guard.spec.ts +43 -0
- package/templates/frontend/angular-base/src/app/core/guards/auth.guard.ts +15 -0
- package/templates/frontend/angular-base/src/app/core/index.ts +10 -0
- package/templates/frontend/angular-base/src/app/core/interceptors/http-error.interceptor.spec.ts +43 -0
- package/templates/frontend/angular-base/src/app/core/interceptors/http-error.interceptor.ts +53 -0
- package/templates/frontend/angular-base/src/app/core/services/auth.service.spec.ts +33 -0
- package/templates/frontend/angular-base/src/app/core/services/auth.service.ts +91 -0
- package/templates/frontend/angular-base/src/app/core/services/theme.service.spec.ts +33 -0
- package/templates/frontend/angular-base/src/app/core/services/theme.service.ts +136 -0
- package/templates/frontend/angular-base/src/app/features/admin/index.ts +3 -0
- package/templates/frontend/angular-base/src/app/features/admin/routes.ts +21 -0
- package/templates/frontend/angular-base/src/app/features/admin/users/models/admin-user.model.ts +32 -0
- package/templates/frontend/angular-base/src/app/features/admin/users/pages/user-form.page.ts +279 -0
- package/templates/frontend/angular-base/src/app/features/admin/users/pages/user-list.page.ts +336 -0
- package/templates/frontend/angular-base/src/app/features/admin/users/services/admin-user.service.ts +151 -0
- package/templates/frontend/angular-base/src/app/features/auth/index.ts +2 -0
- package/templates/frontend/angular-base/src/app/features/auth/models/auth.model.ts +39 -0
- package/templates/frontend/angular-base/src/app/features/auth/pages/login.page.spec.ts +44 -0
- package/templates/frontend/angular-base/src/app/features/auth/pages/login.page.ts +187 -0
- package/templates/frontend/angular-base/src/app/features/auth/pages/password-recovery.page.spec.ts +48 -0
- package/templates/frontend/angular-base/src/app/features/auth/pages/password-recovery.page.ts +171 -0
- package/templates/frontend/angular-base/src/app/features/auth/pages/signup.page.spec.ts +53 -0
- package/templates/frontend/angular-base/src/app/features/auth/pages/signup.page.ts +269 -0
- package/templates/frontend/angular-base/src/app/features/auth/routes.ts +22 -0
- package/templates/frontend/angular-base/src/app/features/customers/index.ts +3 -0
- package/templates/frontend/angular-base/src/app/features/customers/models/customer.model.ts +41 -0
- package/templates/frontend/angular-base/src/app/features/customers/pages/customer-detail.page.ts +299 -0
- package/templates/frontend/angular-base/src/app/features/customers/pages/customer-form.page.ts +302 -0
- package/templates/frontend/angular-base/src/app/features/customers/pages/customer-list.page.ts +439 -0
- package/templates/frontend/angular-base/src/app/features/customers/routes.ts +21 -0
- package/templates/frontend/angular-base/src/app/features/customers/services/customer.service.ts +162 -0
- package/templates/frontend/angular-base/src/app/features/dashboard/components/stats-card/stats-card.component.spec.ts +23 -0
- package/templates/frontend/angular-base/src/app/features/dashboard/components/stats-card/stats-card.component.ts +52 -0
- package/templates/frontend/angular-base/src/app/features/dashboard/index.ts +1 -0
- package/templates/frontend/angular-base/src/app/features/dashboard/pages/dashboard.page.spec.ts +21 -0
- package/templates/frontend/angular-base/src/app/features/dashboard/pages/dashboard.page.ts +122 -0
- package/templates/frontend/angular-base/src/app/features/dashboard/routes.ts +8 -0
- package/templates/frontend/angular-base/src/app/features/dashboard/services/dashboard.service.spec.ts +37 -0
- package/templates/frontend/angular-base/src/app/features/dashboard/services/dashboard.service.ts +48 -0
- package/templates/frontend/angular-base/src/app/features/errors/index.ts +1 -0
- package/templates/frontend/angular-base/src/app/features/errors/pages/forbidden.page.ts +50 -0
- package/templates/frontend/angular-base/src/app/features/errors/pages/maintenance.page.ts +46 -0
- package/templates/frontend/angular-base/src/app/features/errors/pages/not-found.page.ts +49 -0
- package/templates/frontend/angular-base/src/app/features/errors/pages/server-error.page.ts +60 -0
- package/templates/frontend/angular-base/src/app/features/errors/routes.ts +25 -0
- package/templates/frontend/angular-base/src/app/features/home/index.ts +1 -0
- package/templates/frontend/angular-base/src/app/features/home/pages/home.page.spec.ts +23 -0
- package/templates/frontend/angular-base/src/app/features/home/pages/home.page.ts +105 -0
- package/templates/frontend/angular-base/src/app/features/home/routes.ts +8 -0
- package/templates/frontend/angular-base/src/app/features/projects/index.ts +3 -0
- package/templates/frontend/angular-base/src/app/features/projects/models/project.model.ts +48 -0
- package/templates/frontend/angular-base/src/app/features/projects/pages/project-detail.page.ts +444 -0
- package/templates/frontend/angular-base/src/app/features/projects/pages/project-form.page.ts +393 -0
- package/templates/frontend/angular-base/src/app/features/projects/pages/project-list.page.ts +411 -0
- package/templates/frontend/angular-base/src/app/features/projects/routes.ts +21 -0
- package/templates/frontend/angular-base/src/app/features/projects/services/project.service.ts +227 -0
- package/templates/frontend/angular-base/src/app/features/reports/index.ts +3 -0
- package/templates/frontend/angular-base/src/app/features/reports/models/report.model.ts +27 -0
- package/templates/frontend/angular-base/src/app/features/reports/pages/analytics.page.html +246 -0
- package/templates/frontend/angular-base/src/app/features/reports/pages/analytics.page.ts +135 -0
- package/templates/frontend/angular-base/src/app/features/reports/routes.ts +13 -0
- package/templates/frontend/angular-base/src/app/features/reports/services/report.service.ts +141 -0
- package/templates/frontend/angular-base/src/app/features/user/index.ts +3 -0
- package/templates/frontend/angular-base/src/app/features/user/models/user.model.ts +23 -0
- package/templates/frontend/angular-base/src/app/features/user/pages/privacy.page.spec.ts +27 -0
- package/templates/frontend/angular-base/src/app/features/user/pages/privacy.page.ts +414 -0
- package/templates/frontend/angular-base/src/app/features/user/pages/profile.page.spec.ts +39 -0
- package/templates/frontend/angular-base/src/app/features/user/pages/profile.page.ts +232 -0
- package/templates/frontend/angular-base/src/app/features/user/pages/settings.page.spec.ts +28 -0
- package/templates/frontend/angular-base/src/app/features/user/pages/settings.page.ts +284 -0
- package/templates/frontend/angular-base/src/app/features/user/routes.ts +21 -0
- package/templates/frontend/angular-base/src/app/features/user/services/user.service.ts +74 -0
- package/templates/frontend/angular-base/src/app/layout/footer/footer.component.spec.ts +25 -0
- package/templates/frontend/angular-base/src/app/layout/footer/footer.component.ts +67 -0
- package/templates/frontend/angular-base/src/app/layout/index.ts +3 -0
- package/templates/frontend/angular-base/src/app/layout/main-layout/main-layout.component.spec.ts +23 -0
- package/templates/frontend/angular-base/src/app/layout/main-layout/main-layout.component.ts +30 -0
- package/templates/frontend/angular-base/src/app/layout/navbar/navbar.component.spec.ts +23 -0
- package/templates/frontend/angular-base/src/app/layout/navbar/navbar.component.ts +293 -0
- package/templates/frontend/angular-base/src/app/shared/components/badge/badge.component.spec.ts +36 -0
- package/templates/frontend/angular-base/src/app/shared/components/badge/badge.component.ts +70 -0
- package/templates/frontend/angular-base/src/app/shared/components/button/button.component.spec.ts +44 -0
- package/templates/frontend/angular-base/src/app/shared/components/button/button.component.ts +64 -0
- package/templates/frontend/angular-base/src/app/shared/components/card/card.component.spec.ts +29 -0
- package/templates/frontend/angular-base/src/app/shared/components/card/card.component.ts +60 -0
- package/templates/frontend/angular-base/src/app/shared/components/data-table/data-table.component.spec.ts +49 -0
- package/templates/frontend/angular-base/src/app/shared/components/data-table/data-table.component.ts +280 -0
- package/templates/frontend/angular-base/src/app/shared/components/empty-state/empty-state.component.spec.ts +36 -0
- package/templates/frontend/angular-base/src/app/shared/components/empty-state/empty-state.component.ts +56 -0
- package/templates/frontend/angular-base/src/app/shared/components/modal/modal.component.spec.ts +32 -0
- package/templates/frontend/angular-base/src/app/shared/components/modal/modal.component.ts +131 -0
- package/templates/frontend/angular-base/src/app/shared/components/pagination/pagination.component.spec.ts +38 -0
- package/templates/frontend/angular-base/src/app/shared/components/pagination/pagination.component.ts +194 -0
- package/templates/frontend/angular-base/src/app/shared/components/search-input/search-input.component.spec.ts +37 -0
- package/templates/frontend/angular-base/src/app/shared/components/search-input/search-input.component.ts +125 -0
- package/templates/frontend/angular-base/src/app/shared/components/skeleton-loader/skeleton-loader.component.spec.ts +30 -0
- package/templates/frontend/angular-base/src/app/shared/components/skeleton-loader/skeleton-loader.component.ts +55 -0
- package/templates/frontend/angular-base/src/app/shared/components/toggle/toggle.component.spec.ts +49 -0
- package/templates/frontend/angular-base/src/app/shared/components/toggle/toggle.component.ts +101 -0
- package/templates/frontend/angular-base/src/app/shared/components/user-dropdown/user-dropdown.component.spec.ts +65 -0
- package/templates/frontend/angular-base/src/app/shared/components/user-dropdown/user-dropdown.component.ts +219 -0
- package/templates/frontend/angular-base/src/app/shared/directives/auto-focus.directive.spec.ts +33 -0
- package/templates/frontend/angular-base/src/app/shared/directives/auto-focus.directive.ts +25 -0
- package/templates/frontend/angular-base/src/app/shared/index.ts +18 -0
- package/templates/frontend/angular-base/src/app/shared/pipes/date-format.pipe.spec.ts +29 -0
- package/templates/frontend/angular-base/src/app/shared/pipes/date-format.pipe.ts +39 -0
- package/templates/frontend/angular-base/src/environments/environment.development.ts +4 -0
- package/templates/frontend/angular-base/src/environments/environment.ts +4 -0
- package/templates/frontend/angular-base/src/index.html +44 -0
- package/templates/frontend/angular-base/src/main.server.ts +7 -0
- package/templates/frontend/angular-base/src/main.ts +5 -0
- package/templates/frontend/angular-base/src/server.ts +66 -0
- package/templates/frontend/angular-base/src/styles.css +209 -0
- package/templates/frontend/angular-base/src/test-setup.ts +10 -0
- package/templates/frontend/angular-base/tsconfig.app.json +17 -0
- package/templates/frontend/angular-base/tsconfig.json +41 -0
- package/templates/frontend/angular-base/tsconfig.spec.json +15 -0
- package/templates/frontend/angular-base/vitest.config.ts +25 -0
- package/templates/frontend/react-vite/.cursor/skills/architecture/SKILL.md +26 -0
- package/templates/frontend/react-vite/.cursor/skills/components-shadcn/SKILL.md +23 -0
- package/templates/frontend/react-vite/.cursor/skills/daisyui/SKILL.md +98 -0
- package/templates/frontend/react-vite/.cursor/skills/routing/SKILL.md +32 -0
- package/templates/frontend/react-vite/.cursor/skills/testing/SKILL.md +55 -0
- package/templates/frontend/react-vite/.cursor/skills/tooling-and-scripts/SKILL.md +24 -0
- package/templates/frontend/react-vite/.cursor/skills/ui-and-styling/SKILL.md +32 -0
- package/templates/frontend/react-vite/.cursor/skills/vibe-and-ia/SKILL.md +23 -0
- package/templates/frontend/react-vite/.prettierrc +6 -0
- package/templates/frontend/react-vite/.tanstack/tmp/c28007bb-2319511cf318e28129c8d8eb723db5fd +9 -0
- package/templates/frontend/react-vite/.tanstack/tmp/c28007bb-bcef89e9e4593777e1c15ec4b4f32eea +9 -0
- package/templates/frontend/react-vite/.vscode/extensions.json +7 -0
- package/templates/frontend/react-vite/README.md +75 -0
- package/templates/frontend/react-vite/components.json +22 -0
- package/templates/frontend/react-vite/eslint.config.js +31 -0
- package/templates/frontend/react-vite/index.html +13 -0
- package/templates/frontend/react-vite/package.json +62 -0
- package/templates/frontend/react-vite/pnpm-lock.yaml +4487 -0
- package/templates/frontend/react-vite/pnpm-workspace.yaml +2 -0
- package/templates/frontend/react-vite/src/assets/react.svg +1 -0
- package/templates/frontend/react-vite/src/components/ui/badge.tsx +37 -0
- package/templates/frontend/react-vite/src/components/ui/breadcrumb.tsx +106 -0
- package/templates/frontend/react-vite/src/components/ui/button.tsx +58 -0
- package/templates/frontend/react-vite/src/components/ui/card.tsx +72 -0
- package/templates/frontend/react-vite/src/components/ui/form.tsx +165 -0
- package/templates/frontend/react-vite/src/components/ui/input.tsx +22 -0
- package/templates/frontend/react-vite/src/components/ui/label.tsx +24 -0
- package/templates/frontend/react-vite/src/components/ui/password-input.tsx +41 -0
- package/templates/frontend/react-vite/src/components/ui/separator.tsx +28 -0
- package/templates/frontend/react-vite/src/components/ui/tabs.tsx +62 -0
- package/templates/frontend/react-vite/src/components/ui/textarea.tsx +21 -0
- package/templates/frontend/react-vite/src/index.css +104 -0
- package/templates/frontend/react-vite/src/lib/queryClient.ts +11 -0
- package/templates/frontend/react-vite/src/lib/utils.ts +6 -0
- package/templates/frontend/react-vite/src/main.tsx +33 -0
- package/templates/frontend/react-vite/src/routeTree.gen.ts +77 -0
- package/templates/frontend/react-vite/src/router.tsx +13 -0
- package/templates/frontend/react-vite/src/routes/__root.tsx +82 -0
- package/templates/frontend/react-vite/src/routes/index.tsx +187 -0
- package/templates/frontend/react-vite/src/routes/otra-ruta.tsx +319 -0
- package/templates/frontend/react-vite/src/test/setup.ts +1 -0
- package/templates/frontend/react-vite/tsconfig.app.json +34 -0
- package/templates/frontend/react-vite/tsconfig.json +10 -0
- package/templates/frontend/react-vite/tsconfig.node.json +26 -0
- package/templates/frontend/react-vite/vite.config.ts +22 -0
- package/templates/frontend/react-vite/vitest.config.ts +9 -0
- package/templates/frontend/react-vite-help/.cursor/skills/architecture/SKILL.md +26 -0
- package/templates/frontend/react-vite-help/.cursor/skills/components-shadcn/SKILL.md +23 -0
- package/templates/frontend/react-vite-help/.cursor/skills/daisyui/SKILL.md +98 -0
- package/templates/frontend/react-vite-help/.cursor/skills/routing/SKILL.md +32 -0
- package/templates/frontend/react-vite-help/.cursor/skills/testing/SKILL.md +55 -0
- package/templates/frontend/react-vite-help/.cursor/skills/tooling-and-scripts/SKILL.md +24 -0
- package/templates/frontend/react-vite-help/.cursor/skills/ui-and-styling/SKILL.md +32 -0
- package/templates/frontend/react-vite-help/.cursor/skills/vibe-and-ia/SKILL.md +23 -0
- package/templates/frontend/react-vite-help/.prettierrc +6 -0
- package/templates/frontend/react-vite-help/.tanstack/tmp/c28007bb-2319511cf318e28129c8d8eb723db5fd +9 -0
- package/templates/frontend/react-vite-help/.tanstack/tmp/c28007bb-bcef89e9e4593777e1c15ec4b4f32eea +9 -0
- package/templates/frontend/react-vite-help/.vscode/extensions.json +7 -0
- package/templates/frontend/react-vite-help/README.md +75 -0
- package/templates/frontend/react-vite-help/components.json +22 -0
- package/templates/frontend/react-vite-help/eslint.config.js +31 -0
- package/templates/frontend/react-vite-help/index.html +13 -0
- package/templates/frontend/react-vite-help/package.json +62 -0
- package/templates/frontend/react-vite-help/pnpm-lock.yaml +4487 -0
- package/templates/frontend/react-vite-help/pnpm-workspace.yaml +2 -0
- package/templates/frontend/react-vite-help/src/assets/react.svg +1 -0
- package/templates/frontend/react-vite-help/src/components/documentacion/entorno.tsx +99 -0
- package/templates/frontend/react-vite-help/src/components/documentacion/estructura.tsx +100 -0
- package/templates/frontend/react-vite-help/src/components/documentacion/figma-mcp.tsx +200 -0
- package/templates/frontend/react-vite-help/src/components/documentacion/inicio.tsx +69 -0
- package/templates/frontend/react-vite-help/src/components/documentacion/instalacion.tsx +72 -0
- package/templates/frontend/react-vite-help/src/components/documentacion/personalizacion.tsx +163 -0
- package/templates/frontend/react-vite-help/src/components/documentacion/rutas.tsx +138 -0
- package/templates/frontend/react-vite-help/src/components/documentacion/stack.tsx +401 -0
- package/templates/frontend/react-vite-help/src/components/ui/badge.tsx +37 -0
- package/templates/frontend/react-vite-help/src/components/ui/breadcrumb.tsx +106 -0
- package/templates/frontend/react-vite-help/src/components/ui/button.tsx +58 -0
- package/templates/frontend/react-vite-help/src/components/ui/card.tsx +72 -0
- package/templates/frontend/react-vite-help/src/components/ui/form.tsx +165 -0
- package/templates/frontend/react-vite-help/src/components/ui/input.tsx +22 -0
- package/templates/frontend/react-vite-help/src/components/ui/label.tsx +24 -0
- package/templates/frontend/react-vite-help/src/components/ui/password-input.tsx +41 -0
- package/templates/frontend/react-vite-help/src/components/ui/separator.tsx +28 -0
- package/templates/frontend/react-vite-help/src/components/ui/tabs.tsx +62 -0
- package/templates/frontend/react-vite-help/src/components/ui/textarea.tsx +21 -0
- package/templates/frontend/react-vite-help/src/data/proyectos.json +56 -0
- package/templates/frontend/react-vite-help/src/index.css +104 -0
- package/templates/frontend/react-vite-help/src/lib/queryClient.ts +11 -0
- package/templates/frontend/react-vite-help/src/lib/utils.ts +6 -0
- package/templates/frontend/react-vite-help/src/main.tsx +33 -0
- package/templates/frontend/react-vite-help/src/routeTree.gen.ts +241 -0
- package/templates/frontend/react-vite-help/src/router.tsx +13 -0
- package/templates/frontend/react-vite-help/src/routes/__root.tsx +92 -0
- package/templates/frontend/react-vite-help/src/routes/auth/iniciar-sesion.tsx +139 -0
- package/templates/frontend/react-vite-help/src/routes/auth/registro.tsx +205 -0
- package/templates/frontend/react-vite-help/src/routes/contacto.tsx +60 -0
- package/templates/frontend/react-vite-help/src/routes/dashbord.tsx +9 -0
- package/templates/frontend/react-vite-help/src/routes/documentacion.tsx +80 -0
- package/templates/frontend/react-vite-help/src/routes/index.test.tsx +42 -0
- package/templates/frontend/react-vite-help/src/routes/index.tsx +211 -0
- package/templates/frontend/react-vite-help/src/routes/perfil.tsx +9 -0
- package/templates/frontend/react-vite-help/src/routes/proyectos.$proyectoId.tsx +156 -0
- package/templates/frontend/react-vite-help/src/routes/proyectos.tsx +93 -0
- package/templates/frontend/react-vite-help/src/test/setup.ts +1 -0
- package/templates/frontend/react-vite-help/tsconfig.app.json +34 -0
- package/templates/frontend/react-vite-help/tsconfig.json +10 -0
- package/templates/frontend/react-vite-help/tsconfig.node.json +26 -0
- package/templates/frontend/react-vite-help/vite.config.ts +22 -0
- package/templates/frontend/react-vite-help/vitest.config.ts +9 -0
- package/templates/mobile/.gitkeep +1 -0
- package/templates/mobile/expo-base/.cursor/rules/general-rules.mdc +231 -0
- package/templates/mobile/expo-base/.cursor/rules/react-native-rules.mdc +1348 -0
- package/templates/mobile/expo-base/.env +1 -0
- package/templates/mobile/expo-base/.husky/commit-msg +4 -0
- package/templates/mobile/expo-base/.husky/pre-commit +1 -0
- package/templates/mobile/expo-base/.lintstagedrc.js +25 -0
- package/templates/mobile/expo-base/.prettierignore +10 -0
- package/templates/mobile/expo-base/.prettierrc +11 -0
- package/templates/mobile/expo-base/.vscode/extensions.json +1 -0
- package/templates/mobile/expo-base/.vscode/settings.json +7 -0
- package/templates/mobile/expo-base/CHANGELOG.md +155 -0
- package/templates/mobile/expo-base/IMPLEMENTATION_SUMMARY.md +413 -0
- package/templates/mobile/expo-base/README.md +510 -0
- package/templates/mobile/expo-base/SETUP_NOTES.md +233 -0
- package/templates/mobile/expo-base/TEMPLATE_USAGE.md +623 -0
- package/templates/mobile/expo-base/WARP.md +123 -0
- package/templates/mobile/expo-base/app/(public)/_layout.tsx +21 -0
- package/templates/mobile/expo-base/app/(public)/forgot-password.tsx +3 -0
- package/templates/mobile/expo-base/app/(public)/login.tsx +3 -0
- package/templates/mobile/expo-base/app/(public)/register.tsx +3 -0
- package/templates/mobile/expo-base/app/(tabs)/_layout.tsx +60 -0
- package/templates/mobile/expo-base/app/(tabs)/explore.tsx +235 -0
- package/templates/mobile/expo-base/app/(tabs)/index.tsx +290 -0
- package/templates/mobile/expo-base/app/(tabs)/profile.tsx +3 -0
- package/templates/mobile/expo-base/app/_layout.tsx +143 -0
- package/templates/mobile/expo-base/app/modal.tsx +29 -0
- package/templates/mobile/expo-base/app/onboarding.tsx +3 -0
- package/templates/mobile/expo-base/app/profile/_layout.tsx +44 -0
- package/templates/mobile/expo-base/app/profile/change-password.tsx +3 -0
- package/templates/mobile/expo-base/app/profile/edit.tsx +3 -0
- package/templates/mobile/expo-base/app/settings/_layout.tsx +62 -0
- package/templates/mobile/expo-base/app/settings/about.tsx +3 -0
- package/templates/mobile/expo-base/app/settings/index.tsx +3 -0
- package/templates/mobile/expo-base/app/settings/language.tsx +3 -0
- package/templates/mobile/expo-base/app/settings/notifications.tsx +3 -0
- package/templates/mobile/expo-base/app/settings/theme.tsx +3 -0
- package/templates/mobile/expo-base/app.json +31 -0
- package/templates/mobile/expo-base/commitlint.config.js +50 -0
- package/templates/mobile/expo-base/docs/ARCHITECTURE.md +565 -0
- package/templates/mobile/expo-base/docs/CI_CD.md +461 -0
- package/templates/mobile/expo-base/docs/COMPONENTS.md +1103 -0
- package/templates/mobile/expo-base/docs/CONTRIBUTING.md +733 -0
- package/templates/mobile/expo-base/docs/DESIGN_TOKENS.md +832 -0
- package/templates/mobile/expo-base/docs/GIT_CONVENTIONS.md +411 -0
- package/templates/mobile/expo-base/docs/I18N.md +701 -0
- package/templates/mobile/expo-base/docs/TESTING.md +565 -0
- package/templates/mobile/expo-base/docs/THEMING.md +753 -0
- package/templates/mobile/expo-base/docs/VERSIONING.md +518 -0
- package/templates/mobile/expo-base/eslint.config.js +180 -0
- package/templates/mobile/expo-base/jest.config.js +51 -0
- package/templates/mobile/expo-base/jest.setup.js +106 -0
- package/templates/mobile/expo-base/package.json +74 -0
- package/templates/mobile/expo-base/pnpm-lock.yaml +11354 -0
- package/templates/mobile/expo-base/pnpm-workspace.yaml +4 -0
- package/templates/mobile/expo-base/src/__tests__/helpers/test-utils.tsx +77 -0
- package/templates/mobile/expo-base/src/__tests__/mocks/api.ts +65 -0
- package/templates/mobile/expo-base/src/__tests__/mocks/i18n.ts +22 -0
- package/templates/mobile/expo-base/src/__tests__/mocks/index.ts +7 -0
- package/templates/mobile/expo-base/src/__tests__/mocks/navigation.ts +47 -0
- package/templates/mobile/expo-base/src/__tests__/mocks/theme.ts +46 -0
- package/templates/mobile/expo-base/src/assets/images/android-icon-background.png +0 -0
- package/templates/mobile/expo-base/src/assets/images/android-icon-foreground.png +0 -0
- package/templates/mobile/expo-base/src/assets/images/android-icon-monochrome.png +0 -0
- package/templates/mobile/expo-base/src/assets/images/favicon.png +0 -0
- package/templates/mobile/expo-base/src/assets/images/icon.png +0 -0
- package/templates/mobile/expo-base/src/assets/images/partial-react-logo.png +0 -0
- package/templates/mobile/expo-base/src/assets/images/react-logo.png +0 -0
- package/templates/mobile/expo-base/src/assets/images/react-logo@2x.png +0 -0
- package/templates/mobile/expo-base/src/assets/images/react-logo@3x.png +0 -0
- package/templates/mobile/expo-base/src/assets/images/splash-icon.png +0 -0
- package/templates/mobile/expo-base/src/components/external-link.tsx +25 -0
- package/templates/mobile/expo-base/src/components/feedback/empty-state.tsx +150 -0
- package/templates/mobile/expo-base/src/components/feedback/error-boundary.tsx +145 -0
- package/templates/mobile/expo-base/src/components/feedback/error-screen.tsx +121 -0
- package/templates/mobile/expo-base/src/components/feedback/index.ts +11 -0
- package/templates/mobile/expo-base/src/components/feedback/loading.tsx +155 -0
- package/templates/mobile/expo-base/src/components/haptic-tab.tsx +18 -0
- package/templates/mobile/expo-base/src/components/hello-wave.tsx +19 -0
- package/templates/mobile/expo-base/src/components/layout/column.tsx +49 -0
- package/templates/mobile/expo-base/src/components/layout/container.tsx +41 -0
- package/templates/mobile/expo-base/src/components/layout/index.ts +14 -0
- package/templates/mobile/expo-base/src/components/layout/row.tsx +52 -0
- package/templates/mobile/expo-base/src/components/layout/screen.tsx +110 -0
- package/templates/mobile/expo-base/src/components/layout/section.tsx +37 -0
- package/templates/mobile/expo-base/src/components/parallax-scroll-view.tsx +79 -0
- package/templates/mobile/expo-base/src/components/themed-text.tsx +60 -0
- package/templates/mobile/expo-base/src/components/themed-view.tsx +14 -0
- package/templates/mobile/expo-base/src/components/ui/__tests__/button.test.tsx +206 -0
- package/templates/mobile/expo-base/src/components/ui/avatar.tsx +141 -0
- package/templates/mobile/expo-base/src/components/ui/badge.tsx +175 -0
- package/templates/mobile/expo-base/src/components/ui/button.tsx +247 -0
- package/templates/mobile/expo-base/src/components/ui/card.tsx +127 -0
- package/templates/mobile/expo-base/src/components/ui/collapsible.tsx +45 -0
- package/templates/mobile/expo-base/src/components/ui/divider.tsx +50 -0
- package/templates/mobile/expo-base/src/components/ui/icon-symbol.ios.tsx +32 -0
- package/templates/mobile/expo-base/src/components/ui/icon-symbol.tsx +41 -0
- package/templates/mobile/expo-base/src/components/ui/icon.tsx +137 -0
- package/templates/mobile/expo-base/src/components/ui/index.ts +20 -0
- package/templates/mobile/expo-base/src/components/ui/input.tsx +242 -0
- package/templates/mobile/expo-base/src/constants/theme.ts +53 -0
- package/templates/mobile/expo-base/src/contexts/auth-context.tsx +246 -0
- package/templates/mobile/expo-base/src/contexts/index.ts +8 -0
- package/templates/mobile/expo-base/src/contexts/query-client.tsx +43 -0
- package/templates/mobile/expo-base/src/contexts/theme-context.tsx +111 -0
- package/templates/mobile/expo-base/src/features/auth/forgot-password-screen.tsx +164 -0
- package/templates/mobile/expo-base/src/features/auth/index.ts +7 -0
- package/templates/mobile/expo-base/src/features/auth/login-screen.tsx +177 -0
- package/templates/mobile/expo-base/src/features/auth/register-screen.tsx +220 -0
- package/templates/mobile/expo-base/src/features/onboarding/README.md +190 -0
- package/templates/mobile/expo-base/src/features/onboarding/index.ts +7 -0
- package/templates/mobile/expo-base/src/features/onboarding/onboarding-debug.tsx +120 -0
- package/templates/mobile/expo-base/src/features/onboarding/onboarding-screen.tsx +242 -0
- package/templates/mobile/expo-base/src/features/onboarding/onboarding-utils.ts +49 -0
- package/templates/mobile/expo-base/src/features/profile/change-password-screen.tsx +154 -0
- package/templates/mobile/expo-base/src/features/profile/edit-profile-screen.tsx +183 -0
- package/templates/mobile/expo-base/src/features/profile/index.ts +7 -0
- package/templates/mobile/expo-base/src/features/profile/profile-screen.tsx +177 -0
- package/templates/mobile/expo-base/src/features/settings/about-screen.tsx +167 -0
- package/templates/mobile/expo-base/src/features/settings/index.ts +9 -0
- package/templates/mobile/expo-base/src/features/settings/language-settings-screen.tsx +97 -0
- package/templates/mobile/expo-base/src/features/settings/notifications-settings-screen.tsx +128 -0
- package/templates/mobile/expo-base/src/features/settings/settings-screen.tsx +141 -0
- package/templates/mobile/expo-base/src/features/settings/theme-settings-screen.tsx +149 -0
- package/templates/mobile/expo-base/src/hooks/__tests__/use-theme.test.ts +151 -0
- package/templates/mobile/expo-base/src/hooks/index.ts +13 -0
- package/templates/mobile/expo-base/src/hooks/use-api.ts +206 -0
- package/templates/mobile/expo-base/src/hooks/use-auth.ts +7 -0
- package/templates/mobile/expo-base/src/hooks/use-color-scheme.ts +19 -0
- package/templates/mobile/expo-base/src/hooks/use-color-scheme.web.ts +31 -0
- package/templates/mobile/expo-base/src/hooks/use-theme-color.ts +21 -0
- package/templates/mobile/expo-base/src/hooks/use-theme.ts +60 -0
- package/templates/mobile/expo-base/src/hooks/use-translation.ts +48 -0
- package/templates/mobile/expo-base/src/i18n/index.ts +113 -0
- package/templates/mobile/expo-base/src/i18n/locales/en-US.json +134 -0
- package/templates/mobile/expo-base/src/i18n/locales/es-AR.json +134 -0
- package/templates/mobile/expo-base/src/scripts/reset-project.js +112 -0
- package/templates/mobile/expo-base/src/services/api/client.ts +190 -0
- package/templates/mobile/expo-base/src/services/api/endpoints.ts +45 -0
- package/templates/mobile/expo-base/src/services/api/index.ts +7 -0
- package/templates/mobile/expo-base/src/services/storage/secure-storage.ts +56 -0
- package/templates/mobile/expo-base/src/theme/colors.ts +147 -0
- package/templates/mobile/expo-base/src/theme/index.ts +40 -0
- package/templates/mobile/expo-base/src/theme/semantic-colors.ts +221 -0
- package/templates/mobile/expo-base/src/theme/shadows.ts +123 -0
- package/templates/mobile/expo-base/src/theme/spacing.ts +118 -0
- package/templates/mobile/expo-base/src/theme/theme-config.ts +111 -0
- package/templates/mobile/expo-base/src/theme/tokens.ts +218 -0
- package/templates/mobile/expo-base/src/theme/typography.ts +152 -0
- package/templates/mobile/expo-base/src/types/index.ts +6 -0
- package/templates/mobile/expo-base/src/types/models.ts +153 -0
- package/templates/mobile/expo-base/src/types/navigation.ts +67 -0
- package/templates/mobile/expo-base/src/utils/__tests__/validators.test.ts +312 -0
- package/templates/mobile/expo-base/src/utils/constants.ts +167 -0
- package/templates/mobile/expo-base/src/utils/formatters.ts +222 -0
- package/templates/mobile/expo-base/src/utils/index.ts +7 -0
- package/templates/mobile/expo-base/src/utils/validators.ts +187 -0
- package/templates/mobile/expo-base/tsconfig.json +26 -0
|
@@ -0,0 +1,907 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-security-best-practices
|
|
3
|
+
description: "Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# API Security Best Practices
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Guide developers in building secure APIs by implementing authentication, authorization, input validation, rate limiting, and protection against common vulnerabilities. This skill covers security patterns for REST, GraphQL, and WebSocket APIs.
|
|
11
|
+
|
|
12
|
+
## When to Use This Skill
|
|
13
|
+
|
|
14
|
+
- Use when designing new API endpoints
|
|
15
|
+
- Use when securing existing APIs
|
|
16
|
+
- Use when implementing authentication and authorization
|
|
17
|
+
- Use when protecting against API attacks (injection, DDoS, etc.)
|
|
18
|
+
- Use when conducting API security reviews
|
|
19
|
+
- Use when preparing for security audits
|
|
20
|
+
- Use when implementing rate limiting and throttling
|
|
21
|
+
- Use when handling sensitive data in APIs
|
|
22
|
+
|
|
23
|
+
## How It Works
|
|
24
|
+
|
|
25
|
+
### Step 1: Authentication & Authorization
|
|
26
|
+
|
|
27
|
+
I'll help you implement secure authentication:
|
|
28
|
+
- Choose authentication method (JWT, OAuth 2.0, API keys)
|
|
29
|
+
- Implement token-based authentication
|
|
30
|
+
- Set up role-based access control (RBAC)
|
|
31
|
+
- Secure session management
|
|
32
|
+
- Implement multi-factor authentication (MFA)
|
|
33
|
+
|
|
34
|
+
### Step 2: Input Validation & Sanitization
|
|
35
|
+
|
|
36
|
+
Protect against injection attacks:
|
|
37
|
+
- Validate all input data
|
|
38
|
+
- Sanitize user inputs
|
|
39
|
+
- Use parameterized queries
|
|
40
|
+
- Implement request schema validation
|
|
41
|
+
- Prevent SQL injection, XSS, and command injection
|
|
42
|
+
|
|
43
|
+
### Step 3: Rate Limiting & Throttling
|
|
44
|
+
|
|
45
|
+
Prevent abuse and DDoS attacks:
|
|
46
|
+
- Implement rate limiting per user/IP
|
|
47
|
+
- Set up API throttling
|
|
48
|
+
- Configure request quotas
|
|
49
|
+
- Handle rate limit errors gracefully
|
|
50
|
+
- Monitor for suspicious activity
|
|
51
|
+
|
|
52
|
+
### Step 4: Data Protection
|
|
53
|
+
|
|
54
|
+
Secure sensitive data:
|
|
55
|
+
- Encrypt data in transit (HTTPS/TLS)
|
|
56
|
+
- Encrypt sensitive data at rest
|
|
57
|
+
- Implement proper error handling (no data leaks)
|
|
58
|
+
- Sanitize error messages
|
|
59
|
+
- Use secure headers
|
|
60
|
+
|
|
61
|
+
### Step 5: API Security Testing
|
|
62
|
+
|
|
63
|
+
Verify security implementation:
|
|
64
|
+
- Test authentication and authorization
|
|
65
|
+
- Perform penetration testing
|
|
66
|
+
- Check for common vulnerabilities (OWASP API Top 10)
|
|
67
|
+
- Validate input handling
|
|
68
|
+
- Test rate limiting
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## Examples
|
|
72
|
+
|
|
73
|
+
### Example 1: Implementing JWT Authentication
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
## Secure JWT Authentication Implementation
|
|
77
|
+
|
|
78
|
+
### Authentication Flow
|
|
79
|
+
|
|
80
|
+
1. User logs in with credentials
|
|
81
|
+
2. Server validates credentials
|
|
82
|
+
3. Server generates JWT token
|
|
83
|
+
4. Client stores token securely
|
|
84
|
+
5. Client sends token with each request
|
|
85
|
+
6. Server validates token
|
|
86
|
+
|
|
87
|
+
### Implementation
|
|
88
|
+
|
|
89
|
+
#### 1. Generate Secure JWT Tokens
|
|
90
|
+
|
|
91
|
+
\`\`\`javascript
|
|
92
|
+
// auth.js
|
|
93
|
+
const jwt = require('jsonwebtoken');
|
|
94
|
+
const bcrypt = require('bcrypt');
|
|
95
|
+
|
|
96
|
+
// Login endpoint
|
|
97
|
+
app.post('/api/auth/login', async (req, res) => {
|
|
98
|
+
try {
|
|
99
|
+
const { email, password } = req.body;
|
|
100
|
+
|
|
101
|
+
// Validate input
|
|
102
|
+
if (!email || !password) {
|
|
103
|
+
return res.status(400).json({
|
|
104
|
+
error: 'Email and password are required'
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Find user
|
|
109
|
+
const user = await db.user.findUnique({
|
|
110
|
+
where: { email }
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
if (!user) {
|
|
114
|
+
// Don't reveal if user exists
|
|
115
|
+
return res.status(401).json({
|
|
116
|
+
error: 'Invalid credentials'
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Verify password
|
|
121
|
+
const validPassword = await bcrypt.compare(
|
|
122
|
+
password,
|
|
123
|
+
user.passwordHash
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
if (!validPassword) {
|
|
127
|
+
return res.status(401).json({
|
|
128
|
+
error: 'Invalid credentials'
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Generate JWT token
|
|
133
|
+
const token = jwt.sign(
|
|
134
|
+
{
|
|
135
|
+
userId: user.id,
|
|
136
|
+
email: user.email,
|
|
137
|
+
role: user.role
|
|
138
|
+
},
|
|
139
|
+
process.env.JWT_SECRET,
|
|
140
|
+
{
|
|
141
|
+
expiresIn: '1h',
|
|
142
|
+
issuer: 'your-app',
|
|
143
|
+
audience: 'your-app-users'
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
// Generate refresh token
|
|
148
|
+
const refreshToken = jwt.sign(
|
|
149
|
+
{ userId: user.id },
|
|
150
|
+
process.env.JWT_REFRESH_SECRET,
|
|
151
|
+
{ expiresIn: '7d' }
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
// Store refresh token in database
|
|
155
|
+
await db.refreshToken.create({
|
|
156
|
+
data: {
|
|
157
|
+
token: refreshToken,
|
|
158
|
+
userId: user.id,
|
|
159
|
+
expiresAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000)
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
res.json({
|
|
164
|
+
token,
|
|
165
|
+
refreshToken,
|
|
166
|
+
expiresIn: 3600
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
} catch (error) {
|
|
170
|
+
console.error('Login error:', error);
|
|
171
|
+
res.status(500).json({
|
|
172
|
+
error: 'An error occurred during login'
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
\`\`\`
|
|
177
|
+
|
|
178
|
+
#### 2. Verify JWT Tokens (Middleware)
|
|
179
|
+
|
|
180
|
+
\`\`\`javascript
|
|
181
|
+
// middleware/auth.js
|
|
182
|
+
const jwt = require('jsonwebtoken');
|
|
183
|
+
|
|
184
|
+
function authenticateToken(req, res, next) {
|
|
185
|
+
// Get token from header
|
|
186
|
+
const authHeader = req.headers['authorization'];
|
|
187
|
+
const token = authHeader && authHeader.split(' ')[1]; // Bearer TOKEN
|
|
188
|
+
|
|
189
|
+
if (!token) {
|
|
190
|
+
return res.status(401).json({
|
|
191
|
+
error: 'Access token required'
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Verify token
|
|
196
|
+
jwt.verify(
|
|
197
|
+
token,
|
|
198
|
+
process.env.JWT_SECRET,
|
|
199
|
+
{
|
|
200
|
+
issuer: 'your-app',
|
|
201
|
+
audience: 'your-app-users'
|
|
202
|
+
},
|
|
203
|
+
(err, user) => {
|
|
204
|
+
if (err) {
|
|
205
|
+
if (err.name === 'TokenExpiredError') {
|
|
206
|
+
return res.status(401).json({
|
|
207
|
+
error: 'Token expired'
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
return res.status(403).json({
|
|
211
|
+
error: 'Invalid token'
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Attach user to request
|
|
216
|
+
req.user = user;
|
|
217
|
+
next();
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
module.exports = { authenticateToken };
|
|
223
|
+
\`\`\`
|
|
224
|
+
|
|
225
|
+
#### 3. Protect Routes
|
|
226
|
+
|
|
227
|
+
\`\`\`javascript
|
|
228
|
+
const { authenticateToken } = require('./middleware/auth');
|
|
229
|
+
|
|
230
|
+
// Protected route
|
|
231
|
+
app.get('/api/user/profile', authenticateToken, async (req, res) => {
|
|
232
|
+
try {
|
|
233
|
+
const user = await db.user.findUnique({
|
|
234
|
+
where: { id: req.user.userId },
|
|
235
|
+
select: {
|
|
236
|
+
id: true,
|
|
237
|
+
email: true,
|
|
238
|
+
name: true,
|
|
239
|
+
// Don't return passwordHash
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
res.json(user);
|
|
244
|
+
} catch (error) {
|
|
245
|
+
res.status(500).json({ error: 'Server error' });
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
\`\`\`
|
|
249
|
+
|
|
250
|
+
#### 4. Implement Token Refresh
|
|
251
|
+
|
|
252
|
+
\`\`\`javascript
|
|
253
|
+
app.post('/api/auth/refresh', async (req, res) => {
|
|
254
|
+
const { refreshToken } = req.body;
|
|
255
|
+
|
|
256
|
+
if (!refreshToken) {
|
|
257
|
+
return res.status(401).json({
|
|
258
|
+
error: 'Refresh token required'
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
try {
|
|
263
|
+
// Verify refresh token
|
|
264
|
+
const decoded = jwt.verify(
|
|
265
|
+
refreshToken,
|
|
266
|
+
process.env.JWT_REFRESH_SECRET
|
|
267
|
+
);
|
|
268
|
+
|
|
269
|
+
// Check if refresh token exists in database
|
|
270
|
+
const storedToken = await db.refreshToken.findFirst({
|
|
271
|
+
where: {
|
|
272
|
+
token: refreshToken,
|
|
273
|
+
userId: decoded.userId,
|
|
274
|
+
expiresAt: { gt: new Date() }
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
if (!storedToken) {
|
|
279
|
+
return res.status(403).json({
|
|
280
|
+
error: 'Invalid refresh token'
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Generate new access token
|
|
285
|
+
const user = await db.user.findUnique({
|
|
286
|
+
where: { id: decoded.userId }
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
const newToken = jwt.sign(
|
|
290
|
+
{
|
|
291
|
+
userId: user.id,
|
|
292
|
+
email: user.email,
|
|
293
|
+
role: user.role
|
|
294
|
+
},
|
|
295
|
+
process.env.JWT_SECRET,
|
|
296
|
+
{ expiresIn: '1h' }
|
|
297
|
+
);
|
|
298
|
+
|
|
299
|
+
res.json({
|
|
300
|
+
token: newToken,
|
|
301
|
+
expiresIn: 3600
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
} catch (error) {
|
|
305
|
+
res.status(403).json({
|
|
306
|
+
error: 'Invalid refresh token'
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
\`\`\`
|
|
311
|
+
|
|
312
|
+
### Security Best Practices
|
|
313
|
+
|
|
314
|
+
- ✅ Use strong JWT secrets (256-bit minimum)
|
|
315
|
+
- ✅ Set short expiration times (1 hour for access tokens)
|
|
316
|
+
- ✅ Implement refresh tokens for long-lived sessions
|
|
317
|
+
- ✅ Store refresh tokens in database (can be revoked)
|
|
318
|
+
- ✅ Use HTTPS only
|
|
319
|
+
- ✅ Don't store sensitive data in JWT payload
|
|
320
|
+
- ✅ Validate token issuer and audience
|
|
321
|
+
- ✅ Implement token blacklisting for logout
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
### Example 2: Input Validation and SQL Injection Prevention
|
|
326
|
+
|
|
327
|
+
```markdown
|
|
328
|
+
## Preventing SQL Injection and Input Validation
|
|
329
|
+
|
|
330
|
+
### The Problem
|
|
331
|
+
|
|
332
|
+
**❌ Vulnerable Code:**
|
|
333
|
+
\`\`\`javascript
|
|
334
|
+
// NEVER DO THIS - SQL Injection vulnerability
|
|
335
|
+
app.get('/api/users/:id', async (req, res) => {
|
|
336
|
+
const userId = req.params.id;
|
|
337
|
+
|
|
338
|
+
// Dangerous: User input directly in query
|
|
339
|
+
const query = \`SELECT * FROM users WHERE id = '\${userId}'\`;
|
|
340
|
+
const user = await db.query(query);
|
|
341
|
+
|
|
342
|
+
res.json(user);
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
// Attack example:
|
|
346
|
+
// GET /api/users/1' OR '1'='1
|
|
347
|
+
// Returns all users!
|
|
348
|
+
\`\`\`
|
|
349
|
+
|
|
350
|
+
### The Solution
|
|
351
|
+
|
|
352
|
+
#### 1. Use Parameterized Queries
|
|
353
|
+
|
|
354
|
+
\`\`\`javascript
|
|
355
|
+
// ✅ Safe: Parameterized query
|
|
356
|
+
app.get('/api/users/:id', async (req, res) => {
|
|
357
|
+
const userId = req.params.id;
|
|
358
|
+
|
|
359
|
+
// Validate input first
|
|
360
|
+
if (!userId || !/^\d+$/.test(userId)) {
|
|
361
|
+
return res.status(400).json({
|
|
362
|
+
error: 'Invalid user ID'
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// Use parameterized query
|
|
367
|
+
const user = await db.query(
|
|
368
|
+
'SELECT id, email, name FROM users WHERE id = $1',
|
|
369
|
+
[userId]
|
|
370
|
+
);
|
|
371
|
+
|
|
372
|
+
if (!user) {
|
|
373
|
+
return res.status(404).json({
|
|
374
|
+
error: 'User not found'
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
res.json(user);
|
|
379
|
+
});
|
|
380
|
+
\`\`\`
|
|
381
|
+
|
|
382
|
+
#### 2. Use ORM with Proper Escaping
|
|
383
|
+
|
|
384
|
+
\`\`\`javascript
|
|
385
|
+
// ✅ Safe: Using Prisma ORM
|
|
386
|
+
app.get('/api/users/:id', async (req, res) => {
|
|
387
|
+
const userId = parseInt(req.params.id);
|
|
388
|
+
|
|
389
|
+
if (isNaN(userId)) {
|
|
390
|
+
return res.status(400).json({
|
|
391
|
+
error: 'Invalid user ID'
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const user = await prisma.user.findUnique({
|
|
396
|
+
where: { id: userId },
|
|
397
|
+
select: {
|
|
398
|
+
id: true,
|
|
399
|
+
email: true,
|
|
400
|
+
name: true,
|
|
401
|
+
// Don't select sensitive fields
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
if (!user) {
|
|
406
|
+
return res.status(404).json({
|
|
407
|
+
error: 'User not found'
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
res.json(user);
|
|
412
|
+
});
|
|
413
|
+
\`\`\`
|
|
414
|
+
|
|
415
|
+
#### 3. Implement Request Validation with Zod
|
|
416
|
+
|
|
417
|
+
\`\`\`javascript
|
|
418
|
+
const { z } = require('zod');
|
|
419
|
+
|
|
420
|
+
// Define validation schema
|
|
421
|
+
const createUserSchema = z.object({
|
|
422
|
+
email: z.string().email('Invalid email format'),
|
|
423
|
+
password: z.string()
|
|
424
|
+
.min(8, 'Password must be at least 8 characters')
|
|
425
|
+
.regex(/[A-Z]/, 'Password must contain uppercase letter')
|
|
426
|
+
.regex(/[a-z]/, 'Password must contain lowercase letter')
|
|
427
|
+
.regex(/[0-9]/, 'Password must contain number'),
|
|
428
|
+
name: z.string()
|
|
429
|
+
.min(2, 'Name must be at least 2 characters')
|
|
430
|
+
.max(100, 'Name too long'),
|
|
431
|
+
age: z.number()
|
|
432
|
+
.int('Age must be an integer')
|
|
433
|
+
.min(18, 'Must be 18 or older')
|
|
434
|
+
.max(120, 'Invalid age')
|
|
435
|
+
.optional()
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
// Validation middleware
|
|
439
|
+
function validateRequest(schema) {
|
|
440
|
+
return (req, res, next) => {
|
|
441
|
+
try {
|
|
442
|
+
schema.parse(req.body);
|
|
443
|
+
next();
|
|
444
|
+
} catch (error) {
|
|
445
|
+
res.status(400).json({
|
|
446
|
+
error: 'Validation failed',
|
|
447
|
+
details: error.errors
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// Use validation
|
|
454
|
+
app.post('/api/users',
|
|
455
|
+
validateRequest(createUserSchema),
|
|
456
|
+
async (req, res) => {
|
|
457
|
+
// Input is validated at this point
|
|
458
|
+
const { email, password, name, age } = req.body;
|
|
459
|
+
|
|
460
|
+
// Hash password
|
|
461
|
+
const passwordHash = await bcrypt.hash(password, 10);
|
|
462
|
+
|
|
463
|
+
// Create user
|
|
464
|
+
const user = await prisma.user.create({
|
|
465
|
+
data: {
|
|
466
|
+
email,
|
|
467
|
+
passwordHash,
|
|
468
|
+
name,
|
|
469
|
+
age
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
// Don't return password hash
|
|
474
|
+
const { passwordHash: _, ...userWithoutPassword } = user;
|
|
475
|
+
res.status(201).json(userWithoutPassword);
|
|
476
|
+
}
|
|
477
|
+
);
|
|
478
|
+
\`\`\`
|
|
479
|
+
|
|
480
|
+
#### 4. Sanitize Output to Prevent XSS
|
|
481
|
+
|
|
482
|
+
\`\`\`javascript
|
|
483
|
+
const DOMPurify = require('isomorphic-dompurify');
|
|
484
|
+
|
|
485
|
+
app.post('/api/comments', authenticateToken, async (req, res) => {
|
|
486
|
+
const { content } = req.body;
|
|
487
|
+
|
|
488
|
+
// Validate
|
|
489
|
+
if (!content || content.length > 1000) {
|
|
490
|
+
return res.status(400).json({
|
|
491
|
+
error: 'Invalid comment content'
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// Sanitize HTML to prevent XSS
|
|
496
|
+
const sanitizedContent = DOMPurify.sanitize(content, {
|
|
497
|
+
ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'a'],
|
|
498
|
+
ALLOWED_ATTR: ['href']
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
const comment = await prisma.comment.create({
|
|
502
|
+
data: {
|
|
503
|
+
content: sanitizedContent,
|
|
504
|
+
userId: req.user.userId
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
|
|
508
|
+
res.status(201).json(comment);
|
|
509
|
+
});
|
|
510
|
+
\`\`\`
|
|
511
|
+
|
|
512
|
+
### Validation Checklist
|
|
513
|
+
|
|
514
|
+
- [ ] Validate all user inputs
|
|
515
|
+
- [ ] Use parameterized queries or ORM
|
|
516
|
+
- [ ] Validate data types (string, number, email, etc.)
|
|
517
|
+
- [ ] Validate data ranges (min/max length, value ranges)
|
|
518
|
+
- [ ] Sanitize HTML content
|
|
519
|
+
- [ ] Escape special characters
|
|
520
|
+
- [ ] Validate file uploads (type, size, content)
|
|
521
|
+
- [ ] Use allowlists, not blocklists
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
### Example 3: Rate Limiting and DDoS Protection
|
|
526
|
+
|
|
527
|
+
```markdown
|
|
528
|
+
## Implementing Rate Limiting
|
|
529
|
+
|
|
530
|
+
### Why Rate Limiting?
|
|
531
|
+
|
|
532
|
+
- Prevent brute force attacks
|
|
533
|
+
- Protect against DDoS
|
|
534
|
+
- Prevent API abuse
|
|
535
|
+
- Ensure fair usage
|
|
536
|
+
- Reduce server costs
|
|
537
|
+
|
|
538
|
+
### Implementation with Express Rate Limit
|
|
539
|
+
|
|
540
|
+
\`\`\`javascript
|
|
541
|
+
const rateLimit = require('express-rate-limit');
|
|
542
|
+
const RedisStore = require('rate-limit-redis');
|
|
543
|
+
const Redis = require('ioredis');
|
|
544
|
+
|
|
545
|
+
// Create Redis client
|
|
546
|
+
const redis = new Redis({
|
|
547
|
+
host: process.env.REDIS_HOST,
|
|
548
|
+
port: process.env.REDIS_PORT
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
// General API rate limit
|
|
552
|
+
const apiLimiter = rateLimit({
|
|
553
|
+
store: new RedisStore({
|
|
554
|
+
client: redis,
|
|
555
|
+
prefix: 'rl:api:'
|
|
556
|
+
}),
|
|
557
|
+
windowMs: 15 * 60 * 1000, // 15 minutes
|
|
558
|
+
max: 100, // 100 requests per window
|
|
559
|
+
message: {
|
|
560
|
+
error: 'Too many requests, please try again later',
|
|
561
|
+
retryAfter: 900 // seconds
|
|
562
|
+
},
|
|
563
|
+
standardHeaders: true, // Return rate limit info in headers
|
|
564
|
+
legacyHeaders: false,
|
|
565
|
+
// Custom key generator (by user ID or IP)
|
|
566
|
+
keyGenerator: (req) => {
|
|
567
|
+
return req.user?.userId || req.ip;
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
// Strict rate limit for authentication endpoints
|
|
572
|
+
const authLimiter = rateLimit({
|
|
573
|
+
store: new RedisStore({
|
|
574
|
+
client: redis,
|
|
575
|
+
prefix: 'rl:auth:'
|
|
576
|
+
}),
|
|
577
|
+
windowMs: 15 * 60 * 1000, // 15 minutes
|
|
578
|
+
max: 5, // Only 5 login attempts per 15 minutes
|
|
579
|
+
skipSuccessfulRequests: true, // Don't count successful logins
|
|
580
|
+
message: {
|
|
581
|
+
error: 'Too many login attempts, please try again later',
|
|
582
|
+
retryAfter: 900
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
// Apply rate limiters
|
|
587
|
+
app.use('/api/', apiLimiter);
|
|
588
|
+
app.use('/api/auth/login', authLimiter);
|
|
589
|
+
app.use('/api/auth/register', authLimiter);
|
|
590
|
+
|
|
591
|
+
// Custom rate limiter for expensive operations
|
|
592
|
+
const expensiveLimiter = rateLimit({
|
|
593
|
+
windowMs: 60 * 60 * 1000, // 1 hour
|
|
594
|
+
max: 10, // 10 requests per hour
|
|
595
|
+
message: {
|
|
596
|
+
error: 'Rate limit exceeded for this operation'
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
|
|
600
|
+
app.post('/api/reports/generate',
|
|
601
|
+
authenticateToken,
|
|
602
|
+
expensiveLimiter,
|
|
603
|
+
async (req, res) => {
|
|
604
|
+
// Expensive operation
|
|
605
|
+
}
|
|
606
|
+
);
|
|
607
|
+
\`\`\`
|
|
608
|
+
|
|
609
|
+
### Advanced: Per-User Rate Limiting
|
|
610
|
+
|
|
611
|
+
\`\`\`javascript
|
|
612
|
+
// Different limits based on user tier
|
|
613
|
+
function createTieredRateLimiter() {
|
|
614
|
+
const limits = {
|
|
615
|
+
free: { windowMs: 60 * 60 * 1000, max: 100 },
|
|
616
|
+
pro: { windowMs: 60 * 60 * 1000, max: 1000 },
|
|
617
|
+
enterprise: { windowMs: 60 * 60 * 1000, max: 10000 }
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
return async (req, res, next) => {
|
|
621
|
+
const user = req.user;
|
|
622
|
+
const tier = user?.tier || 'free';
|
|
623
|
+
const limit = limits[tier];
|
|
624
|
+
|
|
625
|
+
const key = \`rl:user:\${user.userId}\`;
|
|
626
|
+
const current = await redis.incr(key);
|
|
627
|
+
|
|
628
|
+
if (current === 1) {
|
|
629
|
+
await redis.expire(key, limit.windowMs / 1000);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if (current > limit.max) {
|
|
633
|
+
return res.status(429).json({
|
|
634
|
+
error: 'Rate limit exceeded',
|
|
635
|
+
limit: limit.max,
|
|
636
|
+
remaining: 0,
|
|
637
|
+
reset: await redis.ttl(key)
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
// Set rate limit headers
|
|
642
|
+
res.set({
|
|
643
|
+
'X-RateLimit-Limit': limit.max,
|
|
644
|
+
'X-RateLimit-Remaining': limit.max - current,
|
|
645
|
+
'X-RateLimit-Reset': await redis.ttl(key)
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
next();
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
app.use('/api/', authenticateToken, createTieredRateLimiter());
|
|
653
|
+
\`\`\`
|
|
654
|
+
|
|
655
|
+
### DDoS Protection with Helmet
|
|
656
|
+
|
|
657
|
+
\`\`\`javascript
|
|
658
|
+
const helmet = require('helmet');
|
|
659
|
+
|
|
660
|
+
app.use(helmet({
|
|
661
|
+
// Content Security Policy
|
|
662
|
+
contentSecurityPolicy: {
|
|
663
|
+
directives: {
|
|
664
|
+
defaultSrc: ["'self'"],
|
|
665
|
+
styleSrc: ["'self'", "'unsafe-inline'"],
|
|
666
|
+
scriptSrc: ["'self'"],
|
|
667
|
+
imgSrc: ["'self'", 'data:', 'https:']
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
// Prevent clickjacking
|
|
671
|
+
frameguard: { action: 'deny' },
|
|
672
|
+
// Hide X-Powered-By header
|
|
673
|
+
hidePoweredBy: true,
|
|
674
|
+
// Prevent MIME type sniffing
|
|
675
|
+
noSniff: true,
|
|
676
|
+
// Enable HSTS
|
|
677
|
+
hsts: {
|
|
678
|
+
maxAge: 31536000,
|
|
679
|
+
includeSubDomains: true,
|
|
680
|
+
preload: true
|
|
681
|
+
}
|
|
682
|
+
}));
|
|
683
|
+
\`\`\`
|
|
684
|
+
|
|
685
|
+
### Rate Limit Response Headers
|
|
686
|
+
|
|
687
|
+
\`\`\`
|
|
688
|
+
X-RateLimit-Limit: 100
|
|
689
|
+
X-RateLimit-Remaining: 87
|
|
690
|
+
X-RateLimit-Reset: 1640000000
|
|
691
|
+
Retry-After: 900
|
|
692
|
+
\`\`\`
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
## Best Practices
|
|
696
|
+
|
|
697
|
+
### ✅ Do This
|
|
698
|
+
|
|
699
|
+
- **Use HTTPS Everywhere** - Never send sensitive data over HTTP
|
|
700
|
+
- **Implement Authentication** - Require authentication for protected endpoints
|
|
701
|
+
- **Validate All Inputs** - Never trust user input
|
|
702
|
+
- **Use Parameterized Queries** - Prevent SQL injection
|
|
703
|
+
- **Implement Rate Limiting** - Protect against brute force and DDoS
|
|
704
|
+
- **Hash Passwords** - Use bcrypt with salt rounds >= 10
|
|
705
|
+
- **Use Short-Lived Tokens** - JWT access tokens should expire quickly
|
|
706
|
+
- **Implement CORS Properly** - Only allow trusted origins
|
|
707
|
+
- **Log Security Events** - Monitor for suspicious activity
|
|
708
|
+
- **Keep Dependencies Updated** - Regularly update packages
|
|
709
|
+
- **Use Security Headers** - Implement Helmet.js
|
|
710
|
+
- **Sanitize Error Messages** - Don't leak sensitive information
|
|
711
|
+
|
|
712
|
+
### ❌ Don't Do This
|
|
713
|
+
|
|
714
|
+
- **Don't Store Passwords in Plain Text** - Always hash passwords
|
|
715
|
+
- **Don't Use Weak Secrets** - Use strong, random JWT secrets
|
|
716
|
+
- **Don't Trust User Input** - Always validate and sanitize
|
|
717
|
+
- **Don't Expose Stack Traces** - Hide error details in production
|
|
718
|
+
- **Don't Use String Concatenation for SQL** - Use parameterized queries
|
|
719
|
+
- **Don't Store Sensitive Data in JWT** - JWTs are not encrypted
|
|
720
|
+
- **Don't Ignore Security Updates** - Update dependencies regularly
|
|
721
|
+
- **Don't Use Default Credentials** - Change all default passwords
|
|
722
|
+
- **Don't Disable CORS Completely** - Configure it properly instead
|
|
723
|
+
- **Don't Log Sensitive Data** - Sanitize logs
|
|
724
|
+
|
|
725
|
+
## Common Pitfalls
|
|
726
|
+
|
|
727
|
+
### Problem: JWT Secret Exposed in Code
|
|
728
|
+
**Symptoms:** JWT secret hardcoded or committed to Git
|
|
729
|
+
**Solution:**
|
|
730
|
+
\`\`\`javascript
|
|
731
|
+
// ❌ Bad
|
|
732
|
+
const JWT_SECRET = 'my-secret-key';
|
|
733
|
+
|
|
734
|
+
// ✅ Good
|
|
735
|
+
const JWT_SECRET = process.env.JWT_SECRET;
|
|
736
|
+
if (!JWT_SECRET) {
|
|
737
|
+
throw new Error('JWT_SECRET environment variable is required');
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
// Generate strong secret
|
|
741
|
+
// node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
|
|
742
|
+
\`\`\`
|
|
743
|
+
|
|
744
|
+
### Problem: Weak Password Requirements
|
|
745
|
+
**Symptoms:** Users can set weak passwords like "password123"
|
|
746
|
+
**Solution:**
|
|
747
|
+
\`\`\`javascript
|
|
748
|
+
const passwordSchema = z.string()
|
|
749
|
+
.min(12, 'Password must be at least 12 characters')
|
|
750
|
+
.regex(/[A-Z]/, 'Must contain uppercase letter')
|
|
751
|
+
.regex(/[a-z]/, 'Must contain lowercase letter')
|
|
752
|
+
.regex(/[0-9]/, 'Must contain number')
|
|
753
|
+
.regex(/[^A-Za-z0-9]/, 'Must contain special character');
|
|
754
|
+
|
|
755
|
+
// Or use a password strength library
|
|
756
|
+
const zxcvbn = require('zxcvbn');
|
|
757
|
+
const result = zxcvbn(password);
|
|
758
|
+
if (result.score < 3) {
|
|
759
|
+
return res.status(400).json({
|
|
760
|
+
error: 'Password too weak',
|
|
761
|
+
suggestions: result.feedback.suggestions
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
\`\`\`
|
|
765
|
+
|
|
766
|
+
### Problem: Missing Authorization Checks
|
|
767
|
+
**Symptoms:** Users can access resources they shouldn't
|
|
768
|
+
**Solution:**
|
|
769
|
+
\`\`\`javascript
|
|
770
|
+
// ❌ Bad: Only checks authentication
|
|
771
|
+
app.delete('/api/posts/:id', authenticateToken, async (req, res) => {
|
|
772
|
+
await prisma.post.delete({ where: { id: req.params.id } });
|
|
773
|
+
res.json({ success: true });
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
// ✅ Good: Checks both authentication and authorization
|
|
777
|
+
app.delete('/api/posts/:id', authenticateToken, async (req, res) => {
|
|
778
|
+
const post = await prisma.post.findUnique({
|
|
779
|
+
where: { id: req.params.id }
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
if (!post) {
|
|
783
|
+
return res.status(404).json({ error: 'Post not found' });
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
// Check if user owns the post or is admin
|
|
787
|
+
if (post.userId !== req.user.userId && req.user.role !== 'admin') {
|
|
788
|
+
return res.status(403).json({
|
|
789
|
+
error: 'Not authorized to delete this post'
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
await prisma.post.delete({ where: { id: req.params.id } });
|
|
794
|
+
res.json({ success: true });
|
|
795
|
+
});
|
|
796
|
+
\`\`\`
|
|
797
|
+
|
|
798
|
+
### Problem: Verbose Error Messages
|
|
799
|
+
**Symptoms:** Error messages reveal system details
|
|
800
|
+
**Solution:**
|
|
801
|
+
\`\`\`javascript
|
|
802
|
+
// ❌ Bad: Exposes database details
|
|
803
|
+
app.post('/api/users', async (req, res) => {
|
|
804
|
+
try {
|
|
805
|
+
const user = await prisma.user.create({ data: req.body });
|
|
806
|
+
res.json(user);
|
|
807
|
+
} catch (error) {
|
|
808
|
+
res.status(500).json({ error: error.message });
|
|
809
|
+
// Error: "Unique constraint failed on the fields: (`email`)"
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
|
|
813
|
+
// ✅ Good: Generic error message
|
|
814
|
+
app.post('/api/users', async (req, res) => {
|
|
815
|
+
try {
|
|
816
|
+
const user = await prisma.user.create({ data: req.body });
|
|
817
|
+
res.json(user);
|
|
818
|
+
} catch (error) {
|
|
819
|
+
console.error('User creation error:', error); // Log full error
|
|
820
|
+
|
|
821
|
+
if (error.code === 'P2002') {
|
|
822
|
+
return res.status(400).json({
|
|
823
|
+
error: 'Email already exists'
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
res.status(500).json({
|
|
828
|
+
error: 'An error occurred while creating user'
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
});
|
|
832
|
+
\`\`\`
|
|
833
|
+
|
|
834
|
+
## Security Checklist
|
|
835
|
+
|
|
836
|
+
### Authentication & Authorization
|
|
837
|
+
- [ ] Implement strong authentication (JWT, OAuth 2.0)
|
|
838
|
+
- [ ] Use HTTPS for all endpoints
|
|
839
|
+
- [ ] Hash passwords with bcrypt (salt rounds >= 10)
|
|
840
|
+
- [ ] Implement token expiration
|
|
841
|
+
- [ ] Add refresh token mechanism
|
|
842
|
+
- [ ] Verify user authorization for each request
|
|
843
|
+
- [ ] Implement role-based access control (RBAC)
|
|
844
|
+
|
|
845
|
+
### Input Validation
|
|
846
|
+
- [ ] Validate all user inputs
|
|
847
|
+
- [ ] Use parameterized queries or ORM
|
|
848
|
+
- [ ] Sanitize HTML content
|
|
849
|
+
- [ ] Validate file uploads
|
|
850
|
+
- [ ] Implement request schema validation
|
|
851
|
+
- [ ] Use allowlists, not blocklists
|
|
852
|
+
|
|
853
|
+
### Rate Limiting & DDoS Protection
|
|
854
|
+
- [ ] Implement rate limiting per user/IP
|
|
855
|
+
- [ ] Add stricter limits for auth endpoints
|
|
856
|
+
- [ ] Use Redis for distributed rate limiting
|
|
857
|
+
- [ ] Return proper rate limit headers
|
|
858
|
+
- [ ] Implement request throttling
|
|
859
|
+
|
|
860
|
+
### Data Protection
|
|
861
|
+
- [ ] Use HTTPS/TLS for all traffic
|
|
862
|
+
- [ ] Encrypt sensitive data at rest
|
|
863
|
+
- [ ] Don't store sensitive data in JWT
|
|
864
|
+
- [ ] Sanitize error messages
|
|
865
|
+
- [ ] Implement proper CORS configuration
|
|
866
|
+
- [ ] Use security headers (Helmet.js)
|
|
867
|
+
|
|
868
|
+
### Monitoring & Logging
|
|
869
|
+
- [ ] Log security events
|
|
870
|
+
- [ ] Monitor for suspicious activity
|
|
871
|
+
- [ ] Set up alerts for failed auth attempts
|
|
872
|
+
- [ ] Track API usage patterns
|
|
873
|
+
- [ ] Don't log sensitive data
|
|
874
|
+
|
|
875
|
+
## OWASP API Security Top 10
|
|
876
|
+
|
|
877
|
+
1. **Broken Object Level Authorization** - Always verify user can access resource
|
|
878
|
+
2. **Broken Authentication** - Implement strong authentication mechanisms
|
|
879
|
+
3. **Broken Object Property Level Authorization** - Validate which properties user can access
|
|
880
|
+
4. **Unrestricted Resource Consumption** - Implement rate limiting and quotas
|
|
881
|
+
5. **Broken Function Level Authorization** - Verify user role for each function
|
|
882
|
+
6. **Unrestricted Access to Sensitive Business Flows** - Protect critical workflows
|
|
883
|
+
7. **Server Side Request Forgery (SSRF)** - Validate and sanitize URLs
|
|
884
|
+
8. **Security Misconfiguration** - Use security best practices and headers
|
|
885
|
+
9. **Improper Inventory Management** - Document and secure all API endpoints
|
|
886
|
+
10. **Unsafe Consumption of APIs** - Validate data from third-party APIs
|
|
887
|
+
|
|
888
|
+
## Related Skills
|
|
889
|
+
|
|
890
|
+
- `@ethical-hacking-methodology` - Security testing perspective
|
|
891
|
+
- `@sql-injection-testing` - Testing for SQL injection
|
|
892
|
+
- `@xss-html-injection` - Testing for XSS vulnerabilities
|
|
893
|
+
- `@broken-authentication` - Authentication vulnerabilities
|
|
894
|
+
- `@backend-dev-guidelines` - Backend development standards
|
|
895
|
+
- `@systematic-debugging` - Debug security issues
|
|
896
|
+
|
|
897
|
+
## Additional Resources
|
|
898
|
+
|
|
899
|
+
- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)
|
|
900
|
+
- [JWT Best Practices](https://tools.ietf.org/html/rfc8725)
|
|
901
|
+
- [Express Security Best Practices](https://expressjs.com/en/advanced/best-practice-security.html)
|
|
902
|
+
- [Node.js Security Checklist](https://blog.risingstack.com/node-js-security-checklist/)
|
|
903
|
+
- [API Security Checklist](https://github.com/shieldfy/API-Security-Checklist)
|
|
904
|
+
|
|
905
|
+
---
|
|
906
|
+
|
|
907
|
+
**Pro Tip:** Security is not a one-time task - regularly audit your APIs, keep dependencies updated, and stay informed about new vulnerabilities!
|