@aurostack/stacks 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +209 -0
- package/cli/src/extract.mjs +165 -0
- package/cli/src/fsx.mjs +197 -0
- package/cli/src/generate.mjs +235 -0
- package/cli/src/hooks.mjs +55 -0
- package/cli/src/manifest.mjs +163 -0
- package/cli/src/strip.mjs +208 -0
- package/cli/src/tokens.mjs +102 -0
- package/cli/stack.mjs +672 -0
- package/package.json +37 -0
- package/templates/nest-api/files/.bin/db.ts +123 -0
- package/templates/nest-api/files/.bin/dc.ts +74 -0
- package/templates/nest-api/files/.bin/helpers.ts +49 -0
- package/templates/nest-api/files/.bin/secrets.ts +68 -0
- package/templates/nest-api/files/.bin/start.ts +47 -0
- package/templates/nest-api/files/.dockerignore +7 -0
- package/templates/nest-api/files/.env.example +91 -0
- package/templates/nest-api/files/.env.test.example +75 -0
- package/templates/nest-api/files/.forgejo/workflows/build-and-push.yml +41 -0
- package/templates/nest-api/files/.forgejo/workflows/test-e2e.yml +83 -0
- package/templates/nest-api/files/.forgejo/workflows/test.yml +53 -0
- package/templates/nest-api/files/.npmrc.example +1 -0
- package/templates/nest-api/files/.nvmrc +1 -0
- package/templates/nest-api/files/.prettierrc +8 -0
- package/templates/nest-api/files/.swcrc +15 -0
- package/templates/nest-api/files/.watchmanconfig +3 -0
- package/templates/nest-api/files/.yarnrc.yml +1 -0
- package/templates/nest-api/files/Dockerfile +40 -0
- package/templates/nest-api/files/__mocks__/activation-twofa.js +7 -0
- package/templates/nest-api/files/__mocks__/activation.js +7 -0
- package/templates/nest-api/files/__mocks__/forgot-password.js +7 -0
- package/templates/nest-api/files/__mocks__/main-layout.js +7 -0
- package/templates/nest-api/files/__mocks__/password-changed.js +7 -0
- package/templates/nest-api/files/__mocks__/reset-password.js +7 -0
- package/templates/nest-api/files/__mocks__/set-password.js +7 -0
- package/templates/nest-api/files/__mocks__/welcome.js +7 -0
- package/templates/nest-api/files/_gitignore +62 -0
- package/templates/nest-api/files/compose.test.yml +33 -0
- package/templates/nest-api/files/compose.yml +39 -0
- package/templates/nest-api/files/emails/activation-twofa.tsx +58 -0
- package/templates/nest-api/files/emails/activation.tsx +36 -0
- package/templates/nest-api/files/emails/forgot-password.tsx +29 -0
- package/templates/nest-api/files/emails/main-layout.tsx +134 -0
- package/templates/nest-api/files/emails/password-changed.tsx +24 -0
- package/templates/nest-api/files/emails/reset-password.tsx +24 -0
- package/templates/nest-api/files/emails/set-password.tsx +25 -0
- package/templates/nest-api/files/emails/welcome.tsx +39 -0
- package/templates/nest-api/files/eslint.config.mjs +28 -0
- package/templates/nest-api/files/global.d.ts +5 -0
- package/templates/nest-api/files/nest-cli.json +8 -0
- package/templates/nest-api/files/package.json +150 -0
- package/templates/nest-api/files/prisma/schema/auth.prisma +75 -0
- package/templates/nest-api/files/prisma/schema/base.prisma +17 -0
- package/templates/nest-api/files/prisma/schema/enum.prisma +17 -0
- package/templates/nest-api/files/prisma/schema/notification.prisma +14 -0
- package/templates/nest-api/files/prisma.config.ts +13 -0
- package/templates/nest-api/files/public/.gitkeep +0 -0
- package/templates/nest-api/files/seeders/index.ts +27 -0
- package/templates/nest-api/files/seeders/util.ts +88 -0
- package/templates/nest-api/files/src/__tests__/app.controller.spec.ts +29 -0
- package/templates/nest-api/files/src/app.controller.ts +40 -0
- package/templates/nest-api/files/src/app.module.ts +268 -0
- package/templates/nest-api/files/src/app.resolver.ts +32 -0
- package/templates/nest-api/files/src/app.setup.ts +178 -0
- package/templates/nest-api/files/src/common/__tests__/auth.service.spec.ts +31 -0
- package/templates/nest-api/files/src/common/__tests__/cache.service.spec.ts +214 -0
- package/templates/nest-api/files/src/common/__tests__/config.service.spec.ts +56 -0
- package/templates/nest-api/files/src/common/__tests__/generator.service.spec.ts +114 -0
- package/templates/nest-api/files/src/common/__tests__/health.controller.spec.ts +72 -0
- package/templates/nest-api/files/src/common/__tests__/helpers.spec.ts +124 -0
- package/templates/nest-api/files/src/common/__tests__/mail.service.spec.ts +75 -0
- package/templates/nest-api/files/src/common/__tests__/prisma.indicator.spec.ts +39 -0
- package/templates/nest-api/files/src/common/__tests__/prisma.service.spec.ts +15 -0
- package/templates/nest-api/files/src/common/__tests__/records.spec.ts +87 -0
- package/templates/nest-api/files/src/common/__tests__/schemas.spec.ts +142 -0
- package/templates/nest-api/files/src/common/__tests__/throttler-storage.service.spec.ts +80 -0
- package/templates/nest-api/files/src/common/common.module.ts +72 -0
- package/templates/nest-api/files/src/common/constants/index.ts +2 -0
- package/templates/nest-api/files/src/common/constants/options.ts +52 -0
- package/templates/nest-api/files/src/common/constants/pino.ts +24 -0
- package/templates/nest-api/files/src/common/controllers/health.controller.ts +54 -0
- package/templates/nest-api/files/src/common/controllers/index.ts +2 -0
- package/templates/nest-api/files/src/common/controllers/metrics.controller.ts +21 -0
- package/templates/nest-api/files/src/common/decorators/index.ts +2 -0
- package/templates/nest-api/files/src/common/decorators/misc.decorator.ts +49 -0
- package/templates/nest-api/files/src/common/decorators/multi-part.decorator.ts +6 -0
- package/templates/nest-api/files/src/common/dto/filters.dto.ts +25 -0
- package/templates/nest-api/files/src/common/dto/index.ts +1 -0
- package/templates/nest-api/files/src/common/entity/index.ts +2 -0
- package/templates/nest-api/files/src/common/entity/ok.entity.ts +11 -0
- package/templates/nest-api/files/src/common/entity/pagination.entity.ts +24 -0
- package/templates/nest-api/files/src/common/exceptions/index.ts +1 -0
- package/templates/nest-api/files/src/common/exceptions/prisma.exception.ts +57 -0
- package/templates/nest-api/files/src/common/guards/feature-flag.guard.ts +51 -0
- package/templates/nest-api/files/src/common/guards/index.ts +1 -0
- package/templates/nest-api/files/src/common/interceptors/index.ts +1 -0
- package/templates/nest-api/files/src/common/interceptors/metrics.interceptor.ts +37 -0
- package/templates/nest-api/files/src/common/misc/helpers.ts +26 -0
- package/templates/nest-api/files/src/common/misc/index.ts +3 -0
- package/templates/nest-api/files/src/common/misc/origin-builder.ts +56 -0
- package/templates/nest-api/files/src/common/misc/prisma.indicator.ts +24 -0
- package/templates/nest-api/files/src/common/modules/index.ts +3 -0
- package/templates/nest-api/files/src/common/modules/logger.module.ts +104 -0
- package/templates/nest-api/files/src/common/modules/metrics.module.ts +28 -0
- package/templates/nest-api/files/src/common/modules/queue.module.ts +23 -0
- package/templates/nest-api/files/src/common/processors/index.ts +1 -0
- package/templates/nest-api/files/src/common/processors/mail/index.ts +47 -0
- package/templates/nest-api/files/src/common/processors/mail/process.ts +225 -0
- package/templates/nest-api/files/src/common/schemas/fields.ts +76 -0
- package/templates/nest-api/files/src/common/schemas/index.ts +1 -0
- package/templates/nest-api/files/src/common/services/auth-rate-limit.storage.ts +79 -0
- package/templates/nest-api/files/src/common/services/auth.service.ts +16 -0
- package/templates/nest-api/files/src/common/services/cache.service.ts +118 -0
- package/templates/nest-api/files/src/common/services/config.service.ts +388 -0
- package/templates/nest-api/files/src/common/services/feature-flag.service.ts +117 -0
- package/templates/nest-api/files/src/common/services/generator.service.ts +54 -0
- package/templates/nest-api/files/src/common/services/index.ts +10 -0
- package/templates/nest-api/files/src/common/services/logger.service.ts +14 -0
- package/templates/nest-api/files/src/common/services/mail.service.ts +44 -0
- package/templates/nest-api/files/src/common/services/prisma.service.ts +106 -0
- package/templates/nest-api/files/src/common/services/throttler-storage.service.ts +112 -0
- package/templates/nest-api/files/src/common/types/email.ts +55 -0
- package/templates/nest-api/files/src/common/types/index.ts +3 -0
- package/templates/nest-api/files/src/common/types/misc.ts +20 -0
- package/templates/nest-api/files/src/common/types/prisma.ts +18 -0
- package/templates/nest-api/files/src/common/utils/enum.ts +39 -0
- package/templates/nest-api/files/src/common/utils/helpers.ts +139 -0
- package/templates/nest-api/files/src/common/utils/index.ts +5 -0
- package/templates/nest-api/files/src/common/utils/ip.ts +22 -0
- package/templates/nest-api/files/src/common/utils/records.ts +66 -0
- package/templates/nest-api/files/src/common/utils/redis.keys.ts +31 -0
- package/templates/nest-api/files/src/lib/__tests__/access.spec.ts +33 -0
- package/templates/nest-api/files/src/lib/access.ts +114 -0
- package/templates/nest-api/files/src/lib/auth.ts +76 -0
- package/templates/nest-api/files/src/lib/rate-limit.ts +20 -0
- package/templates/nest-api/files/src/main.ts +28 -0
- package/templates/nest-api/files/src/media/__tests__/media.service.spec.ts +60 -0
- package/templates/nest-api/files/src/media/__tests__/s3.service.spec.ts +159 -0
- package/templates/nest-api/files/src/media/entity/file.entity.ts +7 -0
- package/templates/nest-api/files/src/media/entity/index.ts +1 -0
- package/templates/nest-api/files/src/media/media.module.ts +20 -0
- package/templates/nest-api/files/src/media/processors/index.ts +44 -0
- package/templates/nest-api/files/src/media/services/index.ts +2 -0
- package/templates/nest-api/files/src/media/services/media.service.ts +29 -0
- package/templates/nest-api/files/src/media/services/s3.service.ts +168 -0
- package/templates/nest-api/files/src/notifications/controllers/index.ts +1 -0
- package/templates/nest-api/files/src/notifications/controllers/notifications.controller.ts +72 -0
- package/templates/nest-api/files/src/notifications/dto/index.ts +1 -0
- package/templates/nest-api/files/src/notifications/dto/notification.dto.ts +11 -0
- package/templates/nest-api/files/src/notifications/entity/index.ts +1 -0
- package/templates/nest-api/files/src/notifications/entity/notification.entity.ts +37 -0
- package/templates/nest-api/files/src/notifications/notifications.module.ts +11 -0
- package/templates/nest-api/files/src/notifications/services/index.ts +1 -0
- package/templates/nest-api/files/src/notifications/services/notifications.service.ts +98 -0
- package/templates/nest-api/files/src/realtime/__tests__/events.gateway.spec.ts +88 -0
- package/templates/nest-api/files/src/realtime/__tests__/rooms.spec.ts +29 -0
- package/templates/nest-api/files/src/realtime/__tests__/ws-permissions.guard.spec.ts +54 -0
- package/templates/nest-api/files/src/realtime/adapters/redis-io.adapter.ts +57 -0
- package/templates/nest-api/files/src/realtime/constants/index.ts +68 -0
- package/templates/nest-api/files/src/realtime/decorators/index.ts +1 -0
- package/templates/nest-api/files/src/realtime/decorators/ws-permissions.decorator.ts +14 -0
- package/templates/nest-api/files/src/realtime/gateways/events.gateway.ts +187 -0
- package/templates/nest-api/files/src/realtime/guards/index.ts +2 -0
- package/templates/nest-api/files/src/realtime/guards/ws-auth.guard.ts +20 -0
- package/templates/nest-api/files/src/realtime/guards/ws-permissions.guard.ts +35 -0
- package/templates/nest-api/files/src/realtime/misc/session-from-socket.ts +54 -0
- package/templates/nest-api/files/src/realtime/realtime.module.ts +26 -0
- package/templates/nest-api/files/src/realtime/services/presence.service.ts +56 -0
- package/templates/nest-api/files/src/realtime/services/realtime.service.ts +72 -0
- package/templates/nest-api/files/src/users/__tests__/current-user.controller.spec.ts +77 -0
- package/templates/nest-api/files/src/users/__tests__/current-user.service.spec.ts +159 -0
- package/templates/nest-api/files/src/users/__tests__/user.entity.spec.ts +175 -0
- package/templates/nest-api/files/src/users/__tests__/users.controller.spec.ts +89 -0
- package/templates/nest-api/files/src/users/__tests__/users.service.spec.ts +398 -0
- package/templates/nest-api/files/src/users/controllers/current-user.controller.ts +82 -0
- package/templates/nest-api/files/src/users/controllers/index.ts +2 -0
- package/templates/nest-api/files/src/users/controllers/users.controller.ts +40 -0
- package/templates/nest-api/files/src/users/decorators/index.ts +1 -0
- package/templates/nest-api/files/src/users/decorators/permissions.decorator.ts +24 -0
- package/templates/nest-api/files/src/users/dto/avatar.dto.ts +13 -0
- package/templates/nest-api/files/src/users/dto/filters.dto.ts +8 -0
- package/templates/nest-api/files/src/users/dto/index.ts +2 -0
- package/templates/nest-api/files/src/users/entity/index.ts +1 -0
- package/templates/nest-api/files/src/users/entity/user.entity.ts +53 -0
- package/templates/nest-api/files/src/users/services/current-user.service.ts +46 -0
- package/templates/nest-api/files/src/users/services/index.ts +2 -0
- package/templates/nest-api/files/src/users/services/users.service.ts +88 -0
- package/templates/nest-api/files/src/users/users.module.ts +10 -0
- package/templates/nest-api/files/test/app.spec.ts +102 -0
- package/templates/nest-api/files/test/auth.spec.ts +108 -0
- package/templates/nest-api/files/test/current-user.spec.ts +154 -0
- package/templates/nest-api/files/test/factory/app.ts +172 -0
- package/templates/nest-api/files/test/factory/constants.ts +22 -0
- package/templates/nest-api/files/test/factory/dto.ts +27 -0
- package/templates/nest-api/files/test/factory/entity.ts +70 -0
- package/templates/nest-api/files/test/factory/gen.ts +75 -0
- package/templates/nest-api/files/test/factory/util.ts +21 -0
- package/templates/nest-api/files/test/notifications.spec.ts +176 -0
- package/templates/nest-api/files/test/rate-limit.spec.ts +180 -0
- package/templates/nest-api/files/test/setup.ts +1 -0
- package/templates/nest-api/files/test/users.spec.ts +437 -0
- package/templates/nest-api/files/tsconfig.build.json +13 -0
- package/templates/nest-api/files/tsconfig.json +35 -0
- package/templates/nest-api/files/vitest.config.ts +53 -0
- package/templates/nest-api/template.json +452 -0
- package/templates/node-worker/files/.bin/db.ts +123 -0
- package/templates/node-worker/files/.bin/helpers.ts +49 -0
- package/templates/node-worker/files/.bin/secrets.ts +68 -0
- package/templates/node-worker/files/.dockerignore +5 -0
- package/templates/node-worker/files/.env.example +21 -0
- package/templates/node-worker/files/.forgejo/workflows/build-and-push.yml +41 -0
- package/templates/node-worker/files/.nvmrc +1 -0
- package/templates/node-worker/files/.prettierignore +4 -0
- package/templates/node-worker/files/.prettierrc +8 -0
- package/templates/node-worker/files/.yarnrc.yml +5 -0
- package/templates/node-worker/files/Dockerfile +63 -0
- package/templates/node-worker/files/Dockerfile.dev +59 -0
- package/templates/node-worker/files/_gitignore +48 -0
- package/templates/node-worker/files/ecosystem.config.cjs +10 -0
- package/templates/node-worker/files/eslint.config.js +37 -0
- package/templates/node-worker/files/package.json +67 -0
- package/templates/node-worker/files/prisma/_gitignore +1 -0
- package/templates/node-worker/files/prisma/schema/base.prisma +36 -0
- package/templates/node-worker/files/prisma.config.ts +13 -0
- package/templates/node-worker/files/src/config.ts +55 -0
- package/templates/node-worker/files/src/db.ts +118 -0
- package/templates/node-worker/files/src/index.ts +7 -0
- package/templates/node-worker/files/src/logger.ts +45 -0
- package/templates/node-worker/files/src/types.ts +23 -0
- package/templates/node-worker/files/src/utils/browser.ts +16 -0
- package/templates/node-worker/files/src/utils/date.ts +68 -0
- package/templates/node-worker/files/src/utils/helpers.ts +17 -0
- package/templates/node-worker/files/src/utils/number.ts +47 -0
- package/templates/node-worker/files/src/utils/worker.ts +29 -0
- package/templates/node-worker/files/src/workers/constants.ts +6 -0
- package/templates/node-worker/files/src/workers/example/index.ts +27 -0
- package/templates/node-worker/files/src/workers/index.ts +1 -0
- package/templates/node-worker/files/tsconfig.json +30 -0
- package/templates/node-worker/template.json +135 -0
- package/templates/py-worker/files/.dockerignore +176 -0
- package/templates/py-worker/files/.env.example +20 -0
- package/templates/py-worker/files/.forgejo/workflows/build-amd-push.yml +39 -0
- package/templates/py-worker/files/Dockerfile +10 -0
- package/templates/py-worker/files/README.md +3 -0
- package/templates/py-worker/files/_gitignore +176 -0
- package/templates/py-worker/files/config.py +89 -0
- package/templates/py-worker/files/models/decorators.py +42 -0
- package/templates/py-worker/files/models/enums.py +32 -0
- package/templates/py-worker/files/models/mixins.py +61 -0
- package/templates/py-worker/files/requirements.txt +18 -0
- package/templates/py-worker/files/utils/db.py +67 -0
- package/templates/py-worker/files/utils/logger.py +97 -0
- package/templates/py-worker/files/utils/misc.py +45 -0
- package/templates/py-worker/files/utils/worker.py +80 -0
- package/templates/py-worker/files/worker.py +41 -0
- package/templates/py-worker/files/workers/hello/process.py +22 -0
- package/templates/py-worker/template.json +87 -0
- package/templates/react-app/README.md +78 -0
- package/templates/react-app/derive.sh +128 -0
- package/templates/react-app/files/.bin/openapi.js +32 -0
- package/templates/react-app/files/.bin/secrets.js +47 -0
- package/templates/react-app/files/.dockerignore +16 -0
- package/templates/react-app/files/.editorconfig +12 -0
- package/templates/react-app/files/.env.example +34 -0
- package/templates/react-app/files/.forgejo/workflows/build-and-push.yml +55 -0
- package/templates/react-app/files/.forgejo/workflows/ci.yml +39 -0
- package/templates/react-app/files/.husky/pre-commit +1 -0
- package/templates/react-app/files/.nvmrc +1 -0
- package/templates/react-app/files/.prettierignore +6 -0
- package/templates/react-app/files/.prettierrc +9 -0
- package/templates/react-app/files/.yarnrc.yml +2 -0
- package/templates/react-app/files/Dockerfile +52 -0
- package/templates/react-app/files/_gitignore +33 -0
- package/templates/react-app/files/build.sh +53 -0
- package/templates/react-app/files/docker/nginx.conf +134 -0
- package/templates/react-app/files/eslint.config.mjs +75 -0
- package/templates/react-app/files/index.html +62 -0
- package/templates/react-app/files/openapi-ts.config.ts +22 -0
- package/templates/react-app/files/package.json +80 -0
- package/templates/react-app/files/src/app/nav.tsx +32 -0
- package/templates/react-app/files/src/app/providers.tsx +39 -0
- package/templates/react-app/files/src/app/router.tsx +142 -0
- package/templates/react-app/files/src/app/store.ts +20 -0
- package/templates/react-app/files/src/features/auth/components/auth-card.tsx +23 -0
- package/templates/react-app/files/src/features/auth/components/checkbox-field.tsx +32 -0
- package/templates/react-app/files/src/features/auth/components/google-button.tsx +41 -0
- package/templates/react-app/files/src/features/auth/components/or-divider.tsx +9 -0
- package/templates/react-app/files/src/features/auth/components/password-field.tsx +70 -0
- package/templates/react-app/files/src/features/auth/components/submit-button.tsx +16 -0
- package/templates/react-app/files/src/features/auth/lib/auth-actions.ts +68 -0
- package/templates/react-app/files/src/features/auth/lib/password-strength.ts +20 -0
- package/templates/react-app/files/src/features/auth/lib/redirect.ts +6 -0
- package/templates/react-app/files/src/features/auth/lib/schemas.ts +37 -0
- package/templates/react-app/files/src/features/seo/routes.ts +65 -0
- package/templates/react-app/files/src/lib/env.ts +28 -0
- package/templates/react-app/files/src/lib/paths.ts +58 -0
- package/templates/react-app/files/src/main.tsx +19 -0
- package/templates/react-app/files/src/routes/admin/home.tsx +24 -0
- package/templates/react-app/files/src/routes/auth/forgot-password.tsx +93 -0
- package/templates/react-app/files/src/routes/auth/login.tsx +87 -0
- package/templates/react-app/files/src/routes/auth/reset-password.tsx +83 -0
- package/templates/react-app/files/src/routes/auth/signup.tsx +117 -0
- package/templates/react-app/files/src/routes/auth/verified.tsx +31 -0
- package/templates/react-app/files/src/routes/auth/verify-email.tsx +97 -0
- package/templates/react-app/files/src/routes/home.tsx +17 -0
- package/templates/react-app/files/src/routes/legal/privacy.tsx +26 -0
- package/templates/react-app/files/src/routes/legal/terms.tsx +28 -0
- package/templates/react-app/files/src/routes/marketing/home.tsx +18 -0
- package/templates/react-app/files/src/routes/settings.tsx +10 -0
- package/templates/react-app/files/src/shared/api/base-api.ts +24 -0
- package/templates/react-app/files/src/shared/api/base-query.ts +29 -0
- package/templates/react-app/files/src/shared/api/config.ts +21 -0
- package/templates/react-app/files/src/shared/api/index.ts +15 -0
- package/templates/react-app/files/src/shared/api/realtime-events.ts +34 -0
- package/templates/react-app/files/src/shared/api/socket.ts +41 -0
- package/templates/react-app/files/src/shared/api/store.ts +39 -0
- package/templates/react-app/files/src/shared/api/upload-query.ts +115 -0
- package/templates/react-app/files/src/shared/auth/client.ts +27 -0
- package/templates/react-app/files/src/shared/auth/config.ts +28 -0
- package/templates/react-app/files/src/shared/auth/guards.tsx +75 -0
- package/templates/react-app/files/src/shared/auth/hooks.ts +13 -0
- package/templates/react-app/files/src/shared/auth/index.ts +20 -0
- package/templates/react-app/files/src/shared/auth/logout.ts +23 -0
- package/templates/react-app/files/src/shared/auth/provider.tsx +52 -0
- package/templates/react-app/files/src/shared/auth/redirect.ts +65 -0
- package/templates/react-app/files/src/shared/auth/slice.ts +54 -0
- package/templates/react-app/files/src/shared/hooks/index.ts +6 -0
- package/templates/react-app/files/src/shared/layouts/app-shell/app-shell.tsx +225 -0
- package/templates/react-app/files/src/shared/layouts/app-shell/user-menu.tsx +74 -0
- package/templates/react-app/files/src/shared/layouts/auth-layout.tsx +137 -0
- package/templates/react-app/files/src/shared/layouts/error-boundary.tsx +38 -0
- package/templates/react-app/files/src/shared/layouts/index.ts +23 -0
- package/templates/react-app/files/src/shared/layouts/marketing/marketing-layout.tsx +29 -0
- package/templates/react-app/files/src/shared/layouts/marketing/section-heading.tsx +38 -0
- package/templates/react-app/files/src/shared/layouts/marketing/section.tsx +30 -0
- package/templates/react-app/files/src/shared/layouts/states/app-shell-skeleton.tsx +47 -0
- package/templates/react-app/files/src/shared/layouts/states/empty.tsx +22 -0
- package/templates/react-app/files/src/shared/layouts/states/forbidden.tsx +14 -0
- package/templates/react-app/files/src/shared/layouts/states/loading.tsx +11 -0
- package/templates/react-app/files/src/shared/layouts/states/not-found.tsx +21 -0
- package/templates/react-app/files/src/shared/layouts/states/page-skeleton.tsx +39 -0
- package/templates/react-app/files/src/shared/layouts/states/route-fallback.tsx +26 -0
- package/templates/react-app/files/src/shared/layouts/states/state-screen.tsx +22 -0
- package/templates/react-app/files/src/shared/types/README.md +28 -0
- package/templates/react-app/files/src/shared/types/api/index.ts +9 -0
- package/templates/react-app/files/src/shared/types/api/zod.gen.ts +5 -0
- package/templates/react-app/files/src/shared/types/index.ts +4 -0
- package/templates/react-app/files/src/shared/ui/components/brand/logo.tsx +51 -0
- package/templates/react-app/files/src/shared/ui/components/brand/social-icons.tsx +37 -0
- package/templates/react-app/files/src/shared/ui/components/form/form.tsx +120 -0
- package/templates/react-app/files/src/shared/ui/components/ui/alert.tsx +25 -0
- package/templates/react-app/files/src/shared/ui/components/ui/button.tsx +43 -0
- package/templates/react-app/files/src/shared/ui/components/ui/calendar.tsx +78 -0
- package/templates/react-app/files/src/shared/ui/components/ui/card.tsx +44 -0
- package/templates/react-app/files/src/shared/ui/components/ui/checkbox.tsx +16 -0
- package/templates/react-app/files/src/shared/ui/components/ui/date-picker.tsx +76 -0
- package/templates/react-app/files/src/shared/ui/components/ui/input.tsx +22 -0
- package/templates/react-app/files/src/shared/ui/components/ui/label.tsx +19 -0
- package/templates/react-app/files/src/shared/ui/components/ui/modal.tsx +94 -0
- package/templates/react-app/files/src/shared/ui/components/ui/popover.tsx +31 -0
- package/templates/react-app/files/src/shared/ui/components/ui/progress.tsx +33 -0
- package/templates/react-app/files/src/shared/ui/components/ui/search-input.tsx +69 -0
- package/templates/react-app/files/src/shared/ui/components/ui/select.tsx +80 -0
- package/templates/react-app/files/src/shared/ui/components/ui/skeleton.tsx +12 -0
- package/templates/react-app/files/src/shared/ui/components/ui/sonner.tsx +23 -0
- package/templates/react-app/files/src/shared/ui/components/ui/spinner.tsx +8 -0
- package/templates/react-app/files/src/shared/ui/components/ui/textarea.tsx +22 -0
- package/templates/react-app/files/src/shared/ui/index.ts +45 -0
- package/templates/react-app/files/src/shared/ui/lib/utils.ts +7 -0
- package/templates/react-app/files/src/shared/ui/lib/zod-setup.ts +28 -0
- package/templates/react-app/files/src/shared/ui/meta/brand.ts +18 -0
- package/templates/react-app/files/src/shared/ui/meta/meta-context.ts +30 -0
- package/templates/react-app/files/src/shared/ui/meta/meta-provider.tsx +24 -0
- package/templates/react-app/files/src/shared/ui/meta/page-meta.tsx +69 -0
- package/templates/react-app/files/src/shared/ui/meta/use-meta-config.ts +11 -0
- package/templates/react-app/files/src/shared/ui/styles/globals.css +285 -0
- package/templates/react-app/files/src/shared/ui/styles/theme.css +48 -0
- package/templates/react-app/files/src/shared/ui/theme/init-script.ts +23 -0
- package/templates/react-app/files/src/shared/ui/theme/theme-colors.ts +14 -0
- package/templates/react-app/files/src/shared/ui/theme/theme-context.ts +60 -0
- package/templates/react-app/files/src/shared/ui/theme/theme-provider.tsx +101 -0
- package/templates/react-app/files/src/shared/ui/theme/theme-toggle.tsx +40 -0
- package/templates/react-app/files/src/shared/ui/theme/use-theme.ts +11 -0
- package/templates/react-app/files/src/vite-env.d.ts +13 -0
- package/templates/react-app/files/tsconfig.json +26 -0
- package/templates/react-app/files/tsconfig.node.json +25 -0
- package/templates/react-app/files/vite.config.ts +344 -0
- package/templates/react-app/overrides/src/routes/auth/forgot-password.tsx +93 -0
- package/templates/react-app/overrides/src/routes/auth/login.tsx +87 -0
- package/templates/react-app/overrides/src/routes/auth/signup.tsx +117 -0
- package/templates/react-app/overrides/src/routes/auth/verified.tsx +31 -0
- package/templates/react-app/overrides/src/routes/auth/verify-email.tsx +97 -0
- package/templates/react-app/overrides/src/shared/auth/config.ts +28 -0
- package/templates/react-app/overrides/src/shared/auth/guards.tsx +75 -0
- package/templates/react-app/overrides/src/shared/auth/index.ts +20 -0
- package/templates/react-app/overrides/src/shared/auth/redirect.ts +65 -0
- package/templates/react-app/overrides/src/shared/hooks/index.ts +6 -0
- package/templates/react-app/overrides/src/shared/types/README.md +28 -0
- package/templates/react-app/template.json +222 -0
- package/templates/react-monorepo/files/.dockerignore +19 -0
- package/templates/react-monorepo/files/.editorconfig +12 -0
- package/templates/react-monorepo/files/.forgejo/workflows/build-and-push.yml +98 -0
- package/templates/react-monorepo/files/.forgejo/workflows/ci.yml +35 -0
- package/templates/react-monorepo/files/.husky/pre-commit +1 -0
- package/templates/react-monorepo/files/.nvmrc +1 -0
- package/templates/react-monorepo/files/.prettierignore +6 -0
- package/templates/react-monorepo/files/.prettierrc +9 -0
- package/templates/react-monorepo/files/.yarnrc.yml +2 -0
- package/templates/react-monorepo/files/Dockerfile +90 -0
- package/templates/react-monorepo/files/_gitignore +35 -0
- package/templates/react-monorepo/files/apps/admin/.bin/secrets.js +57 -0
- package/templates/react-monorepo/files/apps/admin/.env.example +16 -0
- package/templates/react-monorepo/files/apps/admin/eslint.config.mjs +3 -0
- package/templates/react-monorepo/files/apps/admin/index.html +57 -0
- package/templates/react-monorepo/files/apps/admin/package.json +33 -0
- package/templates/react-monorepo/files/apps/admin/src/App.tsx +3 -0
- package/templates/react-monorepo/files/apps/admin/src/app/nav.tsx +14 -0
- package/templates/react-monorepo/files/apps/admin/src/app/providers.tsx +42 -0
- package/templates/react-monorepo/files/apps/admin/src/app/router.tsx +50 -0
- package/templates/react-monorepo/files/apps/admin/src/app/store.ts +15 -0
- package/templates/react-monorepo/files/apps/admin/src/lib/env.ts +12 -0
- package/templates/react-monorepo/files/apps/admin/src/main.tsx +14 -0
- package/templates/react-monorepo/files/apps/admin/src/routes/home.tsx +17 -0
- package/templates/react-monorepo/files/apps/admin/src/routes/settings.tsx +10 -0
- package/templates/react-monorepo/files/apps/admin/src/vite-env.d.ts +14 -0
- package/templates/react-monorepo/files/apps/admin/tsconfig.json +10 -0
- package/templates/react-monorepo/files/apps/admin/vite.config.ts +13 -0
- package/templates/react-monorepo/files/apps/auth/.bin/secrets.js +57 -0
- package/templates/react-monorepo/files/apps/auth/.env.example +16 -0
- package/templates/react-monorepo/files/apps/auth/eslint.config.mjs +3 -0
- package/templates/react-monorepo/files/apps/auth/index.html +57 -0
- package/templates/react-monorepo/files/apps/auth/package.json +32 -0
- package/templates/react-monorepo/files/apps/auth/src/App.tsx +3 -0
- package/templates/react-monorepo/files/apps/auth/src/app/providers.tsx +42 -0
- package/templates/react-monorepo/files/apps/auth/src/app/router.tsx +19 -0
- package/templates/react-monorepo/files/apps/auth/src/app/store.ts +15 -0
- package/templates/react-monorepo/files/apps/auth/src/components/auth-card.tsx +23 -0
- package/templates/react-monorepo/files/apps/auth/src/components/checkbox-field.tsx +32 -0
- package/templates/react-monorepo/files/apps/auth/src/components/google-button.tsx +41 -0
- package/templates/react-monorepo/files/apps/auth/src/components/or-divider.tsx +9 -0
- package/templates/react-monorepo/files/apps/auth/src/components/password-field.tsx +70 -0
- package/templates/react-monorepo/files/apps/auth/src/components/submit-button.tsx +16 -0
- package/templates/react-monorepo/files/apps/auth/src/lib/auth-actions.ts +68 -0
- package/templates/react-monorepo/files/apps/auth/src/lib/env.ts +8 -0
- package/templates/react-monorepo/files/apps/auth/src/lib/password-strength.ts +20 -0
- package/templates/react-monorepo/files/apps/auth/src/lib/redirect.ts +6 -0
- package/templates/react-monorepo/files/apps/auth/src/lib/schemas.ts +37 -0
- package/templates/react-monorepo/files/apps/auth/src/main.tsx +14 -0
- package/templates/react-monorepo/files/apps/auth/src/routes/forgot-password.tsx +91 -0
- package/templates/react-monorepo/files/apps/auth/src/routes/login.tsx +82 -0
- package/templates/react-monorepo/files/apps/auth/src/routes/reset-password.tsx +83 -0
- package/templates/react-monorepo/files/apps/auth/src/routes/signup.tsx +117 -0
- package/templates/react-monorepo/files/apps/auth/src/routes/verified.tsx +30 -0
- package/templates/react-monorepo/files/apps/auth/src/routes/verify-email.tsx +96 -0
- package/templates/react-monorepo/files/apps/auth/src/vite-env.d.ts +14 -0
- package/templates/react-monorepo/files/apps/auth/tsconfig.json +10 -0
- package/templates/react-monorepo/files/apps/auth/vite.config.ts +13 -0
- package/templates/react-monorepo/files/apps/client/.bin/secrets.js +57 -0
- package/templates/react-monorepo/files/apps/client/.env.example +16 -0
- package/templates/react-monorepo/files/apps/client/eslint.config.mjs +3 -0
- package/templates/react-monorepo/files/apps/client/index.html +57 -0
- package/templates/react-monorepo/files/apps/client/package.json +35 -0
- package/templates/react-monorepo/files/apps/client/src/App.tsx +3 -0
- package/templates/react-monorepo/files/apps/client/src/app/nav.tsx +14 -0
- package/templates/react-monorepo/files/apps/client/src/app/providers.tsx +42 -0
- package/templates/react-monorepo/files/apps/client/src/app/router.tsx +50 -0
- package/templates/react-monorepo/files/apps/client/src/app/store.ts +15 -0
- package/templates/react-monorepo/files/apps/client/src/lib/env.ts +12 -0
- package/templates/react-monorepo/files/apps/client/src/main.tsx +19 -0
- package/templates/react-monorepo/files/apps/client/src/routes/home.tsx +17 -0
- package/templates/react-monorepo/files/apps/client/src/routes/settings.tsx +10 -0
- package/templates/react-monorepo/files/apps/client/src/vite-env.d.ts +15 -0
- package/templates/react-monorepo/files/apps/client/tsconfig.json +10 -0
- package/templates/react-monorepo/files/apps/client/vite.config.ts +120 -0
- package/templates/react-monorepo/files/apps/landing/.bin/secrets.js +57 -0
- package/templates/react-monorepo/files/apps/landing/.env.example +20 -0
- package/templates/react-monorepo/files/apps/landing/eslint.config.mjs +3 -0
- package/templates/react-monorepo/files/apps/landing/index.html +51 -0
- package/templates/react-monorepo/files/apps/landing/package.json +33 -0
- package/templates/react-monorepo/files/apps/landing/src/App.tsx +3 -0
- package/templates/react-monorepo/files/apps/landing/src/app/providers.tsx +42 -0
- package/templates/react-monorepo/files/apps/landing/src/app/router.tsx +21 -0
- package/templates/react-monorepo/files/apps/landing/src/app/store.ts +18 -0
- package/templates/react-monorepo/files/apps/landing/src/features/seo/routes.ts +65 -0
- package/templates/react-monorepo/files/apps/landing/src/lib/env.ts +10 -0
- package/templates/react-monorepo/files/apps/landing/src/main.tsx +14 -0
- package/templates/react-monorepo/files/apps/landing/src/routes/home.tsx +18 -0
- package/templates/react-monorepo/files/apps/landing/src/vite-env.d.ts +15 -0
- package/templates/react-monorepo/files/apps/landing/tsconfig.json +10 -0
- package/templates/react-monorepo/files/apps/landing/vite.config.ts +169 -0
- package/templates/react-monorepo/files/build.sh +61 -0
- package/templates/react-monorepo/files/docker/nginx.conf +136 -0
- package/templates/react-monorepo/files/package.json +37 -0
- package/templates/react-monorepo/files/packages/.gitkeep +0 -0
- package/templates/react-monorepo/files/packages/api/eslint.config.mjs +3 -0
- package/templates/react-monorepo/files/packages/api/package.json +30 -0
- package/templates/react-monorepo/files/packages/api/src/base-api.ts +24 -0
- package/templates/react-monorepo/files/packages/api/src/base-query.ts +29 -0
- package/templates/react-monorepo/files/packages/api/src/config.ts +21 -0
- package/templates/react-monorepo/files/packages/api/src/index.ts +15 -0
- package/templates/react-monorepo/files/packages/api/src/realtime-events.ts +34 -0
- package/templates/react-monorepo/files/packages/api/src/socket.ts +41 -0
- package/templates/react-monorepo/files/packages/api/src/store.ts +39 -0
- package/templates/react-monorepo/files/packages/api/src/upload-query.ts +115 -0
- package/templates/react-monorepo/files/packages/api/tsconfig.json +4 -0
- package/templates/react-monorepo/files/packages/auth/eslint.config.mjs +3 -0
- package/templates/react-monorepo/files/packages/auth/package.json +33 -0
- package/templates/react-monorepo/files/packages/auth/src/client.ts +27 -0
- package/templates/react-monorepo/files/packages/auth/src/config.ts +22 -0
- package/templates/react-monorepo/files/packages/auth/src/guards.tsx +61 -0
- package/templates/react-monorepo/files/packages/auth/src/hooks.ts +13 -0
- package/templates/react-monorepo/files/packages/auth/src/index.ts +20 -0
- package/templates/react-monorepo/files/packages/auth/src/logout.ts +23 -0
- package/templates/react-monorepo/files/packages/auth/src/provider.tsx +52 -0
- package/templates/react-monorepo/files/packages/auth/src/redirect.ts +37 -0
- package/templates/react-monorepo/files/packages/auth/src/slice.ts +54 -0
- package/templates/react-monorepo/files/packages/auth/tsconfig.json +4 -0
- package/templates/react-monorepo/files/packages/config/README.md +47 -0
- package/templates/react-monorepo/files/packages/config/eslint/base.mjs +83 -0
- package/templates/react-monorepo/files/packages/config/package.json +37 -0
- package/templates/react-monorepo/files/packages/config/tailwind/theme.css +48 -0
- package/templates/react-monorepo/files/packages/config/tsconfig/base.json +22 -0
- package/templates/react-monorepo/files/packages/config/tsconfig/node.json +9 -0
- package/templates/react-monorepo/files/packages/config/tsconfig/react.json +9 -0
- package/templates/react-monorepo/files/packages/config/vite/index.d.ts +18 -0
- package/templates/react-monorepo/files/packages/config/vite/index.mjs +129 -0
- package/templates/react-monorepo/files/packages/hooks/eslint.config.mjs +3 -0
- package/templates/react-monorepo/files/packages/hooks/package.json +16 -0
- package/templates/react-monorepo/files/packages/hooks/src/index.ts +3 -0
- package/templates/react-monorepo/files/packages/hooks/tsconfig.json +4 -0
- package/templates/react-monorepo/files/packages/layouts/eslint.config.mjs +3 -0
- package/templates/react-monorepo/files/packages/layouts/package.json +30 -0
- package/templates/react-monorepo/files/packages/layouts/src/app-shell/app-shell.tsx +225 -0
- package/templates/react-monorepo/files/packages/layouts/src/app-shell/user-menu.tsx +74 -0
- package/templates/react-monorepo/files/packages/layouts/src/auth-layout.tsx +137 -0
- package/templates/react-monorepo/files/packages/layouts/src/error-boundary.tsx +38 -0
- package/templates/react-monorepo/files/packages/layouts/src/index.ts +23 -0
- package/templates/react-monorepo/files/packages/layouts/src/marketing/marketing-layout.tsx +29 -0
- package/templates/react-monorepo/files/packages/layouts/src/marketing/section-heading.tsx +38 -0
- package/templates/react-monorepo/files/packages/layouts/src/marketing/section.tsx +30 -0
- package/templates/react-monorepo/files/packages/layouts/src/states/app-shell-skeleton.tsx +47 -0
- package/templates/react-monorepo/files/packages/layouts/src/states/empty.tsx +22 -0
- package/templates/react-monorepo/files/packages/layouts/src/states/forbidden.tsx +14 -0
- package/templates/react-monorepo/files/packages/layouts/src/states/loading.tsx +11 -0
- package/templates/react-monorepo/files/packages/layouts/src/states/not-found.tsx +21 -0
- package/templates/react-monorepo/files/packages/layouts/src/states/page-skeleton.tsx +39 -0
- package/templates/react-monorepo/files/packages/layouts/src/states/route-fallback.tsx +26 -0
- package/templates/react-monorepo/files/packages/layouts/src/states/state-screen.tsx +22 -0
- package/templates/react-monorepo/files/packages/layouts/tsconfig.json +4 -0
- package/templates/react-monorepo/files/packages/types/.bin/openapi.js +32 -0
- package/templates/react-monorepo/files/packages/types/.bin/secrets.js +57 -0
- package/templates/react-monorepo/files/packages/types/README.md +28 -0
- package/templates/react-monorepo/files/packages/types/eslint.config.mjs +3 -0
- package/templates/react-monorepo/files/packages/types/openapi-ts.config.ts +22 -0
- package/templates/react-monorepo/files/packages/types/package.json +29 -0
- package/templates/react-monorepo/files/packages/types/src/index.ts +4 -0
- package/templates/react-monorepo/files/packages/types/src/types/api/index.ts +9 -0
- package/templates/react-monorepo/files/packages/types/src/types/api/zod.gen.ts +5 -0
- package/templates/react-monorepo/files/packages/types/tsconfig.json +7 -0
- package/templates/react-monorepo/files/packages/ui/components.json +21 -0
- package/templates/react-monorepo/files/packages/ui/eslint.config.mjs +13 -0
- package/templates/react-monorepo/files/packages/ui/package.json +44 -0
- package/templates/react-monorepo/files/packages/ui/src/components/brand/logo.tsx +51 -0
- package/templates/react-monorepo/files/packages/ui/src/components/brand/social-icons.tsx +37 -0
- package/templates/react-monorepo/files/packages/ui/src/components/form/form.tsx +120 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/alert.tsx +25 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/button.tsx +43 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/calendar.tsx +78 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/card.tsx +44 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/checkbox.tsx +16 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/date-picker.tsx +76 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/input.tsx +22 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/label.tsx +19 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/modal.tsx +94 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/popover.tsx +31 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/progress.tsx +33 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/search-input.tsx +69 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/select.tsx +80 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/skeleton.tsx +12 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/sonner.tsx +23 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/spinner.tsx +8 -0
- package/templates/react-monorepo/files/packages/ui/src/components/ui/textarea.tsx +22 -0
- package/templates/react-monorepo/files/packages/ui/src/index.ts +45 -0
- package/templates/react-monorepo/files/packages/ui/src/lib/utils.ts +7 -0
- package/templates/react-monorepo/files/packages/ui/src/lib/zod-setup.ts +28 -0
- package/templates/react-monorepo/files/packages/ui/src/meta/brand.ts +18 -0
- package/templates/react-monorepo/files/packages/ui/src/meta/meta-context.ts +30 -0
- package/templates/react-monorepo/files/packages/ui/src/meta/meta-provider.tsx +24 -0
- package/templates/react-monorepo/files/packages/ui/src/meta/page-meta.tsx +69 -0
- package/templates/react-monorepo/files/packages/ui/src/meta/use-meta-config.ts +11 -0
- package/templates/react-monorepo/files/packages/ui/src/styles/globals.css +285 -0
- package/templates/react-monorepo/files/packages/ui/src/theme/init-script.ts +23 -0
- package/templates/react-monorepo/files/packages/ui/src/theme/theme-colors.ts +14 -0
- package/templates/react-monorepo/files/packages/ui/src/theme/theme-context.ts +60 -0
- package/templates/react-monorepo/files/packages/ui/src/theme/theme-provider.tsx +101 -0
- package/templates/react-monorepo/files/packages/ui/src/theme/theme-toggle.tsx +40 -0
- package/templates/react-monorepo/files/packages/ui/src/theme/use-theme.ts +11 -0
- package/templates/react-monorepo/files/packages/ui/tsconfig.json +9 -0
- package/templates/react-monorepo/files/turbo.json +24 -0
- package/templates/react-monorepo/template.json +230 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Unit Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- "**"
|
|
7
|
+
- "!main"
|
|
8
|
+
- "!development"
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
id-token: write
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test-and-build:
|
|
16
|
+
name: Test and Build
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repository
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
with:
|
|
23
|
+
submodules: recursive
|
|
24
|
+
|
|
25
|
+
- name: Use Node.js 24
|
|
26
|
+
uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: 24
|
|
29
|
+
cache: 'yarn'
|
|
30
|
+
|
|
31
|
+
- name: Enable Corepack
|
|
32
|
+
run: corepack enable
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: yarn install --immutable
|
|
36
|
+
|
|
37
|
+
- name: Install Infisical CLI
|
|
38
|
+
run: npm install -g @infisical/cli
|
|
39
|
+
|
|
40
|
+
- name: Fetch secrets
|
|
41
|
+
env:
|
|
42
|
+
INFISICAL_TOKEN: ${{ secrets.INFISICAL_TOKEN }}
|
|
43
|
+
INFISICAL_API_URL: https://inf.aurostack.co
|
|
44
|
+
run: yarn secrets -e test
|
|
45
|
+
|
|
46
|
+
- name: Generate Prisma client
|
|
47
|
+
run: yarn test:db:generate
|
|
48
|
+
|
|
49
|
+
- name: Run unit tests
|
|
50
|
+
run: yarn test
|
|
51
|
+
|
|
52
|
+
- name: Build
|
|
53
|
+
run: yarn build
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
24.16
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodeLinker: node-modules
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Stage 1: Build
|
|
2
|
+
FROM aurostack.dev/wesnetech/nodejs:24 AS build
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
# The image bundles Yarn 1.x; corepack switches to the Yarn 4 release pinned by
|
|
6
|
+
# package.json's `packageManager`, which is what can read yarn.lock.
|
|
7
|
+
RUN corepack enable
|
|
8
|
+
|
|
9
|
+
# yarn.lock and .yarnrc.yml must both land here: --immutable requires a lockfile,
|
|
10
|
+
# and without .yarnrc.yml Yarn uses PnP instead of the node-modules linker.
|
|
11
|
+
COPY package.json yarn.lock .yarnrc.yml ./
|
|
12
|
+
RUN yarn install --immutable
|
|
13
|
+
|
|
14
|
+
COPY tsconfig*.json nest-cli.json prisma.config.ts ./
|
|
15
|
+
COPY .bin ./.bin
|
|
16
|
+
COPY prisma ./prisma
|
|
17
|
+
RUN yarn db:generate
|
|
18
|
+
|
|
19
|
+
COPY src ./src
|
|
20
|
+
COPY public ./public
|
|
21
|
+
COPY emails ./emails
|
|
22
|
+
RUN yarn build
|
|
23
|
+
|
|
24
|
+
# Remove dev dependencies after build is done. Yarn 4 has no
|
|
25
|
+
# `install --production`; focusing the root workspace is its equivalent.
|
|
26
|
+
RUN yarn workspaces focus --all --production
|
|
27
|
+
|
|
28
|
+
# Stage 2: Production
|
|
29
|
+
FROM aurostack.dev/wesnetech/nodejs:24
|
|
30
|
+
WORKDIR /app
|
|
31
|
+
|
|
32
|
+
COPY package.json ./
|
|
33
|
+
COPY --from=build /app/node_modules ./node_modules
|
|
34
|
+
COPY --from=build /app/dist ./dist
|
|
35
|
+
COPY --from=build /app/public ./public
|
|
36
|
+
COPY --from=build /app/prisma ./prisma
|
|
37
|
+
|
|
38
|
+
EXPOSE 5000
|
|
39
|
+
|
|
40
|
+
CMD ["node", "dist/src/main"]
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# compiled output
|
|
2
|
+
/dist
|
|
3
|
+
/node_modules
|
|
4
|
+
|
|
5
|
+
# Logs
|
|
6
|
+
logs
|
|
7
|
+
*.log
|
|
8
|
+
npm-debug.log*
|
|
9
|
+
pnpm-debug.log*
|
|
10
|
+
yarn-debug.log*
|
|
11
|
+
yarn-error.log*
|
|
12
|
+
lerna-debug.log*
|
|
13
|
+
|
|
14
|
+
# yarn (berry, node-modules linker)
|
|
15
|
+
.yarn/*
|
|
16
|
+
!.yarn/patches
|
|
17
|
+
!.yarn/plugins
|
|
18
|
+
!.yarn/releases
|
|
19
|
+
!.yarn/sdks
|
|
20
|
+
!.yarn/versions
|
|
21
|
+
.pnp.*
|
|
22
|
+
yarn-error.log
|
|
23
|
+
|
|
24
|
+
# OS
|
|
25
|
+
.DS_Store
|
|
26
|
+
|
|
27
|
+
# Tests
|
|
28
|
+
/coverage
|
|
29
|
+
/.nyc_output
|
|
30
|
+
|
|
31
|
+
# IDEs and editors
|
|
32
|
+
/.idea
|
|
33
|
+
.project
|
|
34
|
+
.classpath
|
|
35
|
+
.c9/
|
|
36
|
+
*.launch
|
|
37
|
+
.settings/
|
|
38
|
+
*.sublime-workspace
|
|
39
|
+
|
|
40
|
+
# IDE - VSCode
|
|
41
|
+
.vscode/*
|
|
42
|
+
!.vscode/settings.json
|
|
43
|
+
!.vscode/tasks.json
|
|
44
|
+
!.vscode/launch.json
|
|
45
|
+
!.vscode/extensions.json
|
|
46
|
+
|
|
47
|
+
.env
|
|
48
|
+
.env.test
|
|
49
|
+
.env.production
|
|
50
|
+
.npmrc
|
|
51
|
+
docker-compose.dev.yaml
|
|
52
|
+
|
|
53
|
+
package-lock.json
|
|
54
|
+
|
|
55
|
+
# Local scratch under docs/ stays ignored; the canonical specs do not.
|
|
56
|
+
docs/*
|
|
57
|
+
!docs/*.md
|
|
58
|
+
prisma/schema.dbml
|
|
59
|
+
|
|
60
|
+
.react-email/
|
|
61
|
+
|
|
62
|
+
graphify-out/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Test stack. Separate containers and host ports from compose.yml, so running
|
|
2
|
+
# the suite never touches the database you are developing against.
|
|
3
|
+
name: acme-test
|
|
4
|
+
services:
|
|
5
|
+
wait:
|
|
6
|
+
container_name: acme-test-wait
|
|
7
|
+
image: ufoscout/docker-compose-wait:latest
|
|
8
|
+
command: sh -c '/wait && exit'
|
|
9
|
+
environment:
|
|
10
|
+
# List form, not a mapping: two `WAIT_HOSTS` mapping keys would be a
|
|
11
|
+
# duplicate-key error, whereas list entries are just strings and Compose
|
|
12
|
+
# takes the last one. The cache variant is therefore listed second.
|
|
13
|
+
- WAIT_HOSTS=database:5432 # @feature !cache
|
|
14
|
+
- WAIT_HOSTS=database:5432,redis:6379 # @feature cache
|
|
15
|
+
- WAIT_TIMEOUT=300
|
|
16
|
+
database:
|
|
17
|
+
container_name: acme-test-database
|
|
18
|
+
image: postgres:15.3
|
|
19
|
+
restart: always
|
|
20
|
+
ports:
|
|
21
|
+
- 5499:5432
|
|
22
|
+
environment:
|
|
23
|
+
POSTGRES_USER: root
|
|
24
|
+
POSTGRES_PASSWORD: postgres
|
|
25
|
+
POSTGRES_DB: main
|
|
26
|
+
# @feature:start cache
|
|
27
|
+
redis:
|
|
28
|
+
container_name: acme-test-redis
|
|
29
|
+
image: redis:7.4.1
|
|
30
|
+
restart: always
|
|
31
|
+
ports:
|
|
32
|
+
- 6399:6379
|
|
33
|
+
# @feature:end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: acme
|
|
2
|
+
services:
|
|
3
|
+
# Blocks until Postgres and Redis actually accept connections — `docker
|
|
4
|
+
# compose up -d` returns long before that, and every "connection refused" on
|
|
5
|
+
# a fresh machine traces back to skipping this. Driven by `yarn dc:wait`.
|
|
6
|
+
wait:
|
|
7
|
+
container_name: acme-wait
|
|
8
|
+
image: ufoscout/docker-compose-wait:latest
|
|
9
|
+
command: sh -c '/wait && exit'
|
|
10
|
+
environment:
|
|
11
|
+
# List form, not a mapping: two `WAIT_HOSTS` mapping keys would be a
|
|
12
|
+
# duplicate-key error, whereas list entries are just strings and Compose
|
|
13
|
+
# takes the last one. The cache variant is therefore listed second.
|
|
14
|
+
- WAIT_HOSTS=database:5432 # @feature !cache
|
|
15
|
+
- WAIT_HOSTS=database:5432,redis:6379 # @feature cache
|
|
16
|
+
- WAIT_TIMEOUT=300
|
|
17
|
+
database:
|
|
18
|
+
container_name: acme-database
|
|
19
|
+
image: postgres:15.3
|
|
20
|
+
restart: always
|
|
21
|
+
ports:
|
|
22
|
+
- 5432:5432
|
|
23
|
+
environment:
|
|
24
|
+
POSTGRES_USER: root
|
|
25
|
+
POSTGRES_PASSWORD: postgres
|
|
26
|
+
POSTGRES_DB: main
|
|
27
|
+
volumes:
|
|
28
|
+
- database:/var/lib/postgresql/data
|
|
29
|
+
# @feature:start cache
|
|
30
|
+
redis:
|
|
31
|
+
container_name: acme-redis
|
|
32
|
+
image: redis:7.4.1
|
|
33
|
+
restart: always
|
|
34
|
+
ports:
|
|
35
|
+
- 6379:6379
|
|
36
|
+
# @feature:end
|
|
37
|
+
|
|
38
|
+
volumes:
|
|
39
|
+
database:
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text, Img, Link } from '@react-email/components';
|
|
3
|
+
import { EmailProps, ActivationTwoFaData } from 'common/types';
|
|
4
|
+
import MainLayout, { Salutation, CN } from './main-layout';
|
|
5
|
+
|
|
6
|
+
interface AProps {
|
|
7
|
+
href: string;
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const A = ({ href, text }: AProps) => (
|
|
12
|
+
<Link className={CN.anchor} href={href} target="_blank" rel="noreferrer">
|
|
13
|
+
{text}
|
|
14
|
+
</Link>
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
const ActivationTwofa = ({
|
|
18
|
+
firstName,
|
|
19
|
+
...props
|
|
20
|
+
}: EmailProps<Omit<ActivationTwoFaData, 'qrcode'>>) => {
|
|
21
|
+
return (
|
|
22
|
+
<MainLayout {...props}>
|
|
23
|
+
<Salutation name={firstName} />
|
|
24
|
+
<Text className={CN.text}>
|
|
25
|
+
{
|
|
26
|
+
'You requested to enable two factor authentication. To configure authentication via TOTP on multiple devices, during setup, scan the QR code using each device at the same time.'
|
|
27
|
+
}
|
|
28
|
+
</Text>
|
|
29
|
+
<Img
|
|
30
|
+
src="cid:qrcode"
|
|
31
|
+
alt="Twofa QR Code"
|
|
32
|
+
title="QR Code"
|
|
33
|
+
width="200px"
|
|
34
|
+
height="200px"
|
|
35
|
+
/>
|
|
36
|
+
<Text className={CN.text}>
|
|
37
|
+
A time-based one-time password (TOTP) application automatically
|
|
38
|
+
generates an authentication code that changes after a certain period of
|
|
39
|
+
time. We recommend using cloud-based TOTP apps such as:{' '}
|
|
40
|
+
<A
|
|
41
|
+
href="https://support.1password.com/one-time-passwords"
|
|
42
|
+
text="1Password"
|
|
43
|
+
/>
|
|
44
|
+
, <A href="https://authy.com/guides/github" text="Authy" />,{' '}
|
|
45
|
+
<A href="https://lastpass.com/auth" text="LastPass Authenticator" />,{' '}
|
|
46
|
+
<A href="https://googleauthenticator.net" text="Google Authenticator" />
|
|
47
|
+
,{' '}
|
|
48
|
+
<A
|
|
49
|
+
href="https://www.microsoft.com/en-us/security/mobile-authenticator-app"
|
|
50
|
+
text="Microsoft Authenticator"
|
|
51
|
+
/>{' '}
|
|
52
|
+
and more.
|
|
53
|
+
</Text>
|
|
54
|
+
</MainLayout>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default ActivationTwofa;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text } from '@react-email/components';
|
|
3
|
+
import { EmailProps, ActivationData } from 'common/types';
|
|
4
|
+
import MainLayout, { Salutation, CN, CTAButton } from './main-layout';
|
|
5
|
+
|
|
6
|
+
const Activation = ({
|
|
7
|
+
firstName,
|
|
8
|
+
url,
|
|
9
|
+
...props
|
|
10
|
+
}: EmailProps<ActivationData>) => {
|
|
11
|
+
return (
|
|
12
|
+
<MainLayout {...props}>
|
|
13
|
+
<Salutation name={firstName} />
|
|
14
|
+
<Text className={CN.text}>
|
|
15
|
+
{
|
|
16
|
+
'You are nearly there! To complete your account setup, please confirm your email address by clicking the button below.'
|
|
17
|
+
}
|
|
18
|
+
</Text>
|
|
19
|
+
<CTAButton text="Activate your account" url={url} />
|
|
20
|
+
<Text className={CN.text}>
|
|
21
|
+
If the button above doesn't work, copy and paste the link below into
|
|
22
|
+
your browser:
|
|
23
|
+
</Text>
|
|
24
|
+
<Text
|
|
25
|
+
className={`text-xs underline underline-offset-2 text-[#525f7f] select-all break-all`}
|
|
26
|
+
>
|
|
27
|
+
{url}
|
|
28
|
+
</Text>
|
|
29
|
+
<Text className={CN.text}>
|
|
30
|
+
For security reasons, this activation link will expire in one hour.
|
|
31
|
+
</Text>
|
|
32
|
+
</MainLayout>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default Activation;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text } from '@react-email/components';
|
|
3
|
+
import { EmailProps, ForgotPasswordData } from 'common/types';
|
|
4
|
+
import MainLayout, {
|
|
5
|
+
Salutation,
|
|
6
|
+
CTAButton,
|
|
7
|
+
CN,
|
|
8
|
+
CTAFallback
|
|
9
|
+
} from './main-layout';
|
|
10
|
+
|
|
11
|
+
const ForgotPassword = ({ url, ...props }: EmailProps<ForgotPasswordData>) => {
|
|
12
|
+
return (
|
|
13
|
+
<MainLayout {...props}>
|
|
14
|
+
<Salutation />
|
|
15
|
+
<Text className={CN.text}>
|
|
16
|
+
{
|
|
17
|
+
'It looks like you requested a password reset. No worries — you can securely set a new password by clicking the button below.'
|
|
18
|
+
}
|
|
19
|
+
</Text>
|
|
20
|
+
<CTAButton text="Reset your password" url={url} />
|
|
21
|
+
<CTAFallback url={url} />
|
|
22
|
+
<Text className={CN.text}>
|
|
23
|
+
For security reasons, this activation link will expire in one hour.
|
|
24
|
+
</Text>
|
|
25
|
+
</MainLayout>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default ForgotPassword;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Html,
|
|
4
|
+
Head,
|
|
5
|
+
Container,
|
|
6
|
+
Preview,
|
|
7
|
+
Tailwind,
|
|
8
|
+
Font,
|
|
9
|
+
Body,
|
|
10
|
+
Section,
|
|
11
|
+
Text,
|
|
12
|
+
Hr,
|
|
13
|
+
Button
|
|
14
|
+
} from '@react-email/components';
|
|
15
|
+
import { EmailBaseProps } from 'common/types';
|
|
16
|
+
|
|
17
|
+
interface Props extends EmailBaseProps {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface SalutationProps {
|
|
22
|
+
name?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface OTPProps {
|
|
26
|
+
code: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface CTAButtonProps {
|
|
30
|
+
text: string;
|
|
31
|
+
url: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const CN = {
|
|
35
|
+
text: 'text-[#525f7f] text-base text-left',
|
|
36
|
+
anchor: 'text-primary underline underline-offset-2',
|
|
37
|
+
button:
|
|
38
|
+
'bg-[#000] rounded-md text-primary text-base font-semibold font-poppins decoration-0 text-center block w-full py-2',
|
|
39
|
+
hr: 'my-5 mx-0 border border-[#e6ebf1]'
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const MainLayout = ({
|
|
43
|
+
children,
|
|
44
|
+
subject = 'Email Title',
|
|
45
|
+
preview,
|
|
46
|
+
appName = 'API Starter',
|
|
47
|
+
footerText = 'API Starter, 354 Oyster Point Blvd, South San Francisco, CA 94080'
|
|
48
|
+
}: Props) => {
|
|
49
|
+
return (
|
|
50
|
+
<Html lang="en">
|
|
51
|
+
<Head>
|
|
52
|
+
<title>{subject}</title>
|
|
53
|
+
<link rel="preconnect" href="http://fonts.googleapis.com" />
|
|
54
|
+
<link rel="preconnect" href="http://fonts.gstatic.com" crossOrigin="" />
|
|
55
|
+
<Font
|
|
56
|
+
fontFamily="Poppins"
|
|
57
|
+
fallbackFontFamily="Verdana"
|
|
58
|
+
webFont={{
|
|
59
|
+
url: 'https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Raleway:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap',
|
|
60
|
+
format: 'opentype'
|
|
61
|
+
}}
|
|
62
|
+
/>
|
|
63
|
+
</Head>
|
|
64
|
+
{preview && <Preview>{preview}</Preview>}
|
|
65
|
+
<Tailwind
|
|
66
|
+
config={{
|
|
67
|
+
theme: {
|
|
68
|
+
extend: {
|
|
69
|
+
colors: {
|
|
70
|
+
primary: '#ffd54a'
|
|
71
|
+
},
|
|
72
|
+
fontFamily: {
|
|
73
|
+
poppins: ['Poppins', 'Verdana', 'sans-serif']
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
79
|
+
<Body className="bg-[#f6f9fc] font-poppins py-10">
|
|
80
|
+
<Container className="px-0 pt-5 pb-12 mx-auto my-0 bg-white border border-gray-100 border-solid rounded-md shadow-md">
|
|
81
|
+
<Section className="px-12 py-0">
|
|
82
|
+
{/* Text wordmark: swap in an <Img> once the project has a hosted logo. */}
|
|
83
|
+
<Text className="text-xl font-semibold text-[#333]">
|
|
84
|
+
{appName}
|
|
85
|
+
</Text>
|
|
86
|
+
<Hr className={CN.hr} />
|
|
87
|
+
{children}
|
|
88
|
+
<Text className={CN.text}>— {appName} Team</Text>
|
|
89
|
+
<Hr className={CN.hr} />
|
|
90
|
+
<Text className="text-[#8898aa] text-xs">{footerText}</Text>
|
|
91
|
+
</Section>
|
|
92
|
+
</Container>
|
|
93
|
+
</Body>
|
|
94
|
+
</Tailwind>
|
|
95
|
+
</Html>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const Salutation = ({ name }: SalutationProps) =>
|
|
100
|
+
name ? (
|
|
101
|
+
<Text className={CN.text}>
|
|
102
|
+
Hi <strong className="font-semibold">{name}</strong>,
|
|
103
|
+
</Text>
|
|
104
|
+
) : (
|
|
105
|
+
<Text className={CN.text}>Hi,</Text>
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
export const OTP = ({ code }: OTPProps) => (
|
|
109
|
+
<Text className={CN.text}>
|
|
110
|
+
One Time Code: <strong className="font-semibold">{code}</strong>
|
|
111
|
+
</Text>
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
export const CTAButton = ({ text, url }: CTAButtonProps) => (
|
|
115
|
+
<Button href={url} className={CN.button} target="_blank" rel="noreferrer">
|
|
116
|
+
{text}
|
|
117
|
+
</Button>
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
export const CTAFallback = ({ url }: { url: string }) => (
|
|
121
|
+
<>
|
|
122
|
+
<Text className={CN.text}>
|
|
123
|
+
If the button above doesn't work, copy and paste the link below into your
|
|
124
|
+
browser:
|
|
125
|
+
</Text>
|
|
126
|
+
<Text
|
|
127
|
+
className={`text-xs underline underline-offset-2 text-[#8898aa] select-all break-all`}
|
|
128
|
+
>
|
|
129
|
+
{url}
|
|
130
|
+
</Text>
|
|
131
|
+
</>
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
export default MainLayout;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text } from '@react-email/components';
|
|
3
|
+
import { EmailBaseProps } from 'common/types';
|
|
4
|
+
import MainLayout, { Salutation, CN } from './main-layout';
|
|
5
|
+
|
|
6
|
+
const PasswordChanged = ({ ...props }: EmailBaseProps) => {
|
|
7
|
+
return (
|
|
8
|
+
<MainLayout {...props}>
|
|
9
|
+
<Salutation />
|
|
10
|
+
<Text className={CN.text}>
|
|
11
|
+
{
|
|
12
|
+
'Your password was successfully changed. You can now sign in using your new credentials.'
|
|
13
|
+
}
|
|
14
|
+
</Text>
|
|
15
|
+
<Text className={CN.text}>
|
|
16
|
+
{
|
|
17
|
+
"If you didn't make this change or notice anything unusual, please reach out to our support team right away so we can help secure your account."
|
|
18
|
+
}
|
|
19
|
+
</Text>
|
|
20
|
+
</MainLayout>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default PasswordChanged;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text } from '@react-email/components';
|
|
3
|
+
import { EmailBaseProps } from 'common/types';
|
|
4
|
+
import MainLayout, { Salutation, CN } from './main-layout';
|
|
5
|
+
|
|
6
|
+
const ResetPassword = ({ ...props }: EmailBaseProps) => {
|
|
7
|
+
return (
|
|
8
|
+
<MainLayout {...props}>
|
|
9
|
+
<Salutation />
|
|
10
|
+
<Text className={CN.text}>
|
|
11
|
+
{
|
|
12
|
+
'You have successfully reset your password. You can now sign in using your new credentials.'
|
|
13
|
+
}
|
|
14
|
+
</Text>
|
|
15
|
+
<Text className={CN.text}>
|
|
16
|
+
{
|
|
17
|
+
"If you didn't make this change or notice anything unusual, please reach out to our support team right away so we can help secure your account."
|
|
18
|
+
}
|
|
19
|
+
</Text>
|
|
20
|
+
</MainLayout>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default ResetPassword;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text } from '@react-email/components';
|
|
3
|
+
import { EmailProps, SetPasswordData } from 'common/types';
|
|
4
|
+
import MainLayout, { Salutation, OTP, CN } from './main-layout';
|
|
5
|
+
|
|
6
|
+
const SetPassword = ({
|
|
7
|
+
firstName,
|
|
8
|
+
token,
|
|
9
|
+
...props
|
|
10
|
+
}: EmailProps<SetPasswordData>) => {
|
|
11
|
+
return (
|
|
12
|
+
<MainLayout {...props}>
|
|
13
|
+
<Salutation name={firstName} />
|
|
14
|
+
<Text className={CN.text}>
|
|
15
|
+
{
|
|
16
|
+
'A new account has been created for you using your email. Please use the one-time password below to set your account password.'
|
|
17
|
+
}
|
|
18
|
+
</Text>
|
|
19
|
+
<OTP code={token} />
|
|
20
|
+
<Text className={CN.text}>This code will expire in an hour.</Text>
|
|
21
|
+
</MainLayout>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default SetPassword;
|