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,1348 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Comprehensive React Native and Expo development rules covering performance optimization, testing, code style, and best practices.
|
|
3
|
+
globs:
|
|
4
|
+
- "**/*.ts"
|
|
5
|
+
- "**/*.tsx"
|
|
6
|
+
- "**/*.js"
|
|
7
|
+
- "**/*.jsx"
|
|
8
|
+
alwaysApply: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# React Native & Expo Development Rules
|
|
12
|
+
|
|
13
|
+
This document provides comprehensive guidelines for developing high-quality React Native and Expo applications. Rules are organized by priority and impact level to help you focus on what matters most.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Table of Contents
|
|
18
|
+
|
|
19
|
+
1. [Performance Optimization](#performance-optimization)
|
|
20
|
+
- [Eliminating Waterfalls (CRITICAL)](#eliminating-waterfalls-critical)
|
|
21
|
+
- [Bundle Optimization (CRITICAL)](#bundle-optimization-critical)
|
|
22
|
+
- [List Performance (HIGH)](#list-performance-high)
|
|
23
|
+
- [Re-render Prevention (MEDIUM)](#re-render-prevention-medium)
|
|
24
|
+
- [Memory Management (MEDIUM)](#memory-management-medium)
|
|
25
|
+
- [Animation Performance (MEDIUM)](#animation-performance-medium)
|
|
26
|
+
2. [Code Style & Structure](#code-style--structure)
|
|
27
|
+
3. [TypeScript Usage](#typescript-usage)
|
|
28
|
+
4. [Testing Guidelines](#testing-guidelines)
|
|
29
|
+
5. [Code Optimization & Maintenance](#code-optimization--maintenance)
|
|
30
|
+
6. [Commit & Workflow Guidelines](#commit--workflow-guidelines)
|
|
31
|
+
7. [UI & Styling](#ui--styling)
|
|
32
|
+
8. [Security & Best Practices](#security--best-practices)
|
|
33
|
+
9. [Common Pitfalls to Avoid](#common-pitfalls-to-avoid)
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Performance Optimization
|
|
38
|
+
|
|
39
|
+
### Eliminating Waterfalls (CRITICAL)
|
|
40
|
+
|
|
41
|
+
Sequential async operations that could run in parallel cause waterfall performance issues and slow down your app significantly.
|
|
42
|
+
|
|
43
|
+
#### Rule 1.1: Defer Await Until Needed
|
|
44
|
+
|
|
45
|
+
Move `await` operations into branches where the data is actually needed.
|
|
46
|
+
|
|
47
|
+
**❌ Incorrect:**
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
async function handleUserAction(userId: string, skipProcessing: boolean) {
|
|
51
|
+
const userData = await fetchUserData(userId);
|
|
52
|
+
if (skipProcessing) {
|
|
53
|
+
return { skipped: true };
|
|
54
|
+
}
|
|
55
|
+
return processUserData(userData);
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**✅ Correct:**
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
async function handleUserAction(userId: string, skipProcessing: boolean) {
|
|
63
|
+
if (skipProcessing) {
|
|
64
|
+
return { skipped: true };
|
|
65
|
+
}
|
|
66
|
+
const userData = await fetchUserData(userId);
|
|
67
|
+
return processUserData(userData);
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Rule 1.2: Parallel Data Fetching
|
|
72
|
+
|
|
73
|
+
Use `Promise.all` for independent async operations instead of sequential awaits.
|
|
74
|
+
|
|
75
|
+
**❌ Incorrect:**
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
async function loadScreenData(userId: string) {
|
|
79
|
+
const user = await getUser(userId);
|
|
80
|
+
const preferences = await getPreferences(userId);
|
|
81
|
+
const notifications = await getNotifications(userId);
|
|
82
|
+
return { user, preferences, notifications };
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**✅ Correct:**
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
async function loadScreenData(userId: string) {
|
|
90
|
+
const [user, preferences, notifications] = await Promise.all([
|
|
91
|
+
getUser(userId),
|
|
92
|
+
getPreferences(userId),
|
|
93
|
+
getNotifications(userId),
|
|
94
|
+
]);
|
|
95
|
+
return { user, preferences, notifications };
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
#### Rule 1.3: Start Promises Before Await
|
|
100
|
+
|
|
101
|
+
When you need results at different times, start all promises first, then await as needed.
|
|
102
|
+
|
|
103
|
+
**❌ Incorrect:**
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
async function processOrder(orderId: string) {
|
|
107
|
+
const order = await getOrder(orderId);
|
|
108
|
+
validateOrder(order);
|
|
109
|
+
const inventory = await checkInventory(order.items);
|
|
110
|
+
return { order, inventory };
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**✅ Correct:**
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
async function processOrder(orderId: string) {
|
|
118
|
+
const orderPromise = getOrder(orderId);
|
|
119
|
+
const inventoryPromise = orderPromise.then((o) => checkInventory(o.items));
|
|
120
|
+
|
|
121
|
+
const order = await orderPromise;
|
|
122
|
+
validateOrder(order);
|
|
123
|
+
const inventory = await inventoryPromise;
|
|
124
|
+
return { order, inventory };
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### Bundle Optimization (CRITICAL)
|
|
131
|
+
|
|
132
|
+
Import patterns significantly affect bundle size and startup time on mobile devices.
|
|
133
|
+
|
|
134
|
+
#### Rule 2.1: Avoid Barrel File Imports
|
|
135
|
+
|
|
136
|
+
Barrel files (`index.ts` that re-export) prevent proper tree shaking and increase bundle size.
|
|
137
|
+
|
|
138
|
+
**❌ Incorrect:**
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
// Imports entire components directory
|
|
142
|
+
import { Button, Text, Card } from '@/components';
|
|
143
|
+
import { formatDate, formatCurrency } from '@/utils';
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**✅ Correct:**
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
// Direct imports enable tree shaking
|
|
150
|
+
import { Button } from '@/components/Button';
|
|
151
|
+
import { Text } from '@/components/Text';
|
|
152
|
+
import { Card } from '@/components/Card';
|
|
153
|
+
import { formatDate } from '@/utils/formatDate';
|
|
154
|
+
import { formatCurrency } from '@/utils/formatCurrency';
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
#### Rule 2.2: Lazy Load Heavy Components
|
|
158
|
+
|
|
159
|
+
Use `React.lazy` for screens and heavy components not needed immediately.
|
|
160
|
+
|
|
161
|
+
**❌ Incorrect:**
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
import SettingsScreen from './screens/Settings';
|
|
165
|
+
import ProfileScreen from './screens/Profile';
|
|
166
|
+
import AnalyticsScreen from './screens/Analytics';
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**✅ Correct:**
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
import { lazy } from 'react';
|
|
173
|
+
|
|
174
|
+
const SettingsScreen = lazy(() => import('./screens/Settings'));
|
|
175
|
+
const ProfileScreen = lazy(() => import('./screens/Profile'));
|
|
176
|
+
const AnalyticsScreen = lazy(() => import('./screens/Analytics'));
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### Rule 2.3: Conditional Requires for Platform Features
|
|
180
|
+
|
|
181
|
+
Use `require()` for features only needed on certain platforms or conditions.
|
|
182
|
+
|
|
183
|
+
**❌ Incorrect:**
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
import * as ImagePicker from 'expo-image-picker';
|
|
187
|
+
import * as Camera from 'expo-camera';
|
|
188
|
+
|
|
189
|
+
function PhotoButton({ useCamera }: Props) {
|
|
190
|
+
const handler = useCamera
|
|
191
|
+
? Camera.takePicture
|
|
192
|
+
: ImagePicker.launchImageLibrary;
|
|
193
|
+
// ...
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**✅ Correct:**
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
function PhotoButton({ useCamera }: Props) {
|
|
201
|
+
const handler = useCamera
|
|
202
|
+
? require('expo-camera').takePicture
|
|
203
|
+
: require('expo-image-picker').launchImageLibraryAsync;
|
|
204
|
+
// ...
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
### List Performance (HIGH)
|
|
211
|
+
|
|
212
|
+
List rendering is critical for mobile performance. Wrong patterns cause jank and memory issues.
|
|
213
|
+
|
|
214
|
+
#### Rule 3.1: Always Use FlatList for Dynamic Lists
|
|
215
|
+
|
|
216
|
+
Never use `ScrollView` with `.map()` for lists that could grow.
|
|
217
|
+
|
|
218
|
+
**❌ Incorrect:**
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
<ScrollView>
|
|
222
|
+
{items.map(item => (
|
|
223
|
+
<ItemCard key={item.id} item={item} />
|
|
224
|
+
))}
|
|
225
|
+
</ScrollView>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**✅ Correct:**
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
<FlatList
|
|
232
|
+
data={items}
|
|
233
|
+
renderItem={({ item }) => <ItemCard item={item} />}
|
|
234
|
+
keyExtractor={item => item.id}
|
|
235
|
+
removeClippedSubviews={true}
|
|
236
|
+
maxToRenderPerBatch={10}
|
|
237
|
+
windowSize={5}
|
|
238
|
+
initialNumToRender={10}
|
|
239
|
+
/>
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
#### Rule 3.2: Memoize renderItem Components
|
|
243
|
+
|
|
244
|
+
List item components should be memoized to prevent unnecessary re-renders.
|
|
245
|
+
|
|
246
|
+
**❌ Incorrect:**
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
const ItemCard = ({ item }: Props) => (
|
|
250
|
+
<View>
|
|
251
|
+
<Text>{item.title}</Text>
|
|
252
|
+
</View>
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
<FlatList
|
|
256
|
+
data={items}
|
|
257
|
+
renderItem={({ item }) => <ItemCard item={item} />}
|
|
258
|
+
/>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**✅ Correct:**
|
|
262
|
+
|
|
263
|
+
```typescript
|
|
264
|
+
const ItemCard = memo(({ item }: Props) => (
|
|
265
|
+
<View>
|
|
266
|
+
<Text>{item.title}</Text>
|
|
267
|
+
</View>
|
|
268
|
+
));
|
|
269
|
+
|
|
270
|
+
const renderItem = useCallback(
|
|
271
|
+
({ item }) => <ItemCard item={item} />,
|
|
272
|
+
[]
|
|
273
|
+
);
|
|
274
|
+
|
|
275
|
+
<FlatList
|
|
276
|
+
data={items}
|
|
277
|
+
renderItem={renderItem}
|
|
278
|
+
/>
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
#### Rule 3.3: Use getItemLayout for Fixed Height Items
|
|
282
|
+
|
|
283
|
+
When items have fixed height, provide `getItemLayout` to skip measurement.
|
|
284
|
+
|
|
285
|
+
**✅ Correct:**
|
|
286
|
+
|
|
287
|
+
```typescript
|
|
288
|
+
const ITEM_HEIGHT = 80;
|
|
289
|
+
|
|
290
|
+
<FlatList
|
|
291
|
+
data={items}
|
|
292
|
+
renderItem={renderItem}
|
|
293
|
+
getItemLayout={(data, index) => ({
|
|
294
|
+
length: ITEM_HEIGHT,
|
|
295
|
+
offset: ITEM_HEIGHT * index,
|
|
296
|
+
index,
|
|
297
|
+
})}
|
|
298
|
+
/>
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
#### Rule 3.4: Use SectionList for Grouped Data
|
|
302
|
+
|
|
303
|
+
For data with sections/headers, use SectionList instead of nested FlatLists.
|
|
304
|
+
|
|
305
|
+
**❌ Incorrect:**
|
|
306
|
+
|
|
307
|
+
```typescript
|
|
308
|
+
<FlatList
|
|
309
|
+
data={categories}
|
|
310
|
+
renderItem={({ item: category }) => (
|
|
311
|
+
<View>
|
|
312
|
+
<Text>{category.name}</Text>
|
|
313
|
+
<FlatList data={category.items} renderItem={renderItem} />
|
|
314
|
+
</View>
|
|
315
|
+
)}
|
|
316
|
+
/>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**✅ Correct:**
|
|
320
|
+
|
|
321
|
+
```typescript
|
|
322
|
+
const sections = categories.map(cat => ({
|
|
323
|
+
title: cat.name,
|
|
324
|
+
data: cat.items,
|
|
325
|
+
}));
|
|
326
|
+
|
|
327
|
+
<SectionList
|
|
328
|
+
sections={sections}
|
|
329
|
+
renderItem={renderItem}
|
|
330
|
+
renderSectionHeader={({ section }) => (
|
|
331
|
+
<Text>{section.title}</Text>
|
|
332
|
+
)}
|
|
333
|
+
/>
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
### Re-render Prevention (MEDIUM)
|
|
339
|
+
|
|
340
|
+
Unnecessary re-renders cause jank and battery drain on mobile devices.
|
|
341
|
+
|
|
342
|
+
#### Rule 4.1: Memoize Expensive Components
|
|
343
|
+
|
|
344
|
+
Use `memo` for components with expensive render logic or many children.
|
|
345
|
+
|
|
346
|
+
**✅ Correct:**
|
|
347
|
+
|
|
348
|
+
```typescript
|
|
349
|
+
const ExpensiveChart = memo(function ExpensiveChart({ data }: Props) {
|
|
350
|
+
const processed = useMemo(() => processChartData(data), [data]);
|
|
351
|
+
return <ChartView data={processed} />;
|
|
352
|
+
});
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
#### Rule 4.2: Stable Callback References
|
|
356
|
+
|
|
357
|
+
Use `useCallback` for callbacks passed to child components.
|
|
358
|
+
|
|
359
|
+
**❌ Incorrect:**
|
|
360
|
+
|
|
361
|
+
```typescript
|
|
362
|
+
function ParentComponent() {
|
|
363
|
+
const [count, setCount] = useState(0);
|
|
364
|
+
|
|
365
|
+
return (
|
|
366
|
+
<ChildComponent
|
|
367
|
+
onPress={() => setCount(c => c + 1)}
|
|
368
|
+
/>
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
**✅ Correct:**
|
|
374
|
+
|
|
375
|
+
```typescript
|
|
376
|
+
function ParentComponent() {
|
|
377
|
+
const [count, setCount] = useState(0);
|
|
378
|
+
|
|
379
|
+
const handlePress = useCallback(() => {
|
|
380
|
+
setCount(c => c + 1);
|
|
381
|
+
}, []);
|
|
382
|
+
|
|
383
|
+
return <ChildComponent onPress={handlePress} />;
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
#### Rule 4.3: Avoid Object/Array Literals in Props
|
|
388
|
+
|
|
389
|
+
Inline objects/arrays create new references every render.
|
|
390
|
+
|
|
391
|
+
**❌ Incorrect:**
|
|
392
|
+
|
|
393
|
+
```typescript
|
|
394
|
+
<CustomButton
|
|
395
|
+
style={{ marginTop: 10, padding: 8 }}
|
|
396
|
+
colors={['#fff', '#000']}
|
|
397
|
+
/>
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
**✅ Correct:**
|
|
401
|
+
|
|
402
|
+
```typescript
|
|
403
|
+
const buttonStyle = StyleSheet.create({
|
|
404
|
+
button: { marginTop: 10, padding: 8 },
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
const buttonColors = ['#fff', '#000'];
|
|
408
|
+
|
|
409
|
+
<CustomButton style={buttonStyle.button} colors={buttonColors} />
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
#### Rule 4.4: Split State Appropriately
|
|
413
|
+
|
|
414
|
+
Keep unrelated state separate to prevent unnecessary re-renders.
|
|
415
|
+
|
|
416
|
+
**❌ Incorrect:**
|
|
417
|
+
|
|
418
|
+
```typescript
|
|
419
|
+
const [state, setState] = useState({
|
|
420
|
+
user: null,
|
|
421
|
+
isLoading: false,
|
|
422
|
+
error: null,
|
|
423
|
+
selectedTab: 0,
|
|
424
|
+
});
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**✅ Correct:**
|
|
428
|
+
|
|
429
|
+
```typescript
|
|
430
|
+
const [user, setUser] = useState(null);
|
|
431
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
432
|
+
const [error, setError] = useState(null);
|
|
433
|
+
const [selectedTab, setSelectedTab] = useState(0);
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
### Memory Management (MEDIUM)
|
|
439
|
+
|
|
440
|
+
Memory leaks cause crashes and poor performance, especially on lower-end devices.
|
|
441
|
+
|
|
442
|
+
#### Rule 5.1: Clean Up Effect Subscriptions
|
|
443
|
+
|
|
444
|
+
Always return cleanup functions from effects that create subscriptions.
|
|
445
|
+
|
|
446
|
+
**❌ Incorrect:**
|
|
447
|
+
|
|
448
|
+
```typescript
|
|
449
|
+
useEffect(() => {
|
|
450
|
+
const subscription = AppState.addEventListener('change', handleAppState);
|
|
451
|
+
const keyboardSub = Keyboard.addListener('keyboardDidShow', handleKeyboard);
|
|
452
|
+
}, []);
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
**✅ Correct:**
|
|
456
|
+
|
|
457
|
+
```typescript
|
|
458
|
+
useEffect(() => {
|
|
459
|
+
const subscription = AppState.addEventListener('change', handleAppState);
|
|
460
|
+
const keyboardSub = Keyboard.addListener('keyboardDidShow', handleKeyboard);
|
|
461
|
+
|
|
462
|
+
return () => {
|
|
463
|
+
subscription.remove();
|
|
464
|
+
keyboardSub.remove();
|
|
465
|
+
};
|
|
466
|
+
}, []);
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
#### Rule 5.2: Cancel Async Operations on Unmount
|
|
470
|
+
|
|
471
|
+
Use AbortController or flags to cancel pending operations.
|
|
472
|
+
|
|
473
|
+
**❌ Incorrect:**
|
|
474
|
+
|
|
475
|
+
```typescript
|
|
476
|
+
useEffect(() => {
|
|
477
|
+
async function loadData() {
|
|
478
|
+
const data = await fetchData();
|
|
479
|
+
setData(data); // May update unmounted component
|
|
480
|
+
}
|
|
481
|
+
loadData();
|
|
482
|
+
}, []);
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
**✅ Correct:**
|
|
486
|
+
|
|
487
|
+
```typescript
|
|
488
|
+
useEffect(() => {
|
|
489
|
+
const controller = new AbortController();
|
|
490
|
+
|
|
491
|
+
async function loadData() {
|
|
492
|
+
try {
|
|
493
|
+
const data = await fetchData({ signal: controller.signal });
|
|
494
|
+
setData(data);
|
|
495
|
+
} catch (e) {
|
|
496
|
+
if (e.name !== 'AbortError') throw e;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
loadData();
|
|
501
|
+
return () => controller.abort();
|
|
502
|
+
}, []);
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
#### Rule 5.3: Release Image Resources
|
|
506
|
+
|
|
507
|
+
Clear image cache and release resources when no longer needed.
|
|
508
|
+
|
|
509
|
+
**✅ Correct:**
|
|
510
|
+
|
|
511
|
+
```typescript
|
|
512
|
+
import { Image } from 'expo-image';
|
|
513
|
+
|
|
514
|
+
function Gallery({ images }: Props) {
|
|
515
|
+
useEffect(() => {
|
|
516
|
+
return () => {
|
|
517
|
+
// Clear cache on unmount for temporary images
|
|
518
|
+
Image.clearMemoryCache();
|
|
519
|
+
};
|
|
520
|
+
}, []);
|
|
521
|
+
|
|
522
|
+
return images.map(uri => (
|
|
523
|
+
<Image
|
|
524
|
+
key={uri}
|
|
525
|
+
source={{ uri }}
|
|
526
|
+
cachePolicy="memory-disk"
|
|
527
|
+
/>
|
|
528
|
+
));
|
|
529
|
+
}
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
### Animation Performance (MEDIUM)
|
|
535
|
+
|
|
536
|
+
Smooth animations require running on the UI thread, not JavaScript.
|
|
537
|
+
|
|
538
|
+
#### Rule 6.1: Use Native Driver When Possible
|
|
539
|
+
|
|
540
|
+
Enable native driver for transform and opacity animations.
|
|
541
|
+
|
|
542
|
+
**❌ Incorrect:**
|
|
543
|
+
|
|
544
|
+
```typescript
|
|
545
|
+
Animated.timing(fadeAnim, {
|
|
546
|
+
toValue: 1,
|
|
547
|
+
duration: 300,
|
|
548
|
+
}).start();
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
**✅ Correct:**
|
|
552
|
+
|
|
553
|
+
```typescript
|
|
554
|
+
Animated.timing(fadeAnim, {
|
|
555
|
+
toValue: 1,
|
|
556
|
+
duration: 300,
|
|
557
|
+
useNativeDriver: true,
|
|
558
|
+
}).start();
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
#### Rule 6.2: Prefer Reanimated for Complex Animations
|
|
562
|
+
|
|
563
|
+
Use react-native-reanimated for gesture-driven animations.
|
|
564
|
+
|
|
565
|
+
**✅ Correct:**
|
|
566
|
+
|
|
567
|
+
```typescript
|
|
568
|
+
import Animated, { useAnimatedGestureHandler, useSharedValue } from 'react-native-reanimated';
|
|
569
|
+
import { PanGestureHandler } from 'react-native-gesture-handler';
|
|
570
|
+
|
|
571
|
+
const translateX = useSharedValue(0);
|
|
572
|
+
const translateY = useSharedValue(0);
|
|
573
|
+
|
|
574
|
+
const gestureHandler = useAnimatedGestureHandler({
|
|
575
|
+
onActive: (event) => {
|
|
576
|
+
translateX.value = event.translationX;
|
|
577
|
+
translateY.value = event.translationY;
|
|
578
|
+
},
|
|
579
|
+
});
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
#### Rule 6.3: Avoid Layout Animations During Scroll
|
|
583
|
+
|
|
584
|
+
Don't trigger layout animations while scrolling.
|
|
585
|
+
|
|
586
|
+
**❌ Incorrect:**
|
|
587
|
+
|
|
588
|
+
```typescript
|
|
589
|
+
<FlatList
|
|
590
|
+
data={items}
|
|
591
|
+
renderItem={({ item }) => (
|
|
592
|
+
<Animated.View entering={FadeIn}>
|
|
593
|
+
<ItemCard item={item} />
|
|
594
|
+
</Animated.View>
|
|
595
|
+
)}
|
|
596
|
+
/>
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
**✅ Correct:**
|
|
600
|
+
|
|
601
|
+
```typescript
|
|
602
|
+
const AnimatedItem = memo(({ item, index }: Props) => (
|
|
603
|
+
<Animated.View
|
|
604
|
+
entering={FadeIn.delay(index * 50).duration(200)}
|
|
605
|
+
>
|
|
606
|
+
<ItemCard item={item} />
|
|
607
|
+
</Animated.View>
|
|
608
|
+
));
|
|
609
|
+
|
|
610
|
+
// Only animate initial render, not during scroll
|
|
611
|
+
<FlatList
|
|
612
|
+
data={items}
|
|
613
|
+
renderItem={({ item, index }) => (
|
|
614
|
+
<AnimatedItem item={item} index={index} />
|
|
615
|
+
)}
|
|
616
|
+
initialNumToRender={10}
|
|
617
|
+
/>
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
---
|
|
621
|
+
|
|
622
|
+
## Code Style & Structure
|
|
623
|
+
|
|
624
|
+
### General Principles
|
|
625
|
+
|
|
626
|
+
- Write concise, technical TypeScript code with clear, accurate examples
|
|
627
|
+
- Use functional and declarative programming patterns; avoid class-based components
|
|
628
|
+
- Prioritize modularization and iteration to prevent code duplication
|
|
629
|
+
- Use descriptive variable names with auxiliary verbs (e.g., `isLoading`, `hasError`, `shouldRender`)
|
|
630
|
+
|
|
631
|
+
### File Organization
|
|
632
|
+
|
|
633
|
+
Organize files in this consistent order:
|
|
634
|
+
|
|
635
|
+
1. Exported main component
|
|
636
|
+
2. Subcomponents
|
|
637
|
+
3. Helper functions
|
|
638
|
+
4. Static content (e.g., constants, mock data)
|
|
639
|
+
5. TypeScript types/interfaces
|
|
640
|
+
|
|
641
|
+
**Example:**
|
|
642
|
+
|
|
643
|
+
```typescript
|
|
644
|
+
// 1. Main component export
|
|
645
|
+
export function UserProfile({ userId }: UserProfileProps) {
|
|
646
|
+
// Implementation
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
// 2. Subcomponents
|
|
650
|
+
function ProfileHeader({ name }: ProfileHeaderProps) {
|
|
651
|
+
// Implementation
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
// 3. Helpers
|
|
655
|
+
function formatUserData(data: RawUserData): FormattedUserData {
|
|
656
|
+
// Implementation
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
// 4. Constants
|
|
660
|
+
const DEFAULT_AVATAR = 'https://example.com/avatar.png';
|
|
661
|
+
|
|
662
|
+
// 5. Types
|
|
663
|
+
interface UserProfileProps {
|
|
664
|
+
userId: string;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
interface ProfileHeaderProps {
|
|
668
|
+
name: string;
|
|
669
|
+
}
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
### Naming Conventions
|
|
673
|
+
|
|
674
|
+
- **Directories**: lowercase with dashes (`components/auth-flow`, `utils/api`)
|
|
675
|
+
- **Components**: PascalCase (`AuthButton`, `ProfileCard`)
|
|
676
|
+
- **Variables/Functions**: camelCase (`fetchUserData`, `useAuthState`)
|
|
677
|
+
- **Custom Hooks**: Prefix with `use` (`useDeviceOrientation`)
|
|
678
|
+
- **Exports**: Favor named exports (`export function MyComponent`)
|
|
679
|
+
- **Files**: Clear, intention-revealing names (`AuthContext.ts`, `UserProfileScreen.tsx`)
|
|
680
|
+
|
|
681
|
+
### Import Ordering
|
|
682
|
+
|
|
683
|
+
1. External packages (e.g., `react`, `react-native`, `@sentry/core`)
|
|
684
|
+
2. Internal absolute imports (e.g., `@/components/*`)
|
|
685
|
+
3. Relative imports (e.g., `./UserProfile`)
|
|
686
|
+
4. Type imports (can be inline with `import type`)
|
|
687
|
+
|
|
688
|
+
**Example:**
|
|
689
|
+
|
|
690
|
+
```typescript
|
|
691
|
+
import { useState, useEffect } from 'react';
|
|
692
|
+
import { View, Text } from 'react-native';
|
|
693
|
+
import * as Sentry from '@sentry/react-native';
|
|
694
|
+
|
|
695
|
+
import { Button } from '@/components/Button';
|
|
696
|
+
import { useAuth } from '@/hooks/useAuth';
|
|
697
|
+
|
|
698
|
+
import { UserProfile } from './UserProfile';
|
|
699
|
+
import type { UserData } from './types';
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
### Component Structure
|
|
703
|
+
|
|
704
|
+
- Keep components small and focused, with a single responsibility per component
|
|
705
|
+
- Use barrel files (`index.ts`) for exporting multiple modules from a directory
|
|
706
|
+
- Avoid creating nested projects - always verify project root before scaffolding
|
|
707
|
+
|
|
708
|
+
---
|
|
709
|
+
|
|
710
|
+
## TypeScript Usage
|
|
711
|
+
|
|
712
|
+
### Core Rules
|
|
713
|
+
|
|
714
|
+
- Use TypeScript for all code
|
|
715
|
+
- Enable strict mode in `tsconfig.json` for enhanced type safety
|
|
716
|
+
- Prefer `interface` over `type` aliases for object shapes
|
|
717
|
+
- Avoid `enum`; use constant maps or union types instead
|
|
718
|
+
- Define interfaces for component props and state
|
|
719
|
+
- Use explicit return types for functions
|
|
720
|
+
- Avoid `any` unless absolutely necessary
|
|
721
|
+
- Leverage utility types (`Partial`, `Pick`, `Omit`) to reduce boilerplate
|
|
722
|
+
|
|
723
|
+
### Examples
|
|
724
|
+
|
|
725
|
+
**✅ Correct Interface Usage:**
|
|
726
|
+
|
|
727
|
+
```typescript
|
|
728
|
+
interface UserData {
|
|
729
|
+
id: string;
|
|
730
|
+
name: string;
|
|
731
|
+
email?: string;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
interface UserProfileProps {
|
|
735
|
+
user: UserData;
|
|
736
|
+
onEdit: (user: UserData) => void;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
function UserProfile({ user, onEdit }: UserProfileProps): JSX.Element {
|
|
740
|
+
return <View>{/* Implementation */}</View>;
|
|
741
|
+
}
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
**✅ Union Types Instead of Enums:**
|
|
745
|
+
|
|
746
|
+
```typescript
|
|
747
|
+
// ❌ Avoid enums
|
|
748
|
+
enum Status {
|
|
749
|
+
Loading,
|
|
750
|
+
Success,
|
|
751
|
+
Error,
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
// ✅ Use union types
|
|
755
|
+
type Status = 'loading' | 'success' | 'error';
|
|
756
|
+
|
|
757
|
+
// ✅ Or constant maps
|
|
758
|
+
const STATUS = {
|
|
759
|
+
LOADING: 'loading',
|
|
760
|
+
SUCCESS: 'success',
|
|
761
|
+
ERROR: 'error',
|
|
762
|
+
} as const;
|
|
763
|
+
|
|
764
|
+
type Status = typeof STATUS[keyof typeof STATUS];
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
**✅ Utility Types:**
|
|
768
|
+
|
|
769
|
+
```typescript
|
|
770
|
+
interface User {
|
|
771
|
+
id: string;
|
|
772
|
+
name: string;
|
|
773
|
+
email: string;
|
|
774
|
+
role: string;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
// Pick specific properties
|
|
778
|
+
type UserPreview = Pick<User, 'id' | 'name'>;
|
|
779
|
+
|
|
780
|
+
// Make all properties optional
|
|
781
|
+
type PartialUser = Partial<User>;
|
|
782
|
+
|
|
783
|
+
// Omit specific properties
|
|
784
|
+
type PublicUser = Omit<User, 'email'>;
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
---
|
|
788
|
+
|
|
789
|
+
## Testing Guidelines
|
|
790
|
+
|
|
791
|
+
### Core Principles
|
|
792
|
+
|
|
793
|
+
- Write unit tests for components and utilities using Jest and React Native Testing Library
|
|
794
|
+
- Aim for at least 80% test coverage for critical paths
|
|
795
|
+
- Mock external dependencies (e.g., APIs, device features) to ensure reliable tests
|
|
796
|
+
- Follow the Arrange-Act-Assert pattern for clear test structure
|
|
797
|
+
|
|
798
|
+
### Test Structure: Arrange-Act-Assert
|
|
799
|
+
|
|
800
|
+
Always structure tests with clear sections:
|
|
801
|
+
|
|
802
|
+
```typescript
|
|
803
|
+
describe('UserProfile', () => {
|
|
804
|
+
it('displays user name correctly', () => {
|
|
805
|
+
// Arrange
|
|
806
|
+
const userData = { name: 'Test User', id: '123' };
|
|
807
|
+
|
|
808
|
+
// Act
|
|
809
|
+
const { getByText } = render(<UserProfile user={userData} />);
|
|
810
|
+
|
|
811
|
+
// Assert
|
|
812
|
+
expect(getByText('Test User')).toBeTruthy();
|
|
813
|
+
});
|
|
814
|
+
});
|
|
815
|
+
```
|
|
816
|
+
|
|
817
|
+
### Test Naming Conventions
|
|
818
|
+
|
|
819
|
+
**Preferred: describe/it pattern**
|
|
820
|
+
|
|
821
|
+
```typescript
|
|
822
|
+
describe('functionName', () => {
|
|
823
|
+
it('returns expected value when input is valid', () => {
|
|
824
|
+
const result = functionName('test');
|
|
825
|
+
expect(result).toBe('expected');
|
|
826
|
+
});
|
|
827
|
+
|
|
828
|
+
it('throws error when input is invalid', () => {
|
|
829
|
+
expect(() => functionName(null)).toThrow();
|
|
830
|
+
});
|
|
831
|
+
});
|
|
832
|
+
```
|
|
833
|
+
|
|
834
|
+
**Alternative: flat test naming**
|
|
835
|
+
|
|
836
|
+
```typescript
|
|
837
|
+
test('functionName returns expected value when input is valid', () => {
|
|
838
|
+
const result = functionName('test');
|
|
839
|
+
expect(result).toBe('expected');
|
|
840
|
+
});
|
|
841
|
+
```
|
|
842
|
+
|
|
843
|
+
### Jest Matchers Best Practices
|
|
844
|
+
|
|
845
|
+
Use specific matchers for better error messages:
|
|
846
|
+
|
|
847
|
+
```typescript
|
|
848
|
+
// ✅ Good - specific matchers
|
|
849
|
+
expect(value).toBe(true);
|
|
850
|
+
expect(array).toHaveLength(3);
|
|
851
|
+
expect(object).toMatchObject({ key: 'value' });
|
|
852
|
+
expect(fn).toThrow(Error);
|
|
853
|
+
expect(promise).resolves.toBe('success');
|
|
854
|
+
|
|
855
|
+
// ❌ Avoid - less specific
|
|
856
|
+
expect(value === true).toBe(true);
|
|
857
|
+
expect(array.length).toBe(3);
|
|
858
|
+
```
|
|
859
|
+
|
|
860
|
+
### Mock Cleanup
|
|
861
|
+
|
|
862
|
+
Always clean up mocks after each test:
|
|
863
|
+
|
|
864
|
+
```typescript
|
|
865
|
+
describe('MyComponent', () => {
|
|
866
|
+
afterEach(() => {
|
|
867
|
+
jest.clearAllMocks();
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
it('calls API with correct parameters', () => {
|
|
871
|
+
const mockApi = jest.fn();
|
|
872
|
+
// test code
|
|
873
|
+
expect(mockApi).toHaveBeenCalledWith(expectedParams);
|
|
874
|
+
});
|
|
875
|
+
});
|
|
876
|
+
```
|
|
877
|
+
|
|
878
|
+
### Testing Native Modules
|
|
879
|
+
|
|
880
|
+
Mock React Native modules properly:
|
|
881
|
+
|
|
882
|
+
```typescript
|
|
883
|
+
jest.mock('react-native', () => ({
|
|
884
|
+
NativeModules: {
|
|
885
|
+
RNSentry: {
|
|
886
|
+
nativeOperation: jest.fn(() => Promise.resolve(true)),
|
|
887
|
+
},
|
|
888
|
+
},
|
|
889
|
+
Platform: {
|
|
890
|
+
OS: 'ios',
|
|
891
|
+
select: jest.fn(obj => obj.ios),
|
|
892
|
+
},
|
|
893
|
+
}));
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
### Platform-Specific Testing
|
|
897
|
+
|
|
898
|
+
```typescript
|
|
899
|
+
import { Platform } from 'react-native';
|
|
900
|
+
|
|
901
|
+
describe('Platform-specific behavior', () => {
|
|
902
|
+
it('uses iOS-specific logic', () => {
|
|
903
|
+
Platform.OS = 'ios';
|
|
904
|
+
// Test iOS-specific code
|
|
905
|
+
});
|
|
906
|
+
|
|
907
|
+
it('uses Android-specific logic', () => {
|
|
908
|
+
Platform.OS = 'android';
|
|
909
|
+
// Test Android-specific code
|
|
910
|
+
});
|
|
911
|
+
});
|
|
912
|
+
```
|
|
913
|
+
|
|
914
|
+
---
|
|
915
|
+
|
|
916
|
+
## Code Optimization & Maintenance
|
|
917
|
+
|
|
918
|
+
### Regular Audits
|
|
919
|
+
|
|
920
|
+
Perform regular code audits to keep your codebase lean:
|
|
921
|
+
|
|
922
|
+
- Run `npx knip` monthly to identify unused code
|
|
923
|
+
- Use `npx depcheck` for additional dependency validation
|
|
924
|
+
- Remove unused components, exports, and dependencies
|
|
925
|
+
- Consider bundle analyzer for production builds
|
|
926
|
+
|
|
927
|
+
### Dependency Management
|
|
928
|
+
|
|
929
|
+
**Best practices:**
|
|
930
|
+
|
|
931
|
+
```bash
|
|
932
|
+
# Analyze unused code
|
|
933
|
+
npx knip
|
|
934
|
+
|
|
935
|
+
# Check for unused dependencies
|
|
936
|
+
npx depcheck
|
|
937
|
+
|
|
938
|
+
# Audit for security vulnerabilities
|
|
939
|
+
npm audit
|
|
940
|
+
# or
|
|
941
|
+
expo doctor
|
|
942
|
+
|
|
943
|
+
# Update dependencies regularly
|
|
944
|
+
npx expo install --fix
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
### Code Cleanup Checklist
|
|
948
|
+
|
|
949
|
+
- ✓ Remove unused component files
|
|
950
|
+
- ✓ Clean up unused exports (functions, constants)
|
|
951
|
+
- ✓ Remove unused dependencies from `package.json`
|
|
952
|
+
- ✓ Eliminate dead code paths
|
|
953
|
+
- ✓ Minimize bundle size with proper imports
|
|
954
|
+
- ✓ Review and update documentation
|
|
955
|
+
|
|
956
|
+
### Bundle Size Optimization
|
|
957
|
+
|
|
958
|
+
- Avoid barrel imports (`index.ts` re-exports)
|
|
959
|
+
- Use direct imports for tree-shaking
|
|
960
|
+
- Lazy load heavy components and screens
|
|
961
|
+
- Use conditional requires for platform-specific code
|
|
962
|
+
- Monitor bundle size in CI/CD pipeline
|
|
963
|
+
|
|
964
|
+
---
|
|
965
|
+
|
|
966
|
+
## Commit & Workflow Guidelines
|
|
967
|
+
|
|
968
|
+
### Commit Message Format
|
|
969
|
+
|
|
970
|
+
Follow conventional commit format:
|
|
971
|
+
|
|
972
|
+
```
|
|
973
|
+
<type>(<scope>): <subject>
|
|
974
|
+
|
|
975
|
+
<body>
|
|
976
|
+
|
|
977
|
+
<footer>
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
**Types:**
|
|
981
|
+
|
|
982
|
+
- `feat`: New feature
|
|
983
|
+
- `fix`: Bug fix
|
|
984
|
+
- `docs`: Documentation changes
|
|
985
|
+
- `style`: Code style changes (formatting, etc.)
|
|
986
|
+
- `refactor`: Code refactoring
|
|
987
|
+
- `perf`: Performance improvements
|
|
988
|
+
- `test`: Adding or updating tests
|
|
989
|
+
- `build`: Build system changes
|
|
990
|
+
- `ci`: CI configuration changes
|
|
991
|
+
- `chore`: Other changes that don't modify src or test files
|
|
992
|
+
|
|
993
|
+
**Examples:**
|
|
994
|
+
|
|
995
|
+
```
|
|
996
|
+
feat(auth): Add biometric authentication support
|
|
997
|
+
|
|
998
|
+
Implements Face ID and Touch ID authentication for iOS and fingerprint
|
|
999
|
+
authentication for Android. Adds secure storage for auth tokens.
|
|
1000
|
+
|
|
1001
|
+
Closes #1234
|
|
1002
|
+
```
|
|
1003
|
+
|
|
1004
|
+
```
|
|
1005
|
+
fix(list): Fix FlatList performance issue with large datasets
|
|
1006
|
+
|
|
1007
|
+
Added getItemLayout and optimized renderItem memoization to prevent
|
|
1008
|
+
frame drops when scrolling through lists with 1000+ items.
|
|
1009
|
+
|
|
1010
|
+
Fixes #5678
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1013
|
+
### Pre-Commit Checklist
|
|
1014
|
+
|
|
1015
|
+
Before committing, ensure:
|
|
1016
|
+
|
|
1017
|
+
- [ ] Code compiles without errors
|
|
1018
|
+
- [ ] All tests pass (`yarn test` or `npm test`)
|
|
1019
|
+
- [ ] Linting passes (`yarn lint` or `npm run lint`)
|
|
1020
|
+
- [ ] TypeScript types are correct
|
|
1021
|
+
- [ ] No console.log statements (use proper logging)
|
|
1022
|
+
- [ ] Tests added/updated for changes
|
|
1023
|
+
- [ ] Documentation updated if necessary
|
|
1024
|
+
|
|
1025
|
+
### CI/CD Considerations
|
|
1026
|
+
|
|
1027
|
+
- Run tests on multiple platforms (iOS, Android, Web)
|
|
1028
|
+
- Test on multiple React Native versions if supporting older versions
|
|
1029
|
+
- Use concurrency groups to prevent wasted resources
|
|
1030
|
+
- Gate expensive tests (E2E, native tests) behind PR labels
|
|
1031
|
+
- Monitor bundle size changes
|
|
1032
|
+
|
|
1033
|
+
---
|
|
1034
|
+
|
|
1035
|
+
## UI & Styling
|
|
1036
|
+
|
|
1037
|
+
### Safe Area Management
|
|
1038
|
+
|
|
1039
|
+
Handle notches, status bars, and screen insets dynamically:
|
|
1040
|
+
|
|
1041
|
+
```typescript
|
|
1042
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
1043
|
+
|
|
1044
|
+
function Screen() {
|
|
1045
|
+
const insets = useSafeAreaInsets();
|
|
1046
|
+
|
|
1047
|
+
return (
|
|
1048
|
+
<View style={{ flex: 1, paddingTop: insets.top }}>
|
|
1049
|
+
<Header />
|
|
1050
|
+
<Content style={{ paddingBottom: insets.bottom }} />
|
|
1051
|
+
</View>
|
|
1052
|
+
);
|
|
1053
|
+
}
|
|
1054
|
+
```
|
|
1055
|
+
|
|
1056
|
+
### Platform-Specific Patterns
|
|
1057
|
+
|
|
1058
|
+
**Use Platform-Specific Extensions:**
|
|
1059
|
+
|
|
1060
|
+
```typescript
|
|
1061
|
+
// DatePicker.ios.tsx
|
|
1062
|
+
export function DatePicker() {
|
|
1063
|
+
return <IOSDatePicker />;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
// DatePicker.android.tsx
|
|
1067
|
+
export function DatePicker() {
|
|
1068
|
+
return <AndroidDatePicker />;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
// Usage - automatically picks correct file
|
|
1072
|
+
import { DatePicker } from './DatePicker';
|
|
1073
|
+
```
|
|
1074
|
+
|
|
1075
|
+
**Use Platform.select for Simple Differences:**
|
|
1076
|
+
|
|
1077
|
+
```typescript
|
|
1078
|
+
const styles = StyleSheet.create({
|
|
1079
|
+
shadow: Platform.select({
|
|
1080
|
+
ios: {
|
|
1081
|
+
shadowColor: '#000',
|
|
1082
|
+
shadowOffset: { width: 0, height: 2 },
|
|
1083
|
+
shadowOpacity: 0.25,
|
|
1084
|
+
shadowRadius: 3.84,
|
|
1085
|
+
},
|
|
1086
|
+
android: {
|
|
1087
|
+
elevation: 4,
|
|
1088
|
+
},
|
|
1089
|
+
}),
|
|
1090
|
+
});
|
|
1091
|
+
```
|
|
1092
|
+
|
|
1093
|
+
### Accessibility Requirements
|
|
1094
|
+
|
|
1095
|
+
- Use `accessibilityLabel` and `accessibilityRole` on interactive elements
|
|
1096
|
+
- Ensure sufficient color contrast (WCAG AA minimum)
|
|
1097
|
+
- Touch targets should be at least 44x44 pixels
|
|
1098
|
+
- Test with screen readers (VoiceOver on iOS, TalkBack on Android)
|
|
1099
|
+
- Support text scaling for visually impaired users
|
|
1100
|
+
|
|
1101
|
+
### Dark Mode Support
|
|
1102
|
+
|
|
1103
|
+
Use Expo's `useColorScheme` hook:
|
|
1104
|
+
|
|
1105
|
+
```typescript
|
|
1106
|
+
import { useColorScheme } from 'react-native';
|
|
1107
|
+
|
|
1108
|
+
function ThemedComponent() {
|
|
1109
|
+
const colorScheme = useColorScheme();
|
|
1110
|
+
const isDark = colorScheme === 'dark';
|
|
1111
|
+
|
|
1112
|
+
return (
|
|
1113
|
+
<View style={{ backgroundColor: isDark ? '#000' : '#fff' }}>
|
|
1114
|
+
<Text style={{ color: isDark ? '#fff' : '#000' }}>
|
|
1115
|
+
Content
|
|
1116
|
+
</Text>
|
|
1117
|
+
</View>
|
|
1118
|
+
);
|
|
1119
|
+
}
|
|
1120
|
+
```
|
|
1121
|
+
|
|
1122
|
+
### Styling Approaches
|
|
1123
|
+
|
|
1124
|
+
Choose ONE consistent approach:
|
|
1125
|
+
|
|
1126
|
+
1. **StyleSheet** (vanilla React Native)
|
|
1127
|
+
2. **NativeWind** (Tailwind CSS for React Native)
|
|
1128
|
+
3. **Styled-components** (CSS-in-JS)
|
|
1129
|
+
|
|
1130
|
+
Centralize design tokens in a `theme.ts` file:
|
|
1131
|
+
|
|
1132
|
+
```typescript
|
|
1133
|
+
export const theme = {
|
|
1134
|
+
colors: {
|
|
1135
|
+
primary: '#007AFF',
|
|
1136
|
+
secondary: '#5856D6',
|
|
1137
|
+
background: '#FFFFFF',
|
|
1138
|
+
text: '#000000',
|
|
1139
|
+
},
|
|
1140
|
+
spacing: {
|
|
1141
|
+
xs: 4,
|
|
1142
|
+
sm: 8,
|
|
1143
|
+
md: 16,
|
|
1144
|
+
lg: 24,
|
|
1145
|
+
xl: 32,
|
|
1146
|
+
},
|
|
1147
|
+
typography: {
|
|
1148
|
+
h1: { fontSize: 32, fontWeight: '700' },
|
|
1149
|
+
h2: { fontSize: 24, fontWeight: '600' },
|
|
1150
|
+
body: { fontSize: 16, fontWeight: '400' },
|
|
1151
|
+
},
|
|
1152
|
+
};
|
|
1153
|
+
```
|
|
1154
|
+
|
|
1155
|
+
---
|
|
1156
|
+
|
|
1157
|
+
## Security & Best Practices
|
|
1158
|
+
|
|
1159
|
+
### Input Sanitization
|
|
1160
|
+
|
|
1161
|
+
Always sanitize user inputs to prevent XSS and injection attacks:
|
|
1162
|
+
|
|
1163
|
+
```typescript
|
|
1164
|
+
function sanitizeInput(input: string): string {
|
|
1165
|
+
return input
|
|
1166
|
+
.trim()
|
|
1167
|
+
.replace(/[<>]/g, '')
|
|
1168
|
+
.substring(0, 1000); // Limit length
|
|
1169
|
+
}
|
|
1170
|
+
```
|
|
1171
|
+
|
|
1172
|
+
### Secure Storage
|
|
1173
|
+
|
|
1174
|
+
Use secure storage for sensitive data:
|
|
1175
|
+
|
|
1176
|
+
```typescript
|
|
1177
|
+
import * as SecureStore from 'expo-secure-store';
|
|
1178
|
+
|
|
1179
|
+
// Store sensitive data
|
|
1180
|
+
await SecureStore.setItemAsync('authToken', token);
|
|
1181
|
+
|
|
1182
|
+
// Retrieve sensitive data
|
|
1183
|
+
const token = await SecureStore.getItemAsync('authToken');
|
|
1184
|
+
|
|
1185
|
+
// Delete sensitive data
|
|
1186
|
+
await SecureStore.deleteItemAsync('authToken');
|
|
1187
|
+
```
|
|
1188
|
+
|
|
1189
|
+
### API Communication
|
|
1190
|
+
|
|
1191
|
+
- **Always use HTTPS** for API communications
|
|
1192
|
+
- Implement proper authentication (OAuth, JWT)
|
|
1193
|
+
- Validate SSL certificates
|
|
1194
|
+
- Handle authentication errors gracefully
|
|
1195
|
+
|
|
1196
|
+
### Regular Security Audits
|
|
1197
|
+
|
|
1198
|
+
```bash
|
|
1199
|
+
# Check for known vulnerabilities
|
|
1200
|
+
npm audit
|
|
1201
|
+
|
|
1202
|
+
# Expo-specific security check
|
|
1203
|
+
expo doctor
|
|
1204
|
+
|
|
1205
|
+
# Keep dependencies updated
|
|
1206
|
+
npx expo install --fix
|
|
1207
|
+
```
|
|
1208
|
+
|
|
1209
|
+
### Environment Variables
|
|
1210
|
+
|
|
1211
|
+
Use Expo's environment variable management:
|
|
1212
|
+
|
|
1213
|
+
```typescript
|
|
1214
|
+
import Constants from 'expo-constants';
|
|
1215
|
+
|
|
1216
|
+
const API_URL = Constants.expoConfig?.extra?.apiUrl ?? 'https://api.example.com';
|
|
1217
|
+
```
|
|
1218
|
+
|
|
1219
|
+
---
|
|
1220
|
+
|
|
1221
|
+
## Common Pitfalls to Avoid
|
|
1222
|
+
|
|
1223
|
+
### ❌ Never Create Nested Projects
|
|
1224
|
+
|
|
1225
|
+
Before scaffolding a new project, always verify the project root. Check for:
|
|
1226
|
+
|
|
1227
|
+
- `app.json` or `app.config.js`
|
|
1228
|
+
- `package.json`
|
|
1229
|
+
- `node_modules` directory
|
|
1230
|
+
|
|
1231
|
+
If these exist, you're already in an Expo/React Native project.
|
|
1232
|
+
|
|
1233
|
+
### ❌ Avoid Barrel Imports for Tree-Shaking
|
|
1234
|
+
|
|
1235
|
+
```typescript
|
|
1236
|
+
// ❌ Bad - prevents tree-shaking
|
|
1237
|
+
import { Button, Text, Card } from '@/components';
|
|
1238
|
+
|
|
1239
|
+
// ✅ Good - enables tree-shaking
|
|
1240
|
+
import { Button } from '@/components/Button';
|
|
1241
|
+
import { Text } from '@/components/Text';
|
|
1242
|
+
import { Card } from '@/components/Card';
|
|
1243
|
+
```
|
|
1244
|
+
|
|
1245
|
+
### ❌ Never Use ScrollView with .map() for Long Lists
|
|
1246
|
+
|
|
1247
|
+
```typescript
|
|
1248
|
+
// ❌ Bad - loads all items in memory
|
|
1249
|
+
<ScrollView>
|
|
1250
|
+
{items.map(item => <Item key={item.id} item={item} />)}
|
|
1251
|
+
</ScrollView>
|
|
1252
|
+
|
|
1253
|
+
// ✅ Good - virtualizes list
|
|
1254
|
+
<FlatList
|
|
1255
|
+
data={items}
|
|
1256
|
+
renderItem={({ item }) => <Item item={item} />}
|
|
1257
|
+
keyExtractor={item => item.id}
|
|
1258
|
+
/>
|
|
1259
|
+
```
|
|
1260
|
+
|
|
1261
|
+
### ❌ Don't Skip Error Boundaries
|
|
1262
|
+
|
|
1263
|
+
Always implement global error boundaries:
|
|
1264
|
+
|
|
1265
|
+
```typescript
|
|
1266
|
+
import React from 'react';
|
|
1267
|
+
import { Text, View } from 'react-native';
|
|
1268
|
+
|
|
1269
|
+
class ErrorBoundary extends React.Component<
|
|
1270
|
+
{ children: React.ReactNode },
|
|
1271
|
+
{ hasError: boolean }
|
|
1272
|
+
> {
|
|
1273
|
+
constructor(props) {
|
|
1274
|
+
super(props);
|
|
1275
|
+
this.state = { hasError: false };
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
static getDerivedStateFromError() {
|
|
1279
|
+
return { hasError: true };
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
componentDidCatch(error, errorInfo) {
|
|
1283
|
+
console.error('Error caught by boundary:', error, errorInfo);
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
render() {
|
|
1287
|
+
if (this.state.hasError) {
|
|
1288
|
+
return (
|
|
1289
|
+
<View>
|
|
1290
|
+
<Text>Something went wrong.</Text>
|
|
1291
|
+
</View>
|
|
1292
|
+
);
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
return this.props.children;
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
```
|
|
1299
|
+
|
|
1300
|
+
### ❌ Avoid Inline Styles in Production
|
|
1301
|
+
|
|
1302
|
+
```typescript
|
|
1303
|
+
// ❌ Bad - creates new object every render
|
|
1304
|
+
<View style={{ padding: 10, margin: 5 }} />
|
|
1305
|
+
|
|
1306
|
+
// ✅ Good - reuses same style object
|
|
1307
|
+
const styles = StyleSheet.create({
|
|
1308
|
+
container: { padding: 10, margin: 5 },
|
|
1309
|
+
});
|
|
1310
|
+
|
|
1311
|
+
<View style={styles.container} />
|
|
1312
|
+
```
|
|
1313
|
+
|
|
1314
|
+
### ❌ Don't Ignore TypeScript/ESLint Warnings
|
|
1315
|
+
|
|
1316
|
+
- Fix type errors immediately
|
|
1317
|
+
- Address linting issues before committing
|
|
1318
|
+
- Use strict mode in TypeScript
|
|
1319
|
+
- Keep ESLint rules up to date
|
|
1320
|
+
|
|
1321
|
+
---
|
|
1322
|
+
|
|
1323
|
+
## Summary
|
|
1324
|
+
|
|
1325
|
+
| Category | Impact | Key Rules |
|
|
1326
|
+
|----------|--------|-----------|
|
|
1327
|
+
| Eliminating Waterfalls | CRITICAL | Defer await, Promise.all, start early |
|
|
1328
|
+
| Bundle Optimization | CRITICAL | No barrel imports, lazy load, conditional require |
|
|
1329
|
+
| List Performance | HIGH | FlatList always, memoize items, getItemLayout |
|
|
1330
|
+
| Re-render Prevention | MEDIUM | memo, useCallback, stable refs |
|
|
1331
|
+
| Memory Management | MEDIUM | Cleanup effects, abort controllers |
|
|
1332
|
+
| Animation Performance | MEDIUM | Native driver, Reanimated |
|
|
1333
|
+
| Testing | HIGH | Arrange-Act-Assert, 80% coverage, mock cleanup |
|
|
1334
|
+
| Code Quality | MEDIUM | TypeScript strict, named exports, clear structure |
|
|
1335
|
+
|
|
1336
|
+
---
|
|
1337
|
+
|
|
1338
|
+
## Additional Resources
|
|
1339
|
+
|
|
1340
|
+
- [Expo Documentation](https://docs.expo.dev/)
|
|
1341
|
+
- [React Native Documentation](https://reactnative.dev/)
|
|
1342
|
+
- [React Native Testing Library](https://callstack.github.io/react-native-testing-library/)
|
|
1343
|
+
- [TypeScript Handbook](https://www.typescriptlang.org/docs/)
|
|
1344
|
+
|
|
1345
|
+
---
|
|
1346
|
+
|
|
1347
|
+
**Last Updated:** 2026-01-22
|
|
1348
|
+
**Version:** 1.0
|