├── apps ├── auth │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── workflows │ │ │ └── index.ts │ │ ├── config │ │ │ ├── swagger.config.ts │ │ │ ├── temporal.config.ts │ │ │ ├── app.config.ts │ │ │ └── env.config.ts │ │ ├── app │ │ │ ├── user │ │ │ │ ├── user.module.ts │ │ │ │ ├── user.service.ts │ │ │ │ ├── user.controller.spec.ts │ │ │ │ ├── user.service.spec.ts │ │ │ │ └── user.controller.ts │ │ │ ├── activities │ │ │ │ ├── activities.module.ts │ │ │ │ └── activities.service.ts │ │ │ ├── app.service.spec.ts │ │ │ └── app.controller.spec.ts │ │ └── main.ts │ ├── eslint.config.js │ ├── tsconfig.json │ ├── tsconfig.spec.json │ ├── tsconfig.app.json │ ├── jest.config.ts │ ├── webpack.config.js │ └── project.json ├── order │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── workflows │ │ │ ├── index.ts │ │ │ └── long-running.workflow.ts │ │ ├── config │ │ │ ├── swagger.config.ts │ │ │ ├── temporal.config.ts │ │ │ ├── app.config.ts │ │ │ └── env.config.ts │ │ ├── app │ │ │ ├── order │ │ │ │ ├── order.module.ts │ │ │ │ └── order.service.spec.ts │ │ │ ├── activities │ │ │ │ ├── activities.module.ts │ │ │ │ └── activities.service.ts │ │ │ ├── app.service.spec.ts │ │ │ └── app.controller.spec.ts │ │ └── main.ts │ ├── eslint.config.js │ ├── tsconfig.json │ ├── tsconfig.spec.json │ ├── jest.config.ts │ ├── tsconfig.app.json │ ├── webpack.config.js │ └── project.json ├── product │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── config │ │ │ ├── swagger.config.ts │ │ │ ├── app.config.ts │ │ │ └── env.config.ts │ │ ├── main.ts │ │ └── app │ │ │ ├── app.service.spec.ts │ │ │ ├── app.service.ts │ │ │ ├── app.controller.spec.ts │ │ │ ├── app.module.ts │ │ │ └── app.controller.ts │ ├── eslint.config.js │ ├── tsconfig.json │ ├── tsconfig.spec.json │ ├── jest.config.ts │ ├── tsconfig.app.json │ ├── webpack.config.js │ └── project.json ├── web │ ├── .gitignore │ ├── app │ │ ├── providers │ │ │ ├── workflows │ │ │ │ ├── services │ │ │ │ │ ├── index.ts │ │ │ │ │ └── order.ts │ │ │ │ ├── store │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── store.tsx │ │ │ │ ├── types │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── order.ts │ │ │ │ │ ├── events.ts │ │ │ │ │ └── workflow.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ ├── utils.ts │ │ │ │ ├── useCurrentWorkflow.ts │ │ │ │ └── useWorkflows.ts │ │ │ ├── auth │ │ │ │ ├── index.ts │ │ │ │ ├── hoc.tsx │ │ │ │ ├── hook.ts │ │ │ │ └── context.tsx │ │ │ ├── index.ts │ │ │ └── cart.tsx │ │ ├── constants │ │ │ ├── theme.ts │ │ │ ├── index.ts │ │ │ ├── links.ts │ │ │ └── navigation.ts │ │ ├── routes │ │ │ ├── logout.tsx │ │ │ ├── $.tsx │ │ │ ├── _index.tsx │ │ │ ├── product.tsx │ │ │ ├── email.$template.tsx │ │ │ ├── order-summary.tsx │ │ │ ├── order-history.tsx │ │ │ ├── order-detail.tsx │ │ │ ├── profile.tsx │ │ │ ├── admin.tsx │ │ │ └── marketplace.tsx │ │ ├── services │ │ │ └── logger.server.ts │ │ ├── pages │ │ │ ├── checkout │ │ │ │ ├── Successful.tsx │ │ │ │ ├── Failure.tsx │ │ │ │ └── Pending.tsx │ │ │ ├── PageLayout.tsx │ │ │ └── HomePage.tsx │ │ ├── tailwind.css │ │ ├── config │ │ │ ├── env.server.ts │ │ │ ├── utils.server.ts │ │ │ └── app.config.server.ts │ │ ├── hooks │ │ │ └── useProducts.ts │ │ └── cookies │ │ │ └── session.server.ts │ ├── public │ │ └── favicon.ico │ ├── test-setup.ts │ ├── eslint.config.cjs │ ├── remix.env.d.ts │ ├── project.json │ ├── tailwind.config.ts │ ├── tests │ │ └── routes │ │ │ └── _index.spec.tsx │ ├── remix.config.js │ ├── package.json │ ├── tsconfig.spec.json │ ├── tsconfig.app.json │ ├── vitest.config.ts │ └── tsconfig.json ├── auth-e2e │ ├── eslint.config.js │ ├── tsconfig.spec.json │ ├── tsconfig.json │ ├── src │ │ ├── support │ │ │ ├── global-teardown.ts │ │ │ ├── test-setup.ts │ │ │ └── global-setup.ts │ │ └── auth │ │ │ └── auth.spec.ts │ ├── project.json │ └── jest.config.ts ├── order-e2e │ ├── eslint.config.js │ ├── tsconfig.spec.json │ ├── tsconfig.json │ ├── src │ │ ├── support │ │ │ ├── global-teardown.ts │ │ │ ├── test-setup.ts │ │ │ └── global-setup.ts │ │ └── order │ │ │ └── order.spec.ts │ ├── project.json │ └── jest.config.ts └── product-e2e │ ├── eslint.config.js │ ├── tsconfig.spec.json │ ├── tsconfig.json │ ├── src │ ├── support │ │ ├── global-teardown.ts │ │ ├── test-setup.ts │ │ └── global-setup.ts │ └── product │ │ └── product.spec.ts │ ├── project.json │ └── jest.config.ts ├── libs ├── models │ ├── src │ │ ├── role │ │ │ ├── user-role.dto.ts │ │ │ ├── create-role.dto.ts │ │ │ ├── update-role.dto.ts │ │ │ └── role.dto.ts │ │ ├── validators │ │ │ ├── index.ts │ │ │ └── profanity.ts │ │ ├── manufacturer │ │ │ └── index.ts │ │ ├── auth │ │ │ ├── index.ts │ │ │ ├── login.dto.ts │ │ │ └── auth.dto.ts │ │ ├── order │ │ │ ├── index.ts │ │ │ └── update-order.dto.ts │ │ ├── user │ │ │ ├── index.ts │ │ │ ├── update-user.dto.ts │ │ │ └── create-user.dto.ts │ │ ├── product │ │ │ ├── index.ts │ │ │ ├── update-product.dto.ts │ │ │ └── create-product.dto.ts │ │ ├── enums.ts │ │ ├── index.ts │ │ └── transforms.ts │ ├── eslint.config.js │ ├── README.md │ ├── project.json │ ├── jest.config.ts │ ├── tsconfig.spec.json │ ├── tsconfig.json │ └── tsconfig.lib.json ├── backend │ ├── workflows │ │ ├── src │ │ │ ├── index.ts │ │ │ └── lib │ │ │ │ ├── constants.ts │ │ │ │ ├── utils.ts │ │ │ │ ├── index.ts │ │ │ │ ├── worker.ts │ │ │ │ └── workflows.module.ts │ │ ├── eslint.config.js │ │ ├── README.md │ │ ├── project.json │ │ ├── tsconfig.spec.json │ │ ├── jest.config.ts │ │ ├── tsconfig.lib.json │ │ └── tsconfig.json │ ├── core │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── logger │ │ │ │ │ ├── index.ts │ │ │ │ │ └── logger.ts │ │ │ │ ├── nest │ │ │ │ │ └── index.ts │ │ │ │ ├── order │ │ │ │ │ ├── index.ts │ │ │ │ │ └── providers.ts │ │ │ │ ├── security │ │ │ │ │ └── index.ts │ │ │ │ ├── swagger │ │ │ │ │ ├── index.ts │ │ │ │ │ └── setup.ts │ │ │ │ ├── health │ │ │ │ │ ├── index.ts │ │ │ │ │ └── health.module.ts │ │ │ │ ├── configuration │ │ │ │ │ ├── index.ts │ │ │ │ │ └── validation.ts │ │ │ │ ├── user │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── user.interface.ts │ │ │ │ │ ├── user.decorator.ts │ │ │ │ │ └── workflow.utils.ts │ │ │ │ ├── auth │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── auth.guard.ts │ │ │ │ │ ├── auth.service.ts │ │ │ │ │ ├── auth.module.ts │ │ │ │ │ └── jwt.strategy.ts │ │ │ │ ├── hashing.ts │ │ │ │ ├── workflows │ │ │ │ │ └── index.ts │ │ │ │ └── core.module.ts │ │ │ └── index.ts │ │ ├── eslint.config.js │ │ ├── README.md │ │ ├── types │ │ │ └── index.d.ts │ │ ├── project.json │ │ ├── tsconfig.spec.json │ │ ├── jest.config.ts │ │ ├── tsconfig.lib.json │ │ └── tsconfig.json │ ├── db │ │ ├── .gitignore │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── user │ │ │ │ │ ├── index.ts │ │ │ │ │ └── user-schema.module.ts │ │ │ │ ├── order │ │ │ │ │ ├── index.ts │ │ │ │ │ └── order-schema.module.ts │ │ │ │ ├── product │ │ │ │ │ ├── index.ts │ │ │ │ │ └── product-schema.module.ts │ │ │ │ ├── prisma.module.ts │ │ │ │ ├── db.module.ts │ │ │ │ └── prisma.service.ts │ │ │ └── index.ts │ │ ├── eslint.config.js │ │ ├── prisma │ │ │ └── migrations │ │ │ │ └── migration_lock.toml │ │ ├── project.json │ │ ├── tsconfig.spec.json │ │ ├── jest.config.ts │ │ ├── tsconfig.lib.json │ │ └── tsconfig.json │ ├── email │ │ ├── eslint.config.js │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── common │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── utils.ts │ │ │ │ │ ├── mjml.ts │ │ │ │ │ ├── header.ts │ │ │ │ │ ├── head.ts │ │ │ │ │ └── constants.ts │ │ │ │ ├── email.module.ts │ │ │ │ ├── order │ │ │ │ │ ├── orderPending.ts │ │ │ │ │ ├── orderFailed.ts │ │ │ │ │ └── orderSuccess.ts │ │ │ │ ├── template.ts │ │ │ │ ├── auth │ │ │ │ │ └── login.ts │ │ │ │ └── factory.ts │ │ │ └── config │ │ │ │ └── email.config.ts │ │ ├── README.md │ │ ├── project.json │ │ ├── tsconfig.spec.json │ │ ├── jest.config.ts │ │ ├── tsconfig.lib.json │ │ └── tsconfig.json │ └── payment │ │ ├── eslint.config.js │ │ ├── src │ │ ├── config │ │ │ ├── index.ts │ │ │ └── payment.config.ts │ │ ├── index.ts │ │ └── lib │ │ │ └── payment.module.ts │ │ ├── README.md │ │ ├── project.json │ │ ├── tsconfig.spec.json │ │ ├── jest.config.ts │ │ ├── tsconfig.lib.json │ │ └── tsconfig.json └── frontend │ └── ui │ ├── src │ ├── lib │ │ ├── layouts │ │ │ └── index.ts │ │ ├── navigation │ │ │ ├── index.ts │ │ │ ├── Navigation.stories.tsx │ │ │ └── MobileNavigation.stories.tsx │ │ ├── drawers │ │ │ ├── index.ts │ │ │ └── ShoppingCartDrawer.tsx │ │ ├── footer │ │ │ ├── Footer.spec.tsx │ │ │ └── Footer.stories.tsx │ │ ├── header │ │ │ ├── Header.spec.tsx │ │ │ └── Header.stories.tsx │ │ ├── inputs │ │ │ └── search │ │ │ │ ├── Search.spec.tsx │ │ │ │ └── Search.stories.tsx │ │ ├── buttons │ │ │ ├── button │ │ │ │ ├── Button.spec.tsx │ │ │ │ ├── Button.stories.tsx │ │ │ │ └── Button.tsx │ │ │ ├── theme │ │ │ │ ├── ThemeButton.spec.tsx │ │ │ │ ├── ThemeButton.stories.tsx │ │ │ │ └── ThemeButton.tsx │ │ │ └── checkout │ │ │ │ ├── CheckoutButton.spec.tsx │ │ │ │ └── CheckoutButton.tsx │ │ ├── icons │ │ │ ├── Mic.stories.tsx │ │ │ ├── Love.stories.tsx │ │ │ ├── Menu.stories.tsx │ │ │ ├── Close.stories.tsx │ │ │ ├── GitHub.stories.tsx │ │ │ ├── Search.stories.tsx │ │ │ ├── Close.tsx │ │ │ ├── Facebook.tsx │ │ │ ├── Menu.tsx │ │ │ ├── Facebook.stories.tsx │ │ │ ├── Instagram.stories.tsx │ │ │ ├── Love.tsx │ │ │ ├── Instagram.tsx │ │ │ ├── Search.tsx │ │ │ ├── Mic.tsx │ │ │ └── GitHub.tsx │ │ └── providers │ │ │ └── router.tsx │ ├── utils │ │ ├── index.ts │ │ ├── dom.ts │ │ ├── tailwind.ts │ │ └── cookie.ts │ ├── hooks │ │ ├── useAvatarUrl.ts │ │ └── useScroll.ts │ └── index.ts │ ├── .storybook │ ├── preview.ts │ ├── tailwind-imports.css │ └── main.ts │ ├── styles │ └── index.css │ ├── README.md │ ├── .babelrc │ ├── eslint.config.js │ ├── tsconfig.tailwind.json │ ├── tsconfig.json │ ├── package.json │ ├── postcss.config.js │ ├── tsconfig.lib.json │ └── tsconfig.storybook.json ├── .vscode ├── settings.json └── extensions.json ├── vitest.workspace.ts ├── jest.preset.js ├── .prettierignore ├── docker-entrypoint-initdb.d └── init-extensions.sql ├── .prettierrc ├── jest.config.ts ├── .editorconfig ├── .dockerignore ├── Dockerfile ├── deployment ├── scripts │ └── search-attributes.sh └── config │ └── dynamicconfig │ └── development.yaml ├── .gitignore ├── eslint.config.js ├── tsconfig.base.json ├── .github └── workflows │ └── ci.yml └── prompts └── thinking.md /apps/auth/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/order/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/product/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libs/models/src/role/user-role.dto.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libs/backend/workflows/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib'; 2 | -------------------------------------------------------------------------------- /apps/web/.gitignore: -------------------------------------------------------------------------------- 1 | .cache 2 | build 3 | public/build 4 | .env 5 | -------------------------------------------------------------------------------- /libs/frontend/ui/src/lib/layouts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Layout'; -------------------------------------------------------------------------------- /libs/models/src/validators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './profanity'; 2 | -------------------------------------------------------------------------------- /apps/auth/src/workflows/index.ts: -------------------------------------------------------------------------------- 1 | export * from './login.workflow'; 2 | -------------------------------------------------------------------------------- /libs/backend/core/src/lib/logger/index.ts: -------------------------------------------------------------------------------- 1 | export * from './logger'; 2 | -------------------------------------------------------------------------------- /libs/backend/core/src/lib/nest/index.ts: -------------------------------------------------------------------------------- 1 | export * from './bootstrap'; 2 | -------------------------------------------------------------------------------- /libs/backend/core/src/lib/order/index.ts: -------------------------------------------------------------------------------- 1 | export * from './workflow.utils'; -------------------------------------------------------------------------------- /libs/backend/core/src/lib/security/index.ts: -------------------------------------------------------------------------------- 1 | export * from './setup'; 2 | -------------------------------------------------------------------------------- /libs/backend/core/src/lib/swagger/index.ts: -------------------------------------------------------------------------------- 1 | export * from './setup'; 2 | -------------------------------------------------------------------------------- /libs/frontend/ui/src/lib/navigation/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Navigation'; -------------------------------------------------------------------------------- /libs/backend/core/src/lib/health/index.ts: -------------------------------------------------------------------------------- 1 | export * from './health.module'; 2 | -------------------------------------------------------------------------------- /libs/models/src/manufacturer/index.ts: -------------------------------------------------------------------------------- 1 | export * from './manufacturer.dto'; 2 | -------------------------------------------------------------------------------- /apps/web/app/providers/workflows/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from './order'; 2 | -------------------------------------------------------------------------------- /libs/backend/core/src/lib/configuration/index.ts: -------------------------------------------------------------------------------- 1 | export * from './validation'; 2 | -------------------------------------------------------------------------------- /libs/frontend/ui/src/lib/drawers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ShoppingCartDrawer'; 2 | -------------------------------------------------------------------------------- /apps/web/app/providers/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hoc'; 2 | export * from './hook'; 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "nxConsole.nxWorkspacePath": "${workspaceFolder}/nx.json" 3 | } -------------------------------------------------------------------------------- /libs/backend/workflows/src/lib/constants.ts: -------------------------------------------------------------------------------- 1 | export const WORKER_OPTIONS_TOKEN = 'WORKER_OPTIONS'; -------------------------------------------------------------------------------- /libs/models/src/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './login.dto'; 2 | export * from './auth.dto'; 3 | -------------------------------------------------------------------------------- /vitest.workspace.ts: -------------------------------------------------------------------------------- 1 | export default ['**/*/vite.config.{ts,mts}', '**/*/vitest.config.{ts,mts}']; 2 | -------------------------------------------------------------------------------- /apps/web/app/constants/theme.ts: -------------------------------------------------------------------------------- 1 | export enum THEME { 2 | DARK = 'dark', 3 | LIGHT = 'light', 4 | } 5 | -------------------------------------------------------------------------------- /libs/backend/db/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | # Keep environment variables out of version control 3 | .env 4 | -------------------------------------------------------------------------------- /libs/frontend/ui/.storybook/preview.ts: -------------------------------------------------------------------------------- 1 | import './tailwind-imports.css'; 2 | import '../styles/index.css'; -------------------------------------------------------------------------------- /apps/web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proyecto26/projectx/HEAD/apps/web/public/favicon.ico -------------------------------------------------------------------------------- /jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nx/jest/preset').default; 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /apps/order/src/workflows/index.ts: -------------------------------------------------------------------------------- 1 | export * from './order.workflow'; 2 | export * from './process-payment.workflow'; 3 | -------------------------------------------------------------------------------- /apps/web/app/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * from './links'; 2 | export * from './navigation'; 3 | export * from './theme'; 4 | -------------------------------------------------------------------------------- /libs/backend/workflows/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | export const delay = (ms: number) => new Promise((res) => setTimeout(res, ms)); 2 | -------------------------------------------------------------------------------- /apps/auth/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /apps/order/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /libs/backend/db/src/lib/user/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user-repository.service'; 2 | export * from './user-schema.module'; 3 | -------------------------------------------------------------------------------- /libs/frontend/ui/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './tailwind'; 2 | export * from './dom'; 3 | export * from './cookie'; 4 | -------------------------------------------------------------------------------- /apps/auth-e2e/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /apps/order-e2e/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /apps/product/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /libs/backend/db/src/lib/order/index.ts: -------------------------------------------------------------------------------- 1 | export * from './order-repository.service'; 2 | export * from './order-schema.module'; 3 | -------------------------------------------------------------------------------- /libs/backend/db/src/lib/product/index.ts: -------------------------------------------------------------------------------- 1 | export * from './product-repository.service'; 2 | export * from './product-schema.module'; -------------------------------------------------------------------------------- /libs/models/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | /dist 3 | /coverage 4 | /.nx/cache 5 | /.nx/workspace-data -------------------------------------------------------------------------------- /apps/product-e2e/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /apps/web/app/providers/workflows/store/index.ts: -------------------------------------------------------------------------------- 1 | export * from './reducer'; 2 | export * from './store'; 3 | export * from './types'; 4 | -------------------------------------------------------------------------------- /apps/web/app/providers/workflows/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './workflow'; 2 | export * from './events'; 3 | export * from './order'; 4 | -------------------------------------------------------------------------------- /docker-entrypoint-initdb.d/init-extensions.sql: -------------------------------------------------------------------------------- 1 | CREATE EXTENSION IF NOT EXISTS pg_trgm; 2 | CREATE EXTENSION IF NOT EXISTS postgis; 3 | -------------------------------------------------------------------------------- /libs/backend/core/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /libs/backend/db/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "singleQuote": true, 4 | "semi": true, 5 | "plugins": ["prettier-plugin-tailwindcss"] 6 | } 7 | -------------------------------------------------------------------------------- /libs/backend/email/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /libs/backend/payment/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /libs/backend/payment/src/config/index.ts: -------------------------------------------------------------------------------- 1 | export { default as paymentConfig } from './payment.config'; 2 | export * from './payment.config'; -------------------------------------------------------------------------------- /libs/backend/workflows/eslint.config.js: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig]; 4 | -------------------------------------------------------------------------------- /libs/frontend/ui/.storybook/tailwind-imports.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | @tailwind screens; 5 | -------------------------------------------------------------------------------- /libs/models/src/order/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-order.dto'; 2 | export * from './order.dto'; 3 | export * from './update-order.dto'; 4 | -------------------------------------------------------------------------------- /libs/models/src/user/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user.dto'; 2 | export * from './create-user.dto'; 3 | export * from './update-user.dto'; 4 | -------------------------------------------------------------------------------- /apps/web/test-setup.ts: -------------------------------------------------------------------------------- 1 | import { installGlobals } from '@remix-run/node'; 2 | import '@testing-library/jest-dom/matchers'; 3 | installGlobals(); 4 | -------------------------------------------------------------------------------- /libs/backend/email/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/template'; 2 | export * from './lib/email.module'; 3 | export * from './lib/email.service'; 4 | -------------------------------------------------------------------------------- /apps/web/app/providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cart'; 2 | export * from './query'; 3 | export * from './auth'; 4 | export * from './workflows'; 5 | -------------------------------------------------------------------------------- /libs/backend/core/src/lib/user/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user.decorator'; 2 | export * from './user.interface'; 3 | export * from './workflow.utils'; 4 | -------------------------------------------------------------------------------- /libs/models/src/product/index.ts: -------------------------------------------------------------------------------- 1 | export * from './product.dto'; 2 | export * from './create-product.dto'; 3 | export * from './update-product.dto'; 4 | -------------------------------------------------------------------------------- /apps/web/app/providers/workflows/constants.ts: -------------------------------------------------------------------------------- 1 | // HTTP STATUS GONE 2 | export const EXPIRED_STATUS_CODE = 410; 3 | export const NOT_FOUND_STATUS_CODE = 404; -------------------------------------------------------------------------------- /libs/backend/payment/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/payment.module'; 2 | export * from './lib/stripe/stripe.service'; 3 | export * from './config'; 4 | -------------------------------------------------------------------------------- /jest.config.ts: -------------------------------------------------------------------------------- 1 | import { getJestProjectsAsync } from '@nx/jest'; 2 | 3 | export default async () => ({ 4 | projects: await getJestProjectsAsync(), 5 | }); 6 | -------------------------------------------------------------------------------- /libs/frontend/ui/src/utils/dom.ts: -------------------------------------------------------------------------------- 1 | export const canUseDOM = 2 | typeof window !== 'undefined' && 3 | window.document && 4 | window.document.createElement; 5 | -------------------------------------------------------------------------------- /apps/web/eslint.config.cjs: -------------------------------------------------------------------------------- 1 | const baseConfig = require('../../eslint.config.js'); 2 | 3 | module.exports = [...baseConfig, { ignores: ['build', 'public/build'] }]; 4 | -------------------------------------------------------------------------------- /libs/backend/core/src/lib/user/user.interface.ts: -------------------------------------------------------------------------------- 1 | export interface AuthUser { 2 | id: number; 3 | username: string; 4 | email: string; 5 | roles: string[]; 6 | } -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "nrwl.angular-console", 4 | "esbenp.prettier-vscode", 5 | "firsttris.vscode-jest-runner" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /libs/models/src/enums.ts: -------------------------------------------------------------------------------- 1 | export enum Environment { 2 | Development = "development", 3 | Production = "production", 4 | Test = "test", 5 | Provision = "provision", 6 | } -------------------------------------------------------------------------------- /libs/backend/core/src/lib/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth.guard'; 2 | export * from './auth.module'; 3 | export * from './auth.service'; 4 | export * from './jwt.strategy'; 5 | -------------------------------------------------------------------------------- /libs/backend/db/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (i.e. Git) 3 | provider = "postgresql" -------------------------------------------------------------------------------- /libs/backend/email/src/lib/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './constants'; 2 | export * from './head'; 3 | export * from './header'; 4 | export * from './footer'; 5 | export * from './mjml'; 6 | -------------------------------------------------------------------------------- /apps/web/remix.env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | -------------------------------------------------------------------------------- /libs/frontend/ui/styles/index.css: -------------------------------------------------------------------------------- 1 | @import 'react-toastify/dist/ReactToastify.css'; 2 | 3 | @import './base.css'; 4 | @import './dark.css'; 5 | 6 | 7 | @view-transition: { 8 | navigation: auto; 9 | } -------------------------------------------------------------------------------- /libs/models/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './enums'; 2 | export * from './user'; 3 | export * from './auth'; 4 | export * from './manufacturer'; 5 | export * from './product'; 6 | export * from './order'; 7 | -------------------------------------------------------------------------------- /libs/frontend/ui/README.md: -------------------------------------------------------------------------------- 1 | # ui 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test ui` to execute the unit tests via [Vitest](https://vitest.dev/). 8 | -------------------------------------------------------------------------------- /libs/models/README.md: -------------------------------------------------------------------------------- 1 | # models 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test models` to execute the unit tests via [Jest](https://jestjs.io). 8 | -------------------------------------------------------------------------------- /libs/backend/email/src/lib/common/utils.ts: -------------------------------------------------------------------------------- 1 | // Add any utility functions here that can be reused across templates 2 | export function formatCurrency(amount: number): string { 3 | return `$${amount.toFixed(2)}`; 4 | } 5 | -------------------------------------------------------------------------------- /libs/backend/core/src/lib/auth/auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | import { AuthGuard } from '@nestjs/passport'; 3 | 4 | @Injectable() 5 | export class JwtAuthGuard extends AuthGuard('jwt') {} 6 | -------------------------------------------------------------------------------- /libs/backend/payment/README.md: -------------------------------------------------------------------------------- 1 | # payment 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test payment` to execute the unit tests via [Jest](https://jestjs.io). 8 | -------------------------------------------------------------------------------- /libs/backend/workflows/README.md: -------------------------------------------------------------------------------- 1 | # workflows 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test workflows` to execute the unit tests via [Jest](https://jestjs.io). 8 | -------------------------------------------------------------------------------- /libs/backend/core/README.md: -------------------------------------------------------------------------------- 1 | # ProjectX Core Library 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test core` to execute the unit tests via [Jest](https://jestjs.io). 8 | -------------------------------------------------------------------------------- /libs/backend/email/README.md: -------------------------------------------------------------------------------- 1 | # ProjectX Email Library 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test email` to execute the unit tests via [Jest](https://jestjs.io). 8 | -------------------------------------------------------------------------------- /apps/web/app/constants/links.ts: -------------------------------------------------------------------------------- 1 | export const GITHUB_URL = 'https://github.com/proyecto26'; 2 | export const FACEBOOK_URL = 'https://www.facebook.com/proyecto26'; 3 | export const INSTAGRAM_URL = 'https://www.instagram.com/proyecto_26'; 4 | -------------------------------------------------------------------------------- /libs/backend/db/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/db.module'; 2 | export * from './lib/prisma.module'; 3 | export * from './lib/prisma.service'; 4 | export * from './lib/user'; 5 | export * from './lib/order'; 6 | export * from './lib/product'; 7 | -------------------------------------------------------------------------------- /apps/web/app/providers/workflows/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useWorkflows'; 2 | export * from './useWorkflowActions'; 3 | export * from './useCurrentWorkflow'; 4 | export * from './services'; 5 | export * from './types'; 6 | export * from './store'; 7 | -------------------------------------------------------------------------------- /libs/backend/workflows/src/lib/index.ts: -------------------------------------------------------------------------------- 1 | export * from './worker'; 2 | export * from './constants'; 3 | export * from './client.service'; 4 | export * from './worker.service'; 5 | export * from './workflow.utils'; 6 | export * from './workflows.module'; -------------------------------------------------------------------------------- /apps/auth/src/config/swagger.config.ts: -------------------------------------------------------------------------------- 1 | import { registerAs } from '@nestjs/config'; 2 | 3 | export default registerAs('swagger', () => ({ 4 | title: 'Auth API', 5 | description: 'Provides the endpoints for authentication', 6 | version: '1.0', 7 | })); 8 | -------------------------------------------------------------------------------- /apps/order/src/config/swagger.config.ts: -------------------------------------------------------------------------------- 1 | import { registerAs } from '@nestjs/config'; 2 | 3 | export default registerAs('swagger', () => ({ 4 | title: 'Order API', 5 | description: 'Provides the endpoints for order management', 6 | version: '1.0', 7 | })); 8 | -------------------------------------------------------------------------------- /apps/product/src/config/swagger.config.ts: -------------------------------------------------------------------------------- 1 | import { registerAs } from '@nestjs/config'; 2 | 3 | export default registerAs('swagger', () => ({ 4 | title: 'Product API', 5 | description: 'Provides the endpoints for product management', 6 | version: '1.0', 7 | })); -------------------------------------------------------------------------------- /libs/backend/db/src/lib/prisma.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PrismaService } from './prisma.service'; 3 | 4 | @Module({ 5 | providers: [PrismaService], 6 | exports: [PrismaService], 7 | }) 8 | export class PrismaModule {} 9 | -------------------------------------------------------------------------------- /apps/web/app/routes/logout.tsx: -------------------------------------------------------------------------------- 1 | import { LoaderFunction } from '@remix-run/node'; 2 | 3 | import { logoutRedirect } from '~/cookies/auth.server'; 4 | 5 | export const loader: LoaderFunction = async ({ request }) => { 6 | throw await logoutRedirect(request); 7 | }; 8 | -------------------------------------------------------------------------------- /libs/models/src/role/create-role.dto.ts: -------------------------------------------------------------------------------- 1 | import { OmitType } from '@nestjs/swagger'; 2 | 3 | import { RoleDto } from './role.dto'; 4 | 5 | export class CreateRoleDto extends OmitType(RoleDto, [ 6 | 'id', 7 | 'createdAt', 8 | 'updatedAt', 9 | ] as const) {} 10 | -------------------------------------------------------------------------------- /libs/models/src/role/update-role.dto.ts: -------------------------------------------------------------------------------- 1 | import { OmitType, PartialType } from '@nestjs/swagger'; 2 | 3 | import { RoleDto } from './role.dto'; 4 | 5 | export class UpdateRoleDto extends PartialType( 6 | OmitType(RoleDto, ['createdAt', 'updatedAt'] as const) 7 | ) {} 8 | -------------------------------------------------------------------------------- /apps/auth-e2e/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["jest.config.ts", "src/**/*.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/auth/src/config/temporal.config.ts: -------------------------------------------------------------------------------- 1 | import { registerAs } from '@nestjs/config'; 2 | 3 | export default registerAs('temporal', () => ({ 4 | host: process.env.TEMPORAL_HOST, 5 | namespace: process.env.TEMPORAL_NAMESPACE || 'default', 6 | taskQueue: 'auth', 7 | })); 8 | -------------------------------------------------------------------------------- /apps/order-e2e/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["jest.config.ts", "src/**/*.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /apps/order/src/config/temporal.config.ts: -------------------------------------------------------------------------------- 1 | import { registerAs } from '@nestjs/config'; 2 | 3 | export default registerAs('temporal', () => ({ 4 | host: process.env.TEMPORAL_HOST, 5 | namespace: process.env.TEMPORAL_NAMESPACE || 'default', 6 | taskQueue: 'order', 7 | })); 8 | -------------------------------------------------------------------------------- /apps/product-e2e/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["jest.config.ts", "src/**/*.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /libs/models/src/user/update-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { OmitType, PartialType } from '@nestjs/swagger'; 2 | 3 | import { UserDto } from './user.dto'; 4 | 5 | export class UpdateUserDto extends PartialType( 6 | OmitType(UserDto, ['createdAt', 'updatedAt', 'deletedAt'] as const) 7 | ) {} 8 | -------------------------------------------------------------------------------- /libs/models/src/product/update-product.dto.ts: -------------------------------------------------------------------------------- 1 | import { OmitType, PartialType } from '@nestjs/swagger'; 2 | 3 | import { ProductDto } from './product.dto'; 4 | 5 | export class UpdateProductDto extends PartialType( 6 | OmitType(ProductDto, ['createdAt', 'updatedAt'] as const) 7 | ) {} 8 | -------------------------------------------------------------------------------- /apps/auth-e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.spec.json" 8 | } 9 | ], 10 | "compilerOptions": { 11 | "esModuleInterop": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/order-e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.spec.json" 8 | } 9 | ], 10 | "compilerOptions": { 11 | "esModuleInterop": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /libs/models/src/product/create-product.dto.ts: -------------------------------------------------------------------------------- 1 | import { OmitType } from '@nestjs/swagger'; 2 | 3 | import { ProductDto } from './product.dto'; 4 | 5 | export class CreateProductDto extends OmitType(ProductDto, [ 6 | 'id', 7 | 'createdAt', 8 | 'updatedAt', 9 | ] as const) {} 10 | -------------------------------------------------------------------------------- /libs/models/src/user/create-user.dto.ts: -------------------------------------------------------------------------------- 1 | import { OmitType } from '@nestjs/swagger'; 2 | 3 | import { UserDto } from './user.dto'; 4 | 5 | export class CreateUserDto extends OmitType(UserDto, [ 6 | 'id', 7 | 'createdAt', 8 | 'updatedAt', 9 | 'deletedAt', 10 | ] as const) {} 11 | -------------------------------------------------------------------------------- /apps/product-e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.spec.json" 8 | } 9 | ], 10 | "compilerOptions": { 11 | "esModuleInterop": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/web/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "apps/web", 5 | "projectType": "application", 6 | "tags": [], 7 | "// targets": "to see all targets run: nx show project web --web", 8 | "targets": {} 9 | } 10 | -------------------------------------------------------------------------------- /libs/backend/email/src/config/email.config.ts: -------------------------------------------------------------------------------- 1 | import { registerAs } from "@nestjs/config"; 2 | 3 | export default registerAs('email', () => ({ 4 | apiKey: process.env['SENDGRID_API_KEY'] ?? '', 5 | fromEmail: process.env['EMAIL_FROM'] ?? '', 6 | fromName: process.env['EMAIL_FROM_NAME'] ?? '', 7 | })); 8 | -------------------------------------------------------------------------------- /libs/frontend/ui/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nx/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "usage" 8 | } 9 | ], 10 | "@babel/preset-react", 11 | "@babel/preset-typescript" 12 | ], 13 | "plugins": [] 14 | } 15 | -------------------------------------------------------------------------------- /apps/auth-e2e/src/support/global-teardown.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | module.exports = async function () { 4 | // Put clean up logic here (e.g. stopping services, docker-compose, etc.). 5 | // Hint: `globalThis` is shared between setup and teardown. 6 | console.log(globalThis.__TEARDOWN_MESSAGE__); 7 | }; 8 | -------------------------------------------------------------------------------- /apps/order-e2e/src/support/global-teardown.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | module.exports = async function () { 4 | // Put clean up logic here (e.g. stopping services, docker-compose, etc.). 5 | // Hint: `globalThis` is shared between setup and teardown. 6 | console.log(globalThis.__TEARDOWN_MESSAGE__); 7 | }; 8 | -------------------------------------------------------------------------------- /apps/product-e2e/src/support/global-teardown.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | module.exports = async function () { 4 | // Put clean up logic here (e.g. stopping services, docker-compose, etc.). 5 | // Hint: `globalThis` is shared between setup and teardown. 6 | console.log(globalThis.__TEARDOWN_MESSAGE__); 7 | }; 8 | -------------------------------------------------------------------------------- /apps/web/app/services/logger.server.ts: -------------------------------------------------------------------------------- 1 | import { createLoggerOptions } from '@projectx/core/logger'; 2 | import pino from 'pino'; 3 | 4 | import { environment } from '~/config/app.config.server'; 5 | 6 | const loggerOptions = createLoggerOptions('info', 'web', environment); 7 | export const logger = pino(loggerOptions); 8 | -------------------------------------------------------------------------------- /libs/backend/core/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import { AuthUser } from '../src/lib/user/user.interface'; 2 | 3 | declare namespace Express { 4 | export interface Request { 5 | user?: AuthUser; 6 | } 7 | } 8 | 9 | declare module 'express' { 10 | export interface Request { 11 | user?: AuthUser; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /libs/backend/db/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "db", 3 | "$schema": "../../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "libs/backend/db/src", 5 | "projectType": "library", 6 | "tags": [], 7 | "// targets": "to see all targets run: nx show project db --web", 8 | "targets": {} 9 | } 10 | -------------------------------------------------------------------------------- /libs/models/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "models", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "libs/models/src", 5 | "projectType": "library", 6 | "tags": [], 7 | "// targets": "to see all targets run: nx show project models --web", 8 | "targets": {} 9 | } 10 | -------------------------------------------------------------------------------- /apps/auth-e2e/src/auth/auth.spec.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | describe('GET /api', () => { 4 | it('should return a message', async () => { 5 | const res = await axios.get(`/api`); 6 | 7 | expect(res.status).toBe(200); 8 | expect(res.data).toEqual({ message: 'Hello API' }); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /libs/backend/core/src/lib/order/providers.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Enum representing supported payment providers. 3 | * 4 | * @enum {string} 5 | */ 6 | export enum PaymentProvider { 7 | Stripe = 'Stripe', 8 | MercadoPago = 'MercadoPago', 9 | PayU = 'PayU', 10 | Wompi = 'Wompi', 11 | // Add more providers as needed 12 | } -------------------------------------------------------------------------------- /apps/order-e2e/src/order/order.spec.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | describe('GET /api', () => { 4 | it('should return a message', async () => { 5 | const res = await axios.get(`/api`); 6 | 7 | expect(res.status).toBe(200); 8 | expect(res.data).toEqual({ message: 'Hello API' }); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /libs/backend/core/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core", 3 | "$schema": "../../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "libs/backend/core/src", 5 | "projectType": "library", 6 | "tags": [], 7 | "// targets": "to see all targets run: nx show project core --web", 8 | "targets": {} 9 | } 10 | -------------------------------------------------------------------------------- /apps/product-e2e/src/product/product.spec.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | describe('GET /api', () => { 4 | it('should return a message', async () => { 5 | const res = await axios.get(`/api`); 6 | 7 | expect(res.status).toBe(200); 8 | expect(res.data).toEqual({ message: 'Hello API' }); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /libs/backend/email/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "email", 3 | "$schema": "../../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "libs/backend/email/src", 5 | "projectType": "library", 6 | "tags": [], 7 | "// targets": "to see all targets run: nx show project email --web", 8 | "targets": {} 9 | } 10 | -------------------------------------------------------------------------------- /apps/product/src/main.ts: -------------------------------------------------------------------------------- 1 | import { bootstrapApp } from '@projectx/core'; 2 | import { Logger } from '@nestjs/common'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | 6 | bootstrapApp(AppModule).catch((err) => { 7 | Logger.error( 8 | `⚠️ Application failed to start: ${err}` 9 | ) 10 | process.exit(1); 11 | }); 12 | -------------------------------------------------------------------------------- /libs/backend/payment/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "payment", 3 | "$schema": "../../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "libs/backend/payment/src", 5 | "projectType": "library", 6 | "tags": [], 7 | "// targets": "to see all targets run: nx show project payment --web", 8 | "targets": {} 9 | } 10 | -------------------------------------------------------------------------------- /libs/frontend/ui/src/hooks/useAvatarUrl.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | import md5 from 'md5'; 3 | 4 | export const useAvatarUrl = (email: string) => { 5 | return useMemo(() => { 6 | return email 7 | ? `https://gravatar.com/avatar/${md5(email)}?s=400&d=robohash&r=x` 8 | : ''; 9 | }, [email]); 10 | }; 11 | -------------------------------------------------------------------------------- /libs/frontend/ui/src/lib/footer/Footer.spec.tsx: -------------------------------------------------------------------------------- 1 | import { render } from '@testing-library/react'; 2 | 3 | import Footer from './Footer'; 4 | 5 | describe('Footer', () => { 6 | it('should render successfully', () => { 7 | const { baseElement } = render(