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,136 @@
|
|
|
1
|
+
import { Injectable, effect, signal, PLATFORM_ID, inject } from '@angular/core';
|
|
2
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
3
|
+
|
|
4
|
+
export type Theme = 'light' | 'dark' | 'auto';
|
|
5
|
+
export type AppliedTheme = 'light' | 'dark';
|
|
6
|
+
|
|
7
|
+
@Injectable({
|
|
8
|
+
providedIn: 'root',
|
|
9
|
+
})
|
|
10
|
+
export class ThemeService {
|
|
11
|
+
private readonly platformId = inject(PLATFORM_ID);
|
|
12
|
+
private readonly isBrowser = isPlatformBrowser(this.platformId);
|
|
13
|
+
private readonly STORAGE_KEY = 'theme-preference';
|
|
14
|
+
private mediaQueryList?: MediaQueryList;
|
|
15
|
+
|
|
16
|
+
private readonly _theme = signal<Theme>(this.getInitialTheme());
|
|
17
|
+
readonly theme = this._theme.asReadonly();
|
|
18
|
+
|
|
19
|
+
private readonly _appliedTheme = signal<AppliedTheme>('light');
|
|
20
|
+
readonly appliedTheme = this._appliedTheme.asReadonly();
|
|
21
|
+
|
|
22
|
+
constructor() {
|
|
23
|
+
// Initialize applied theme
|
|
24
|
+
this.updateAppliedTheme();
|
|
25
|
+
|
|
26
|
+
// Apply theme immediately on initialization
|
|
27
|
+
if (this.isBrowser) {
|
|
28
|
+
const initialAppliedTheme = this._appliedTheme();
|
|
29
|
+
console.log('Initial theme application:', initialAppliedTheme);
|
|
30
|
+
this.applyThemeToDOM(initialAppliedTheme);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Apply theme changes to document element
|
|
34
|
+
effect(() => {
|
|
35
|
+
if (this.isBrowser) {
|
|
36
|
+
const applied = this._appliedTheme();
|
|
37
|
+
console.log('Effect: Applying theme:', applied);
|
|
38
|
+
this.applyThemeToDOM(applied);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// Listen for system theme changes when in auto mode
|
|
43
|
+
if (this.isBrowser) {
|
|
44
|
+
this.setupSystemThemeListener();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
private getInitialTheme(): Theme {
|
|
49
|
+
if (!this.isBrowser) {
|
|
50
|
+
return 'light';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Check localStorage first
|
|
54
|
+
const stored = localStorage.getItem(this.STORAGE_KEY) as Theme | null;
|
|
55
|
+
if (stored === 'light' || stored === 'dark' || stored === 'auto') {
|
|
56
|
+
console.log('Loaded theme from localStorage:', stored);
|
|
57
|
+
return stored;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Default to light for predictable behavior
|
|
61
|
+
console.log('No stored theme, defaulting to light');
|
|
62
|
+
return 'light';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
private getSystemTheme(): AppliedTheme {
|
|
66
|
+
if (!this.isBrowser) {
|
|
67
|
+
return 'light';
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
71
|
+
return 'dark';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return 'light';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private setupSystemThemeListener(): void {
|
|
78
|
+
this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');
|
|
79
|
+
|
|
80
|
+
// Listen for changes in system theme preference
|
|
81
|
+
this.mediaQueryList.addEventListener('change', (e) => {
|
|
82
|
+
if (this._theme() === 'auto') {
|
|
83
|
+
console.log('System theme changed:', e.matches ? 'dark' : 'light');
|
|
84
|
+
this._appliedTheme.set(e.matches ? 'dark' : 'light');
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
private applyThemeToDOM(theme: AppliedTheme): void {
|
|
90
|
+
const root = document.documentElement;
|
|
91
|
+
console.log('applyThemeToDOM called with:', theme);
|
|
92
|
+
console.log('Current classList:', root.classList.toString());
|
|
93
|
+
|
|
94
|
+
if (theme === 'dark') {
|
|
95
|
+
root.classList.add('dark');
|
|
96
|
+
console.log('Added dark class. New classList:', root.classList.toString());
|
|
97
|
+
} else {
|
|
98
|
+
root.classList.remove('dark');
|
|
99
|
+
console.log('Removed dark class. New classList:', root.classList.toString());
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
private updateAppliedTheme(): void {
|
|
104
|
+
const currentTheme = this._theme();
|
|
105
|
+
|
|
106
|
+
if (currentTheme === 'auto') {
|
|
107
|
+
this._appliedTheme.set(this.getSystemTheme());
|
|
108
|
+
} else {
|
|
109
|
+
this._appliedTheme.set(currentTheme);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
setTheme(theme: Theme): void {
|
|
114
|
+
console.log('setTheme called with:', theme);
|
|
115
|
+
this._theme.set(theme);
|
|
116
|
+
|
|
117
|
+
// Update applied theme based on selection
|
|
118
|
+
if (theme === 'auto') {
|
|
119
|
+
this._appliedTheme.set(this.getSystemTheme());
|
|
120
|
+
} else {
|
|
121
|
+
this._appliedTheme.set(theme);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (this.isBrowser) {
|
|
125
|
+
localStorage.setItem(this.STORAGE_KEY, theme);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
toggleTheme(): void {
|
|
130
|
+
// Toggle only cycles between light and dark
|
|
131
|
+
const currentApplied = this._appliedTheme();
|
|
132
|
+
const newTheme = currentApplied === 'light' ? 'dark' : 'light';
|
|
133
|
+
console.log('toggleTheme: switching from', currentApplied, 'to', newTheme);
|
|
134
|
+
this.setTheme(newTheme);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Routes } from '@angular/router';
|
|
2
|
+
|
|
3
|
+
export const ADMIN_ROUTES: Routes = [
|
|
4
|
+
{
|
|
5
|
+
path: '',
|
|
6
|
+
redirectTo: 'users',
|
|
7
|
+
pathMatch: 'full',
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
path: 'users',
|
|
11
|
+
loadComponent: () => import('./users/pages/user-list.page').then((m) => m.UserListPage),
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
path: 'users/new',
|
|
15
|
+
loadComponent: () => import('./users/pages/user-form.page').then((m) => m.UserFormPage),
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
path: 'users/:id/edit',
|
|
19
|
+
loadComponent: () => import('./users/pages/user-form.page').then((m) => m.UserFormPage),
|
|
20
|
+
},
|
|
21
|
+
];
|
package/templates/frontend/angular-base/src/app/features/admin/users/models/admin-user.model.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { UserRole } from '@features/auth/models/auth.model';
|
|
2
|
+
|
|
3
|
+
export enum UserStatus {
|
|
4
|
+
Active = 'active',
|
|
5
|
+
Inactive = 'inactive',
|
|
6
|
+
Suspended = 'suspended',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface AdminUser {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
email: string;
|
|
13
|
+
phone?: string;
|
|
14
|
+
role: UserRole;
|
|
15
|
+
status: UserStatus;
|
|
16
|
+
lastLogin?: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
permissions?: string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface AdminUserFilters {
|
|
22
|
+
search?: string;
|
|
23
|
+
role?: UserRole | null;
|
|
24
|
+
status?: UserStatus | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface AdminUserStats {
|
|
28
|
+
total: number;
|
|
29
|
+
admins: number;
|
|
30
|
+
users: number;
|
|
31
|
+
active: number;
|
|
32
|
+
}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy, inject, signal, OnInit } from '@angular/core';
|
|
2
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
3
|
+
import { FormBuilder, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { UserRole } from '@features/auth/models/auth.model';
|
|
5
|
+
import { AdminUserService } from '../services/admin-user.service';
|
|
6
|
+
import { AdminUser, UserStatus } from '../models/admin-user.model';
|
|
7
|
+
import { CardComponent } from '@shared/components/card/card.component';
|
|
8
|
+
import { ButtonComponent } from '@shared/components/button/button.component';
|
|
9
|
+
import { ToggleComponent } from '@shared/components/toggle/toggle.component';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'app-user-form-page',
|
|
13
|
+
imports: [ReactiveFormsModule, CardComponent, ButtonComponent, ToggleComponent],
|
|
14
|
+
providers: [AdminUserService],
|
|
15
|
+
template: `
|
|
16
|
+
<div class="max-w-4xl mx-auto px-4 py-8">
|
|
17
|
+
<div class="mb-8">
|
|
18
|
+
<h1 class="text-3xl font-bold text-gray-900 dark:text-white">
|
|
19
|
+
{{ isEditMode() ? 'Edit User' : 'New User' }}
|
|
20
|
+
</h1>
|
|
21
|
+
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
|
22
|
+
{{ isEditMode() ? 'Update user information and permissions' : 'Add a new user to the system' }}
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<form [formGroup]="userForm" (ngSubmit)="onSubmit()" class="space-y-6">
|
|
27
|
+
<!-- Basic Information -->
|
|
28
|
+
<app-card title="Basic Information">
|
|
29
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
30
|
+
<div>
|
|
31
|
+
<label for="name" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
|
32
|
+
Full Name *
|
|
33
|
+
</label>
|
|
34
|
+
<input
|
|
35
|
+
id="name"
|
|
36
|
+
type="text"
|
|
37
|
+
formControlName="name"
|
|
38
|
+
class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white"
|
|
39
|
+
placeholder="John Doe"
|
|
40
|
+
/>
|
|
41
|
+
@if (userForm.get('name')?.invalid && userForm.get('name')?.touched) {
|
|
42
|
+
<p class="mt-1 text-sm text-red-600 dark:text-red-400">Name is required</p>
|
|
43
|
+
}
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div>
|
|
47
|
+
<label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
|
48
|
+
Email *
|
|
49
|
+
</label>
|
|
50
|
+
<input
|
|
51
|
+
id="email"
|
|
52
|
+
type="email"
|
|
53
|
+
formControlName="email"
|
|
54
|
+
class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white"
|
|
55
|
+
placeholder="john@example.com"
|
|
56
|
+
/>
|
|
57
|
+
@if (userForm.get('email')?.invalid && userForm.get('email')?.touched) {
|
|
58
|
+
<p class="mt-1 text-sm text-red-600 dark:text-red-400">
|
|
59
|
+
Valid email is required
|
|
60
|
+
</p>
|
|
61
|
+
}
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div class="md:col-span-2">
|
|
65
|
+
<label for="phone" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
|
66
|
+
Phone
|
|
67
|
+
</label>
|
|
68
|
+
<input
|
|
69
|
+
id="phone"
|
|
70
|
+
type="tel"
|
|
71
|
+
formControlName="phone"
|
|
72
|
+
class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white"
|
|
73
|
+
placeholder="+54 11 1234-5678"
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</app-card>
|
|
78
|
+
|
|
79
|
+
<!-- Role and Permissions -->
|
|
80
|
+
<app-card title="Role and Permissions">
|
|
81
|
+
<div class="space-y-6">
|
|
82
|
+
<div>
|
|
83
|
+
<label for="role" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
|
84
|
+
Role *
|
|
85
|
+
</label>
|
|
86
|
+
<select
|
|
87
|
+
id="role"
|
|
88
|
+
formControlName="role"
|
|
89
|
+
class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white"
|
|
90
|
+
>
|
|
91
|
+
<option [value]="UserRole.SuperAdmin">Super Admin</option>
|
|
92
|
+
<option [value]="UserRole.Admin">Admin</option>
|
|
93
|
+
<option [value]="UserRole.User">User</option>
|
|
94
|
+
<option [value]="UserRole.Viewer">Viewer</option>
|
|
95
|
+
</select>
|
|
96
|
+
<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">
|
|
97
|
+
{{ getRoleDescription(userForm.get('role')?.value) }}
|
|
98
|
+
</p>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<div>
|
|
102
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-3">
|
|
103
|
+
Status
|
|
104
|
+
</label>
|
|
105
|
+
<select
|
|
106
|
+
formControlName="status"
|
|
107
|
+
class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white"
|
|
108
|
+
>
|
|
109
|
+
<option [value]="UserStatus.Active">Active</option>
|
|
110
|
+
<option [value]="UserStatus.Inactive">Inactive</option>
|
|
111
|
+
<option [value]="UserStatus.Suspended">Suspended</option>
|
|
112
|
+
</select>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
@if (!isEditMode()) {
|
|
116
|
+
<div>
|
|
117
|
+
<app-toggle
|
|
118
|
+
formControlName="sendInvitation"
|
|
119
|
+
label="Send invitation email"
|
|
120
|
+
/>
|
|
121
|
+
<p class="ml-14 mt-1 text-xs text-gray-500 dark:text-gray-400">
|
|
122
|
+
An email will be sent to the user with login instructions
|
|
123
|
+
</p>
|
|
124
|
+
</div>
|
|
125
|
+
}
|
|
126
|
+
</div>
|
|
127
|
+
</app-card>
|
|
128
|
+
|
|
129
|
+
@if (successMessage()) {
|
|
130
|
+
<div class="p-4 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-md">
|
|
131
|
+
<p class="text-sm text-green-800 dark:text-green-200">{{ successMessage() }}</p>
|
|
132
|
+
</div>
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@if (errorMessage()) {
|
|
136
|
+
<div class="p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-md">
|
|
137
|
+
<p class="text-sm text-red-800 dark:text-red-200">{{ errorMessage() }}</p>
|
|
138
|
+
</div>
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
<div class="flex justify-end space-x-4">
|
|
142
|
+
<app-button
|
|
143
|
+
type="button"
|
|
144
|
+
variant="outline"
|
|
145
|
+
(clicked)="onCancel()"
|
|
146
|
+
[disabled]="isLoading()"
|
|
147
|
+
>
|
|
148
|
+
Cancel
|
|
149
|
+
</app-button>
|
|
150
|
+
<app-button
|
|
151
|
+
type="submit"
|
|
152
|
+
variant="primary"
|
|
153
|
+
[disabled]="userForm.invalid || isLoading()"
|
|
154
|
+
>
|
|
155
|
+
{{ isLoading() ? 'Saving...' : isEditMode() ? 'Update User' : 'Create User' }}
|
|
156
|
+
</app-button>
|
|
157
|
+
</div>
|
|
158
|
+
</form>
|
|
159
|
+
</div>
|
|
160
|
+
`,
|
|
161
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
162
|
+
})
|
|
163
|
+
export class UserFormPage implements OnInit {
|
|
164
|
+
private readonly adminUserService = inject(AdminUserService);
|
|
165
|
+
private readonly router = inject(Router);
|
|
166
|
+
private readonly route = inject(ActivatedRoute);
|
|
167
|
+
private readonly fb = inject(FormBuilder);
|
|
168
|
+
|
|
169
|
+
protected readonly isLoading = signal(false);
|
|
170
|
+
protected readonly successMessage = signal('');
|
|
171
|
+
protected readonly errorMessage = signal('');
|
|
172
|
+
protected readonly isEditMode = signal(false);
|
|
173
|
+
protected readonly UserRole = UserRole;
|
|
174
|
+
protected readonly UserStatus = UserStatus;
|
|
175
|
+
|
|
176
|
+
private userId?: string;
|
|
177
|
+
|
|
178
|
+
protected userForm: FormGroup = this.fb.group({
|
|
179
|
+
name: ['', [Validators.required]],
|
|
180
|
+
email: ['', [Validators.required, Validators.email]],
|
|
181
|
+
phone: [''],
|
|
182
|
+
role: [UserRole.User, [Validators.required]],
|
|
183
|
+
status: [UserStatus.Active, [Validators.required]],
|
|
184
|
+
sendInvitation: [true],
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
ngOnInit(): void {
|
|
188
|
+
this.userId = this.route.snapshot.paramMap.get('id') || undefined;
|
|
189
|
+
|
|
190
|
+
if (this.userId && this.userId !== 'new') {
|
|
191
|
+
this.isEditMode.set(true);
|
|
192
|
+
this.loadUser(this.userId);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
private loadUser(id: string): void {
|
|
197
|
+
this.isLoading.set(true);
|
|
198
|
+
this.adminUserService.getUserById(id).subscribe({
|
|
199
|
+
next: (user) => {
|
|
200
|
+
if (user) {
|
|
201
|
+
this.userForm.patchValue(user);
|
|
202
|
+
}
|
|
203
|
+
this.isLoading.set(false);
|
|
204
|
+
},
|
|
205
|
+
error: () => {
|
|
206
|
+
this.errorMessage.set('Error loading user');
|
|
207
|
+
this.isLoading.set(false);
|
|
208
|
+
},
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
protected onSubmit(): void {
|
|
213
|
+
if (this.userForm.invalid) {
|
|
214
|
+
this.userForm.markAllAsTouched();
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
this.isLoading.set(true);
|
|
219
|
+
this.successMessage.set('');
|
|
220
|
+
this.errorMessage.set('');
|
|
221
|
+
|
|
222
|
+
const formValue = this.userForm.value;
|
|
223
|
+
|
|
224
|
+
if (this.isEditMode() && this.userId) {
|
|
225
|
+
this.adminUserService.updateUser(this.userId, formValue).subscribe({
|
|
226
|
+
next: () => {
|
|
227
|
+
this.isLoading.set(false);
|
|
228
|
+
this.successMessage.set('User updated successfully');
|
|
229
|
+
setTimeout(() => {
|
|
230
|
+
this.router.navigate(['/admin/users']);
|
|
231
|
+
}, 1000);
|
|
232
|
+
},
|
|
233
|
+
error: () => {
|
|
234
|
+
this.isLoading.set(false);
|
|
235
|
+
this.errorMessage.set('Error updating user');
|
|
236
|
+
},
|
|
237
|
+
});
|
|
238
|
+
} else {
|
|
239
|
+
this.adminUserService.createUser(formValue).subscribe({
|
|
240
|
+
next: () => {
|
|
241
|
+
this.isLoading.set(false);
|
|
242
|
+
this.successMessage.set('User created successfully');
|
|
243
|
+
|
|
244
|
+
if (formValue.sendInvitation) {
|
|
245
|
+
console.log('Invitation email sent to:', formValue.email);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
setTimeout(() => {
|
|
249
|
+
this.router.navigate(['/admin/users']);
|
|
250
|
+
}, 1000);
|
|
251
|
+
},
|
|
252
|
+
error: () => {
|
|
253
|
+
this.isLoading.set(false);
|
|
254
|
+
this.errorMessage.set('Error creating user');
|
|
255
|
+
},
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
protected onCancel(): void {
|
|
261
|
+
if (this.userForm.dirty) {
|
|
262
|
+
if (confirm('You have unsaved changes. Are you sure you want to leave?')) {
|
|
263
|
+
this.router.navigate(['/admin/users']);
|
|
264
|
+
}
|
|
265
|
+
} else {
|
|
266
|
+
this.router.navigate(['/admin/users']);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
protected getRoleDescription(role: UserRole): string {
|
|
271
|
+
const descriptions = {
|
|
272
|
+
[UserRole.SuperAdmin]: 'Full system access with all permissions',
|
|
273
|
+
[UserRole.Admin]: 'Can manage users, customers, and view reports',
|
|
274
|
+
[UserRole.User]: 'Can view and edit customers, view reports',
|
|
275
|
+
[UserRole.Viewer]: 'Read-only access to customers and reports',
|
|
276
|
+
};
|
|
277
|
+
return descriptions[role] || '';
|
|
278
|
+
}
|
|
279
|
+
}
|