├── .gitignore ├── README.md ├── apacke-kafka ├── README.md ├── connector │ └── elastisearch.properties └── docker-compose.yaml ├── codebank ├── .env.example ├── Dockerfile ├── Dockerfile.prod ├── Makefile ├── db.sql ├── docker-compose.yaml ├── domain │ ├── credit_card.go │ └── transaction.go ├── dto │ └── transaction.go ├── go.mod ├── go.sum ├── infrastructure │ ├── grpc │ │ ├── pb │ │ │ ├── payment.pb.go │ │ │ └── payment_grpc.pb.go │ │ ├── protofile │ │ │ └── payment.proto │ │ ├── server │ │ │ └── server.go │ │ └── service │ │ │ └── transaction.go │ ├── kafka │ │ └── producer.go │ └── repository │ │ └── transaction.go ├── main.go └── usecase │ └── process_transaction.go ├── img ├── nestjs.svg └── nextjs.png ├── invoices-api ├── .docker │ ├── entrypoint.sh │ └── postgres │ │ └── Dockerfile ├── .env.example ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── .vscode │ └── settings.json ├── Dockerfile ├── Dockerfile.prod ├── README.md ├── api.http ├── docker-compose.yaml ├── nest-cli.json ├── package-lock.json ├── package.json ├── src │ ├── app.controller.spec.ts │ ├── app.controller.ts │ ├── app.module.ts │ ├── app.service.ts │ ├── exception-filters │ │ └── entity-not-found.exception-filter.ts │ ├── invoices │ │ ├── credit-cards.controller.ts │ │ ├── credit-cards.service.ts │ │ ├── dto │ │ │ ├── create-credit-card.dto.ts │ │ │ └── create-invoice.dto.ts │ │ ├── entities │ │ │ ├── credit-card.entity.ts │ │ │ └── invoice.entity.ts │ │ ├── invoices.controller.spec.ts │ │ ├── invoices.controller.ts │ │ ├── invoices.module.ts │ │ ├── invoices.service.spec.ts │ │ └── invoices.service.ts │ ├── main.ts │ ├── migrations │ │ ├── 1625441620427-create-credit-cards-table.ts │ │ └── 1625441676055-create-invoices-table.ts │ └── validators │ │ ├── exists.rule.ts │ │ ├── min-callback.rule.ts │ │ └── not-exists.rule.ts ├── test │ ├── app.e2e-spec.ts │ └── jest-e2e.json ├── tsconfig.build.json └── tsconfig.json ├── invoices-frontend ├── .docker │ └── entrypoint.sh ├── .env.example ├── .eslintrc ├── .gitignore ├── .vscode │ └── settings.json ├── Dockerfile ├── README.md ├── docker-compose.yaml ├── next-env.d.ts ├── next.config.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ └── vercel.svg ├── src │ ├── components │ │ └── Navbar.tsx │ ├── http.ts │ ├── model.ts │ ├── pages │ │ ├── 404.tsx │ │ ├── _app.tsx │ │ ├── _document.tsx │ │ ├── api │ │ │ └── hello.ts │ │ ├── index.tsx │ │ └── invoices │ │ │ └── index.tsx │ └── theme.ts └── tsconfig.json ├── k8s ├── codebank │ ├── configmap.yaml │ ├── deploy.yaml │ └── service.yaml └── invoices-api │ ├── configmap.yaml │ ├── deploy.yaml │ └── service.yaml ├── store-api ├── .docker │ ├── entrypoint.sh │ └── postgres │ │ ├── Dockerfile │ │ └── init.sql ├── .env.example ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── .vscode │ └── settings.json ├── Dockerfile ├── README.md ├── api.http ├── docker-compose.yaml ├── nest-cli.json ├── package-lock.json ├── package.json ├── src │ ├── app.controller.spec.ts │ ├── app.controller.ts │ ├── app.module.ts │ ├── app.service.ts │ ├── exception-filters │ │ ├── entity-not-found.exception-filter.ts │ │ └── rpc.exception-filter.ts │ ├── main.ts │ ├── migrations │ │ ├── 1625262588200-create-products-table.ts │ │ ├── 1625343914687-create-orders-table.ts │ │ └── 1625343922816-create-order-items-table.ts │ ├── orders │ │ ├── dto │ │ │ ├── create-order.dto.ts │ │ │ └── update-order.dto.ts │ │ ├── entities │ │ │ ├── credit-card.embbeded.ts │ │ │ ├── order-item.entity.ts │ │ │ └── order.entity.ts │ │ ├── orders.controller.spec.ts │ │ ├── orders.controller.ts │ │ ├── orders.module.ts │ │ ├── orders.service.spec.ts │ │ ├── orders.service.ts │ │ ├── payment │ │ │ ├── payment.service.spec.ts │ │ │ └── payment.service.ts │ │ └── proto │ │ │ └── payment.proto │ ├── products │ │ ├── dto │ │ │ ├── create-product.dto.ts │ │ │ └── update-product.dto.ts │ │ ├── entities │ │ │ └── product.entity.ts │ │ ├── products.controller.spec.ts │ │ ├── products.controller.ts │ │ ├── products.module.ts │ │ ├── products.service.spec.ts │ │ └── products.service.ts │ └── validators │ │ ├── exists.rule.ts │ │ └── min-callback.rule.ts ├── test │ ├── app.e2e-spec.ts │ └── jest-e2e.json ├── tsconfig.build.json └── tsconfig.json └── store-frontend ├── .docker └── entrypoint.sh ├── .env.example ├── .eslintrc ├── .gitignore ├── .vscode └── settings.json ├── Dockerfile ├── README.md ├── docker-compose.yaml ├── next-env.d.ts ├── next.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── vercel.svg ├── src ├── components │ └── Navbar.tsx ├── http.ts ├── model.ts ├── pages │ ├── 404.tsx │ ├── _app.tsx │ ├── _document.tsx │ ├── api │ │ ├── hello.ts │ │ └── products │ │ │ ├── [slug].tsx │ │ │ └── index.ts │ ├── index.tsx │ ├── orders │ │ └── [id].tsx │ └── products │ │ └── [slug] │ │ ├── index.tsx │ │ └── order.tsx └── theme.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .pgdata 3 | .env 4 | .history/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/README.md -------------------------------------------------------------------------------- /apacke-kafka/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/apacke-kafka/README.md -------------------------------------------------------------------------------- /apacke-kafka/connector/elastisearch.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/apacke-kafka/connector/elastisearch.properties -------------------------------------------------------------------------------- /apacke-kafka/docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/apacke-kafka/docker-compose.yaml -------------------------------------------------------------------------------- /codebank/.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/.env.example -------------------------------------------------------------------------------- /codebank/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/Dockerfile -------------------------------------------------------------------------------- /codebank/Dockerfile.prod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/Dockerfile.prod -------------------------------------------------------------------------------- /codebank/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/Makefile -------------------------------------------------------------------------------- /codebank/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/db.sql -------------------------------------------------------------------------------- /codebank/docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/docker-compose.yaml -------------------------------------------------------------------------------- /codebank/domain/credit_card.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/domain/credit_card.go -------------------------------------------------------------------------------- /codebank/domain/transaction.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/domain/transaction.go -------------------------------------------------------------------------------- /codebank/dto/transaction.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/dto/transaction.go -------------------------------------------------------------------------------- /codebank/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/go.mod -------------------------------------------------------------------------------- /codebank/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/go.sum -------------------------------------------------------------------------------- /codebank/infrastructure/grpc/pb/payment.pb.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/infrastructure/grpc/pb/payment.pb.go -------------------------------------------------------------------------------- /codebank/infrastructure/grpc/pb/payment_grpc.pb.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/infrastructure/grpc/pb/payment_grpc.pb.go -------------------------------------------------------------------------------- /codebank/infrastructure/grpc/protofile/payment.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/infrastructure/grpc/protofile/payment.proto -------------------------------------------------------------------------------- /codebank/infrastructure/grpc/server/server.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/infrastructure/grpc/server/server.go -------------------------------------------------------------------------------- /codebank/infrastructure/grpc/service/transaction.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/infrastructure/grpc/service/transaction.go -------------------------------------------------------------------------------- /codebank/infrastructure/kafka/producer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/infrastructure/kafka/producer.go -------------------------------------------------------------------------------- /codebank/infrastructure/repository/transaction.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/infrastructure/repository/transaction.go -------------------------------------------------------------------------------- /codebank/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/main.go -------------------------------------------------------------------------------- /codebank/usecase/process_transaction.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/codebank/usecase/process_transaction.go -------------------------------------------------------------------------------- /img/nestjs.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/img/nestjs.svg -------------------------------------------------------------------------------- /img/nextjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/img/nextjs.png -------------------------------------------------------------------------------- /invoices-api/.docker/entrypoint.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/.docker/entrypoint.sh -------------------------------------------------------------------------------- /invoices-api/.docker/postgres/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/.docker/postgres/Dockerfile -------------------------------------------------------------------------------- /invoices-api/.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/.env.example -------------------------------------------------------------------------------- /invoices-api/.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/.eslintrc.js -------------------------------------------------------------------------------- /invoices-api/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/.gitignore -------------------------------------------------------------------------------- /invoices-api/.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/.prettierrc -------------------------------------------------------------------------------- /invoices-api/.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/.vscode/settings.json -------------------------------------------------------------------------------- /invoices-api/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/Dockerfile -------------------------------------------------------------------------------- /invoices-api/Dockerfile.prod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/Dockerfile.prod -------------------------------------------------------------------------------- /invoices-api/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/README.md -------------------------------------------------------------------------------- /invoices-api/api.http: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/api.http -------------------------------------------------------------------------------- /invoices-api/docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/docker-compose.yaml -------------------------------------------------------------------------------- /invoices-api/nest-cli.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/nest-cli.json -------------------------------------------------------------------------------- /invoices-api/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/package-lock.json -------------------------------------------------------------------------------- /invoices-api/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/package.json -------------------------------------------------------------------------------- /invoices-api/src/app.controller.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/app.controller.spec.ts -------------------------------------------------------------------------------- /invoices-api/src/app.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/app.controller.ts -------------------------------------------------------------------------------- /invoices-api/src/app.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/app.module.ts -------------------------------------------------------------------------------- /invoices-api/src/app.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/app.service.ts -------------------------------------------------------------------------------- /invoices-api/src/exception-filters/entity-not-found.exception-filter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/exception-filters/entity-not-found.exception-filter.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/credit-cards.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/credit-cards.controller.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/credit-cards.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/credit-cards.service.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/dto/create-credit-card.dto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/dto/create-credit-card.dto.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/dto/create-invoice.dto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/dto/create-invoice.dto.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/entities/credit-card.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/entities/credit-card.entity.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/entities/invoice.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/entities/invoice.entity.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/invoices.controller.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/invoices.controller.spec.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/invoices.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/invoices.controller.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/invoices.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/invoices.module.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/invoices.service.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/invoices.service.spec.ts -------------------------------------------------------------------------------- /invoices-api/src/invoices/invoices.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/invoices/invoices.service.ts -------------------------------------------------------------------------------- /invoices-api/src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/main.ts -------------------------------------------------------------------------------- /invoices-api/src/migrations/1625441620427-create-credit-cards-table.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/migrations/1625441620427-create-credit-cards-table.ts -------------------------------------------------------------------------------- /invoices-api/src/migrations/1625441676055-create-invoices-table.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/migrations/1625441676055-create-invoices-table.ts -------------------------------------------------------------------------------- /invoices-api/src/validators/exists.rule.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/validators/exists.rule.ts -------------------------------------------------------------------------------- /invoices-api/src/validators/min-callback.rule.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/validators/min-callback.rule.ts -------------------------------------------------------------------------------- /invoices-api/src/validators/not-exists.rule.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/src/validators/not-exists.rule.ts -------------------------------------------------------------------------------- /invoices-api/test/app.e2e-spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/test/app.e2e-spec.ts -------------------------------------------------------------------------------- /invoices-api/test/jest-e2e.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/test/jest-e2e.json -------------------------------------------------------------------------------- /invoices-api/tsconfig.build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/tsconfig.build.json -------------------------------------------------------------------------------- /invoices-api/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-api/tsconfig.json -------------------------------------------------------------------------------- /invoices-frontend/.docker/entrypoint.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/.docker/entrypoint.sh -------------------------------------------------------------------------------- /invoices-frontend/.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_INVOICE_API_URL=http://host.docker.internal:3002 -------------------------------------------------------------------------------- /invoices-frontend/.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/.eslintrc -------------------------------------------------------------------------------- /invoices-frontend/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/.gitignore -------------------------------------------------------------------------------- /invoices-frontend/.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/.vscode/settings.json -------------------------------------------------------------------------------- /invoices-frontend/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/Dockerfile -------------------------------------------------------------------------------- /invoices-frontend/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/README.md -------------------------------------------------------------------------------- /invoices-frontend/docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/docker-compose.yaml -------------------------------------------------------------------------------- /invoices-frontend/next-env.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/next-env.d.ts -------------------------------------------------------------------------------- /invoices-frontend/next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | reactStrictMode: true, 3 | } 4 | -------------------------------------------------------------------------------- /invoices-frontend/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/package-lock.json -------------------------------------------------------------------------------- /invoices-frontend/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/package.json -------------------------------------------------------------------------------- /invoices-frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/public/favicon.ico -------------------------------------------------------------------------------- /invoices-frontend/public/vercel.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/public/vercel.svg -------------------------------------------------------------------------------- /invoices-frontend/src/components/Navbar.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/src/components/Navbar.tsx -------------------------------------------------------------------------------- /invoices-frontend/src/http.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/src/http.ts -------------------------------------------------------------------------------- /invoices-frontend/src/model.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/src/model.ts -------------------------------------------------------------------------------- /invoices-frontend/src/pages/404.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/src/pages/404.tsx -------------------------------------------------------------------------------- /invoices-frontend/src/pages/_app.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/src/pages/_app.tsx -------------------------------------------------------------------------------- /invoices-frontend/src/pages/_document.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/src/pages/_document.tsx -------------------------------------------------------------------------------- /invoices-frontend/src/pages/api/hello.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/src/pages/api/hello.ts -------------------------------------------------------------------------------- /invoices-frontend/src/pages/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/src/pages/index.tsx -------------------------------------------------------------------------------- /invoices-frontend/src/pages/invoices/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/src/pages/invoices/index.tsx -------------------------------------------------------------------------------- /invoices-frontend/src/theme.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/src/theme.ts -------------------------------------------------------------------------------- /invoices-frontend/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/invoices-frontend/tsconfig.json -------------------------------------------------------------------------------- /k8s/codebank/configmap.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/k8s/codebank/configmap.yaml -------------------------------------------------------------------------------- /k8s/codebank/deploy.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/k8s/codebank/deploy.yaml -------------------------------------------------------------------------------- /k8s/codebank/service.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/k8s/codebank/service.yaml -------------------------------------------------------------------------------- /k8s/invoices-api/configmap.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/k8s/invoices-api/configmap.yaml -------------------------------------------------------------------------------- /k8s/invoices-api/deploy.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/k8s/invoices-api/deploy.yaml -------------------------------------------------------------------------------- /k8s/invoices-api/service.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/k8s/invoices-api/service.yaml -------------------------------------------------------------------------------- /store-api/.docker/entrypoint.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/.docker/entrypoint.sh -------------------------------------------------------------------------------- /store-api/.docker/postgres/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/.docker/postgres/Dockerfile -------------------------------------------------------------------------------- /store-api/.docker/postgres/init.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/.docker/postgres/init.sql -------------------------------------------------------------------------------- /store-api/.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/.env.example -------------------------------------------------------------------------------- /store-api/.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/.eslintrc.js -------------------------------------------------------------------------------- /store-api/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/.gitignore -------------------------------------------------------------------------------- /store-api/.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/.prettierrc -------------------------------------------------------------------------------- /store-api/.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/.vscode/settings.json -------------------------------------------------------------------------------- /store-api/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/Dockerfile -------------------------------------------------------------------------------- /store-api/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/README.md -------------------------------------------------------------------------------- /store-api/api.http: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/api.http -------------------------------------------------------------------------------- /store-api/docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/docker-compose.yaml -------------------------------------------------------------------------------- /store-api/nest-cli.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/nest-cli.json -------------------------------------------------------------------------------- /store-api/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/package-lock.json -------------------------------------------------------------------------------- /store-api/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/package.json -------------------------------------------------------------------------------- /store-api/src/app.controller.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/app.controller.spec.ts -------------------------------------------------------------------------------- /store-api/src/app.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/app.controller.ts -------------------------------------------------------------------------------- /store-api/src/app.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/app.module.ts -------------------------------------------------------------------------------- /store-api/src/app.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/app.service.ts -------------------------------------------------------------------------------- /store-api/src/exception-filters/entity-not-found.exception-filter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/exception-filters/entity-not-found.exception-filter.ts -------------------------------------------------------------------------------- /store-api/src/exception-filters/rpc.exception-filter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/exception-filters/rpc.exception-filter.ts -------------------------------------------------------------------------------- /store-api/src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/main.ts -------------------------------------------------------------------------------- /store-api/src/migrations/1625262588200-create-products-table.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/migrations/1625262588200-create-products-table.ts -------------------------------------------------------------------------------- /store-api/src/migrations/1625343914687-create-orders-table.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/migrations/1625343914687-create-orders-table.ts -------------------------------------------------------------------------------- /store-api/src/migrations/1625343922816-create-order-items-table.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/migrations/1625343922816-create-order-items-table.ts -------------------------------------------------------------------------------- /store-api/src/orders/dto/create-order.dto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/dto/create-order.dto.ts -------------------------------------------------------------------------------- /store-api/src/orders/dto/update-order.dto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/dto/update-order.dto.ts -------------------------------------------------------------------------------- /store-api/src/orders/entities/credit-card.embbeded.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/entities/credit-card.embbeded.ts -------------------------------------------------------------------------------- /store-api/src/orders/entities/order-item.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/entities/order-item.entity.ts -------------------------------------------------------------------------------- /store-api/src/orders/entities/order.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/entities/order.entity.ts -------------------------------------------------------------------------------- /store-api/src/orders/orders.controller.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/orders.controller.spec.ts -------------------------------------------------------------------------------- /store-api/src/orders/orders.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/orders.controller.ts -------------------------------------------------------------------------------- /store-api/src/orders/orders.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/orders.module.ts -------------------------------------------------------------------------------- /store-api/src/orders/orders.service.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/orders.service.spec.ts -------------------------------------------------------------------------------- /store-api/src/orders/orders.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/orders.service.ts -------------------------------------------------------------------------------- /store-api/src/orders/payment/payment.service.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/payment/payment.service.spec.ts -------------------------------------------------------------------------------- /store-api/src/orders/payment/payment.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/payment/payment.service.ts -------------------------------------------------------------------------------- /store-api/src/orders/proto/payment.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/orders/proto/payment.proto -------------------------------------------------------------------------------- /store-api/src/products/dto/create-product.dto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/products/dto/create-product.dto.ts -------------------------------------------------------------------------------- /store-api/src/products/dto/update-product.dto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/products/dto/update-product.dto.ts -------------------------------------------------------------------------------- /store-api/src/products/entities/product.entity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/products/entities/product.entity.ts -------------------------------------------------------------------------------- /store-api/src/products/products.controller.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/products/products.controller.spec.ts -------------------------------------------------------------------------------- /store-api/src/products/products.controller.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/products/products.controller.ts -------------------------------------------------------------------------------- /store-api/src/products/products.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/products/products.module.ts -------------------------------------------------------------------------------- /store-api/src/products/products.service.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/products/products.service.spec.ts -------------------------------------------------------------------------------- /store-api/src/products/products.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/products/products.service.ts -------------------------------------------------------------------------------- /store-api/src/validators/exists.rule.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/validators/exists.rule.ts -------------------------------------------------------------------------------- /store-api/src/validators/min-callback.rule.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/src/validators/min-callback.rule.ts -------------------------------------------------------------------------------- /store-api/test/app.e2e-spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/test/app.e2e-spec.ts -------------------------------------------------------------------------------- /store-api/test/jest-e2e.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/test/jest-e2e.json -------------------------------------------------------------------------------- /store-api/tsconfig.build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/tsconfig.build.json -------------------------------------------------------------------------------- /store-api/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-api/tsconfig.json -------------------------------------------------------------------------------- /store-frontend/.docker/entrypoint.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/.docker/entrypoint.sh -------------------------------------------------------------------------------- /store-frontend/.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_STORE_API_URL=http://host.docker.internal:3000 -------------------------------------------------------------------------------- /store-frontend/.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/.eslintrc -------------------------------------------------------------------------------- /store-frontend/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/.gitignore -------------------------------------------------------------------------------- /store-frontend/.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/.vscode/settings.json -------------------------------------------------------------------------------- /store-frontend/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/Dockerfile -------------------------------------------------------------------------------- /store-frontend/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/README.md -------------------------------------------------------------------------------- /store-frontend/docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/docker-compose.yaml -------------------------------------------------------------------------------- /store-frontend/next-env.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/next-env.d.ts -------------------------------------------------------------------------------- /store-frontend/next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | reactStrictMode: true, 3 | } 4 | -------------------------------------------------------------------------------- /store-frontend/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/package-lock.json -------------------------------------------------------------------------------- /store-frontend/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/package.json -------------------------------------------------------------------------------- /store-frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/public/favicon.ico -------------------------------------------------------------------------------- /store-frontend/public/vercel.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/public/vercel.svg -------------------------------------------------------------------------------- /store-frontend/src/components/Navbar.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/components/Navbar.tsx -------------------------------------------------------------------------------- /store-frontend/src/http.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/http.ts -------------------------------------------------------------------------------- /store-frontend/src/model.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/model.ts -------------------------------------------------------------------------------- /store-frontend/src/pages/404.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/pages/404.tsx -------------------------------------------------------------------------------- /store-frontend/src/pages/_app.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/pages/_app.tsx -------------------------------------------------------------------------------- /store-frontend/src/pages/_document.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/pages/_document.tsx -------------------------------------------------------------------------------- /store-frontend/src/pages/api/hello.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/pages/api/hello.ts -------------------------------------------------------------------------------- /store-frontend/src/pages/api/products/[slug].tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/pages/api/products/[slug].tsx -------------------------------------------------------------------------------- /store-frontend/src/pages/api/products/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/pages/api/products/index.ts -------------------------------------------------------------------------------- /store-frontend/src/pages/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/pages/index.tsx -------------------------------------------------------------------------------- /store-frontend/src/pages/orders/[id].tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/pages/orders/[id].tsx -------------------------------------------------------------------------------- /store-frontend/src/pages/products/[slug]/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/pages/products/[slug]/index.tsx -------------------------------------------------------------------------------- /store-frontend/src/pages/products/[slug]/order.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/pages/products/[slug]/order.tsx -------------------------------------------------------------------------------- /store-frontend/src/theme.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/src/theme.ts -------------------------------------------------------------------------------- /store-frontend/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeedu/imersao-fullcycle-3/HEAD/store-frontend/tsconfig.json --------------------------------------------------------------------------------