From 55879ee40e5654ab2ab78fc7911376c83af0c0fa Mon Sep 17 00:00:00 2001 From: Bram Borggreve Date: Mon, 22 Jan 2024 21:16:04 +0000 Subject: [PATCH] feat: initial commit --- .dockerignore | 3 + .editorconfig | 13 + .env.example | 60 + .eslintignore | 3 + .eslintrc.json | 55 + .github/workflows/build-publish-docker.yml | 64 + .github/workflows/ci.yml | 42 + .github/workflows/e2e.yml | 54 + .gitignore | 46 + .husky/pre-commit | 4 + .husky/pre-push | 4 + .npmrc | 2 + .prettierignore | 13 + .prettierrc | 7 + .run/dev_api.run.xml | 12 + .run/dev_sdk.run.xml | 12 + .run/dev_services.run.xml | 12 + .run/dev_web.run.xml | 12 + .vscode/extensions.json | 8 + .vscode/settings.json | 3 + Dockerfile | 37 + LICENSE | 21 + README.md | 137 + api-schema.graphql | 206 + apps/api-e2e/.eslintrc.json | 10 + apps/api-e2e/jest.config.ts | 19 + apps/api-e2e/project.json | 18 + apps/api-e2e/src/api/api-auth-feature.spec.ts | 115 + apps/api-e2e/src/api/api-core-feature.spec.ts | 21 + .../src/api/api-identity-feature.spec.ts | 131 + apps/api-e2e/src/api/api-user-feature.spec.ts | 211 + apps/api-e2e/src/support/break-string.ts | 4 + apps/api-e2e/src/support/get-api.url.ts | 6 + apps/api-e2e/src/support/global-setup.ts | 58 + apps/api-e2e/src/support/global-teardown.ts | 14 + apps/api-e2e/src/support/graphql-sdk.ts | 43 + apps/api-e2e/src/support/index.ts | 6 + apps/api-e2e/src/support/test-setup.ts | 4 + apps/api-e2e/src/support/user-identities.ts | 28 + apps/api-e2e/tsconfig.json | 13 + apps/api-e2e/tsconfig.spec.json | 9 + apps/api/.eslintrc.json | 18 + apps/api/jest.config.ts | 11 + apps/api/project.json | 54 + apps/api/src/app/app.module.ts | 7 + apps/api/src/assets/.gitkeep | 0 apps/api/src/main.ts | 36 + apps/api/tsconfig.app.json | 12 + apps/api/tsconfig.json | 16 + apps/api/tsconfig.spec.json | 9 + apps/api/webpack.config.js | 8 + apps/web-e2e/.eslintrc.json | 10 + apps/web-e2e/cypress.config.ts | 6 + apps/web-e2e/project.json | 30 + apps/web-e2e/src/e2e/app.cy.ts | 13 + apps/web-e2e/src/fixtures/example.json | 4 + apps/web-e2e/src/support/app.po.ts | 3 + apps/web-e2e/src/support/commands.ts | 33 + apps/web-e2e/src/support/e2e.ts | 17 + apps/web-e2e/tsconfig.json | 10 + apps/web/.babelrc | 11 + apps/web/.eslintrc.json | 18 + apps/web/jest.config.ts | 11 + apps/web/postcss.config.cjs | 14 + apps/web/project.json | 85 + apps/web/proxy.conf.js | 11 + apps/web/src/assets/.gitkeep | 0 apps/web/src/environments/environment.prod.ts | 3 + apps/web/src/environments/environment.ts | 6 + apps/web/src/favicon.ico | Bin 0 -> 168499 bytes apps/web/src/index.html | 13 + apps/web/src/main.tsx | 17 + apps/web/src/styles.css | 9 + apps/web/tsconfig.app.json | 20 + apps/web/tsconfig.json | 20 + apps/web/tsconfig.spec.json | 21 + apps/web/webpack.config.js | 14 + babel.config.json | 3 + codegen.ts | 34 + docker-compose.yml | 13 + jest.config.ts | 5 + jest.preset.js | 3 + libs/anchor/.eslintrc.json | 30 + libs/anchor/.swcrc | 29 + libs/anchor/Anchor.toml | 28 + libs/anchor/Cargo.lock | 1765 ++ libs/anchor/Cargo.toml | 14 + libs/anchor/README.md | 11 + libs/anchor/jest.config.ts | 28 + libs/anchor/migrations/deploy.ts | 12 + libs/anchor/package.json | 11 + libs/anchor/programs/counter/Cargo.toml | 19 + libs/anchor/programs/counter/Xargo.toml | 2 + libs/anchor/programs/counter/src/lib.rs | 70 + libs/anchor/project.json | 57 + libs/anchor/src/counter-exports.ts | 19 + libs/anchor/src/index.ts | 1 + libs/anchor/target/idl/counter.json | 98 + libs/anchor/target/types/counter.ts | 191 + libs/anchor/tests/counter.spec.ts | 76 + libs/anchor/tsconfig.json | 16 + libs/anchor/tsconfig.lib.json | 10 + libs/anchor/tsconfig.spec.json | 9 + libs/api/auth/data-access/.eslintrc.json | 18 + libs/api/auth/data-access/README.md | 7 + libs/api/auth/data-access/jest.config.ts | 11 + libs/api/auth/data-access/project.json | 20 + libs/api/auth/data-access/src/index.ts | 13 + .../src/lib/api-auth-data-access.module.ts | 28 + .../data-access/src/lib/api-auth.service.ts | 113 + .../data-access/src/lib/contexts/ctx-user.ts | 7 + .../data-access/src/lib/dto/login.input.ts | 9 + .../data-access/src/lib/dto/register.input.ts | 9 + .../src/lib/guards/api-anon-jwt-guard.ts | 13 + .../guards/api-auth-graphql-admin-guard.ts | 29 + .../lib/guards/api-auth-graphql-user-guard.ts | 32 + .../lib/guards/api-auth-jwt-guard.service.ts | 5 + .../src/lib/interfaces/api-auth.request.ts | 6 + .../lib/strategies/api-auth-strategy-jwt.ts | 35 + .../strategies/api-auth-strategy.module.ts | 21 + .../strategies/api-auth-strategy.service.ts | 102 + .../oauth/api-auth-strategy-discord.module.ts | 33 + .../oauth/api-auth-strategy-discord.ts | 42 + .../oauth/api-auth-strategy-github.module.ts | 33 + .../oauth/api-auth-strategy-github.ts | 37 + .../oauth/api-auth-strategy-google.module.ts | 33 + .../oauth/api-auth-strategy-google.ts | 37 + .../oauth/api-auth-strategy-twitter.module.ts | 33 + .../oauth/api-auth-strategy-twitter.ts | 42 + libs/api/auth/data-access/tsconfig.json | 22 + libs/api/auth/data-access/tsconfig.lib.json | 16 + libs/api/auth/data-access/tsconfig.spec.json | 9 + libs/api/auth/feature/.eslintrc.json | 18 + libs/api/auth/feature/README.md | 7 + libs/api/auth/feature/jest.config.ts | 11 + libs/api/auth/feature/project.json | 20 + libs/api/auth/feature/src/index.ts | 1 + .../src/lib/api-auth-feature.module.ts | 21 + .../api-auth-strategy-discord.controller.ts | 26 + .../api-auth-strategy-github.controller.ts | 26 + .../api-auth-strategy-google.controller.ts | 26 + .../api-auth-strategy-twitter.controller.ts | 26 + .../feature/src/lib/api-auth.controller.ts | 14 + .../auth/feature/src/lib/api-auth.resolver.ts | 38 + libs/api/auth/feature/tsconfig.json | 22 + libs/api/auth/feature/tsconfig.lib.json | 16 + libs/api/auth/feature/tsconfig.spec.json | 9 + libs/api/core/data-access/.eslintrc.json | 18 + libs/api/core/data-access/README.md | 7 + libs/api/core/data-access/jest.config.ts | 11 + libs/api/core/data-access/project.json | 20 + libs/api/core/data-access/src/index.ts | 12 + .../src/lib/api-core-config.service.ts | 261 + .../src/lib/api-core-data-access.module.ts | 45 + .../src/lib/api-core-prisma-client.ts | 13 + .../src/lib/api-core-provision-data.ts | 52 + .../src/lib/api-core-provision.service.ts | 68 + .../data-access/src/lib/api-core.service.ts | 32 + .../src/lib/config/configuration.ts | 124 + .../src/lib/config/validation-schema.ts | 44 + .../data-access/src/lib/dto/paging.input.ts | 13 + .../src/lib/entity/app-config.entity.ts | 19 + .../data-access/src/lib/entity/app-context.ts | 17 + .../src/lib/entity/paging-meta.entity.ts | 19 + .../src/lib/entity/paging-response.entity.ts | 16 + .../src/lib/helpers/ellipsify.spec.ts | 23 + .../data-access/src/lib/helpers/ellipsify.ts | 6 + .../src/lib/helpers/get-avatar-url.ts | 15 + .../helpers/hash-validate-password.spec.ts | 14 + .../src/lib/helpers/hash-validate-password.ts | 9 + .../src/lib/helpers/serve-static-factory.ts | 24 + .../data-access/src/lib/helpers/slugify-id.ts | 5 + libs/api/core/data-access/tsconfig.json | 22 + libs/api/core/data-access/tsconfig.lib.json | 16 + libs/api/core/data-access/tsconfig.spec.json | 9 + libs/api/core/feature/.eslintrc.json | 18 + libs/api/core/feature/README.md | 7 + libs/api/core/feature/jest.config.ts | 11 + libs/api/core/feature/project.json | 20 + libs/api/core/feature/src/index.ts | 1 + .../src/lib/api-core-feature.module.ts | 22 + .../feature/src/lib/api-core.controller.ts | 12 + .../core/feature/src/lib/api-core.resolver.ts | 17 + libs/api/core/feature/tsconfig.json | 22 + libs/api/core/feature/tsconfig.lib.json | 16 + libs/api/core/feature/tsconfig.spec.json | 9 + libs/api/identity/data-access/.eslintrc.json | 18 + libs/api/identity/data-access/README.md | 7 + libs/api/identity/data-access/jest.config.ts | 11 + libs/api/identity/data-access/project.json | 20 + libs/api/identity/data-access/src/index.ts | 14 + .../src/lib/api-admin-identity.service.ts | 57 + .../src/lib/api-anon-identity.service.ts | 126 + .../lib/api-identity-data-access.module.ts | 21 + .../src/lib/api-identity.service.ts | 14 + .../src/lib/api-solana-identity.service.ts | 105 + .../src/lib/api-user-identity.service.ts | 151 + .../lib/dto/admin-create-identity.input.ts | 12 + .../lib/dto/admin-find-many-identity.input.ts | 11 + .../src/lib/dto/link-identity-input.ts | 10 + .../dto/request-identity-challenge.input.ts | 5 + .../lib/dto/user-find-many-identity-input.ts | 7 + .../dto/verify-identity-challenge-input.ts | 16 + .../lib/entity/identity-challenge.entity.ts | 27 + .../src/lib/entity/identity-provider.enum.ts | 5 + .../src/lib/entity/identity.entity.ts | 34 + .../src/lib/helpers/get-identity-url.ts | 17 + .../data-access/src/lib/helpers/sha256.ts | 5 + libs/api/identity/data-access/tsconfig.json | 22 + .../identity/data-access/tsconfig.lib.json | 16 + .../identity/data-access/tsconfig.spec.json | 9 + libs/api/identity/feature/.eslintrc.json | 18 + libs/api/identity/feature/README.md | 7 + libs/api/identity/feature/jest.config.ts | 11 + libs/api/identity/feature/project.json | 20 + libs/api/identity/feature/src/index.ts | 1 + .../src/lib/api-admin-identity.resolver.ts | 28 + .../src/lib/api-anon-identity.resolver.ts | 23 + .../src/lib/api-identity-feature.module.ts | 12 + .../feature/src/lib/api-identity.resolver.ts | 23 + .../src/lib/api-user-identity.resolver.ts | 52 + libs/api/identity/feature/tsconfig.json | 22 + libs/api/identity/feature/tsconfig.lib.json | 16 + libs/api/identity/feature/tsconfig.spec.json | 9 + libs/api/user/data-access/.eslintrc.json | 18 + libs/api/user/data-access/README.md | 7 + libs/api/user/data-access/jest.config.ts | 11 + libs/api/user/data-access/project.json | 20 + libs/api/user/data-access/src/index.ts | 11 + .../src/lib/api-admin-user.service.ts | 91 + .../src/lib/api-user-data-access.module.ts | 12 + .../src/lib/api-user-user.service.ts | 35 + .../data-access/src/lib/api-user.service.ts | 8 + .../src/lib/dto/admin-create-user.input.ts | 9 + .../src/lib/dto/admin-find-many-user.input.ts | 14 + .../src/lib/dto/admin-update-user.input.ts | 19 + .../src/lib/dto/user-find-many-user.input.ts | 8 + .../src/lib/dto/user-update-user.input.ts | 11 + .../src/lib/entity/user-paging.entity.ts | 6 + .../src/lib/entity/user-role.enum.ts | 5 + .../src/lib/entity/user-status.enum.ts | 5 + .../data-access/src/lib/entity/user.entity.ts | 27 + .../lib/helpers/get-admin-user-where.input.ts | 24 + .../lib/helpers/get-user-user-where.input.ts | 20 + libs/api/user/data-access/tsconfig.json | 22 + libs/api/user/data-access/tsconfig.lib.json | 16 + libs/api/user/data-access/tsconfig.spec.json | 9 + libs/api/user/feature/.eslintrc.json | 18 + libs/api/user/feature/README.md | 7 + libs/api/user/feature/jest.config.ts | 11 + libs/api/user/feature/project.json | 20 + libs/api/user/feature/src/index.ts | 1 + .../src/lib/api-admin-user.resolver.ts | 42 + .../src/lib/api-user-feature.module.ts | 11 + .../feature/src/lib/api-user-user.resolver.ts | 31 + .../user/feature/src/lib/api-user.resolver.ts | 21 + libs/api/user/feature/tsconfig.json | 22 + libs/api/user/feature/tsconfig.lib.json | 16 + libs/api/user/feature/tsconfig.spec.json | 9 + libs/sdk/.eslintrc.json | 18 + libs/sdk/README.md | 11 + libs/sdk/jest.config.ts | 10 + libs/sdk/package.json | 9 + libs/sdk/project.json | 30 + libs/sdk/src/generated/graphql-sdk.ts | 1749 ++ libs/sdk/src/graphql/feature-auth.graphql | 21 + libs/sdk/src/graphql/feature-core.graphql | 29 + libs/sdk/src/graphql/feature-identity.graphql | 87 + libs/sdk/src/graphql/feature-user.graphql | 71 + libs/sdk/src/index.ts | 9 + libs/sdk/src/lib/constants.ts | 4 + libs/sdk/src/lib/dummy.spec.ts | 5 + libs/sdk/src/lib/ellipsify.ts | 8 + libs/sdk/src/lib/get-enum-options.ts | 8 + libs/sdk/src/lib/get-graphql-client.ts | 10 + libs/sdk/src/lib/get-graphql-sdk.ts | 6 + libs/sdk/src/lib/get-random-int.ts | 12 + libs/sdk/src/lib/response-middleware.ts | 14 + libs/sdk/src/lib/validate-challenge.ts | 12 + libs/sdk/src/lib/verify-signature.ts | 26 + libs/sdk/tsconfig.json | 22 + libs/sdk/tsconfig.lib.json | 10 + libs/sdk/tsconfig.spec.json | 9 + libs/tools/.eslintrc.json | 32 + libs/tools/README.md | 11 + libs/tools/generators.json | 44 + libs/tools/jest.config.ts | 11 + libs/tools/package.json | 22 + libs/tools/project.json | 52 + .../api-crud-generator.spec.ts.snap | 1296 ++ .../api-crud/api-crud-generator.spec.ts | 30 + .../generators/api-crud/api-crud-generator.ts | 14 + .../generators/api-crud/api-crud-schema.d.ts | 12 + .../generators/api-crud/api-crud-schema.json | 31 + .../api-feature-generator.spec.ts.snap | 467 + .../api-feature/api-feature-generator.spec.ts | 153 + .../api-feature/api-feature-generator.ts | 13 + .../api-feature/api-feature-schema.d.ts | 15 + .../api-feature/api-feature-schema.json | 48 + .../prisma-model-generator.spec.ts | 103 + .../prisma-model/prisma-model-generator.ts | 29 + .../prisma-model/prisma-model-schema.d.ts | 6 + .../prisma-model/prisma-model-schema.json | 30 + .../prisma-sync/files/src/index.ts.template | 1 + .../prisma-sync/prisma-sync-generator.spec.ts | 20 + .../prisma-sync/prisma-sync-generator.ts | 16 + .../prisma-sync/prisma-sync-schema.d.ts | 5 + .../prisma-sync/prisma-sync-schema.json | 24 + .../rename/rename-generator.spec.ts | 21 + .../src/generators/rename/rename-generator.ts | 93 + .../src/generators/rename/rename-schema.d.ts | 6 + .../src/generators/rename/rename-schema.json | 28 + .../src/generators/rename/tree-walker.ts | 73 + .../src/generators/setup/setup-generator.ts | 57 + .../src/generators/setup/setup-schema.json | 8 + .../web-crud/web-crud-generator.spec.ts | 23 + .../generators/web-crud/web-crud-generator.ts | 14 + .../generators/web-crud/web-crud-schema.d.ts | 12 + .../generators/web-crud/web-crud-schema.json | 31 + .../web-feature-generator.spec.ts.snap | 1100 + .../web-feature/web-feature-generator.spec.ts | 120 + .../web-feature/web-feature-generator.ts | 13 + .../web-feature/web-feature-schema.d.ts | 14 + .../web-feature/web-feature-schema.json | 48 + libs/tools/src/index.ts | 0 .../add-service-to-class-constructor.spec.ts | 105 + .../add-service-to-class-constructor.ts | 63 + .../add-service-to-module-decorator.spec.ts | 102 + .../add-service-to-module-decorator.ts | 69 + ...me__-__modelFileName__.service.ts.template | 39 + ...me__-__modelFileName__.service.ts.template | 39 + ...create-__modelFileName__.input.ts.template | 9 + ...d-many-__modelFileName__.input.ts.template | 8 + ...update-__modelFileName__.input.ts.template | 9 + ...-__modelFileName__-where.input.ts.template | 15 + ...__actorFileName__-feature.spec.ts.template | 171 + ..._modelFileName__-paging.entity.ts.template | 6 + .../__modelFileName__.entity.ts.template | 15 + ...e__-__modelFileName__.resolver.ts.template | 43 + .../src/lib/api-crud/generate-api-crud.ts | 89 + .../src/lib/api-crud/generate-sdk-file.ts | 81 + .../api-crud/get-api-crud-substitutions.ts | 22 + .../lib/api-crud/normalize-api-crud-schema.ts | 18 + .../lib/api/api-update-core-feature-module.ts | 27 + libs/tools/src/lib/api/create-mock-api-app.ts | 56 + ...lFileName__-data-access.module.ts.template | 10 + ...me__-__modelFileName__.service.ts.template | 8 + ...modelFileName__-feature.module.ts.template | 9 + ...e__-__modelFileName__.resolver.ts.template | 8 + .../tools/src/lib/api/generate-api-feature.ts | 28 + .../lib/api/generate-api-lib-data-access.ts | 23 + .../src/lib/api/generate-api-lib-feature.ts | 28 + libs/tools/src/lib/api/generate-api-lib.ts | 30 + .../src/lib/api/get-api-core-feature-info.ts | 13 + .../lib/api/get-api-feature-module-info.ts | 19 + .../src/lib/api/get-api-substitutions.ts | 19 + libs/tools/src/lib/api/index.ts | 2 + .../lib/api/normalize-api-feature-schema.ts | 19 + .../parse-prisma-model-fields.spec.ts.snap | 120 + .../lib/prisma/create-mock-prisma-schema.ts | 104 + .../prisma/get-domain-from-project-name.ts | 9 + libs/tools/src/lib/prisma/get-prisma-enums.ts | 9 + .../tools/src/lib/prisma/get-prisma-models.ts | 44 + .../src/lib/prisma/get-prisma-schema-file.ts | 5 + .../tools/src/lib/prisma/get-prisma-schema.ts | 7 + .../src/lib/prisma/get-project-entities.ts | 70 + .../normalize-prisma-model-schema.spec.ts | 16 + .../prisma/normalize-prisma-model-schema.ts | 11 + .../prisma/normalize-prisma-sync-schema.ts | 9 + .../prisma/parse-prisma-model-fields.spec.ts | 23 + .../lib/prisma/parse-prisma-model-fields.ts | 33 + .../src/lib/prisma/sync-prisma-entities.ts | 130 + libs/tools/src/lib/setup/validate-env-file.ts | 42 + .../lib/setup/validate-postgres-connection.ts | 80 + libs/tools/src/lib/types/api-feature.d.ts | 1 + libs/tools/src/lib/types/web-feature.d.ts | 1 + libs/tools/src/lib/utils/add-array-item.ts | 14 + libs/tools/src/lib/utils/add-constructors.ts | 15 + libs/tools/src/lib/utils/add-export.ts | 20 + libs/tools/src/lib/utils/add-named-import.ts | 9 + .../src/lib/utils/ensure-nx-project-exists.ts | 14 + .../tools/src/lib/utils/get-decorator-args.ts | 6 + libs/tools/src/lib/utils/get-import-path.ts | 26 + .../lib/utils/get-recursive-file-contents.ts | 74 + .../src/lib/utils/get-recursive-file-names.ts | 27 + libs/tools/src/lib/utils/get-source-file.ts | 13 + .../tools/src/lib/utils/update-source-file.ts | 7 + ...__-find-many-__modelFileName__.ts.template | 54 + ...e__-find-one-__modelFileName__.ts.template | 36 + ...odelFileName__-create.feature.tsx.template | 32 + ...ileName__-detail-overview.tab.tsx.template | 19 + ...ileName__-detail-settings.tab.tsx.template | 20 + ...odelFileName__-detail.feature.tsx.template | 45 + ..._modelFileName__-list.feature.tsx.template | 57 + ...me__-__modelFileName__.routes.tsx.template | 15 + ...odelFileName__-ui-create-form.tsx.template | 25 + ...__-__modelFileName__-ui-table.tsx.template | 61 + ...odelFileName__-ui-update-form.tsx.template | 30 + .../__modelFileName__-ui-avatar.tsx.template | 10 + ..._modelFileName__-ui-grid-item.tsx.template | 15 + .../__modelFileName__-ui-grid.tsx.template | 42 + .../__modelFileName__-ui-item.tsx.template | 33 + .../src/lib/web-crud/generate-web-crud.ts | 122 + .../web-crud/get-web-crud-substitutions.ts | 25 + .../lib/web-crud/normalize-web-crud-schema.ts | 18 + libs/tools/src/lib/web/create-mock-web-app.ts | 55 + ...in-find-many-__modelFileName__.ts.template | 54 + ...min-find-one-__modelFileName__.ts.template | 36 + ...odelFileName__-create.feature.tsx.template | 32 + ...ileName__-detail-overview.tab.tsx.template | 19 + ...ileName__-detail-settings.tab.tsx.template | 20 + ...odelFileName__-detail.feature.tsx.template | 45 + ...min-__modelFileName__-feature.tsx.template | 15 + ..._modelFileName__-list.feature.tsx.template | 48 + ...odelFileName__-ui-create-form.tsx.template | 21 + ...in-__modelFileName__-ui-table.tsx.template | 61 + ...odelFileName__-ui-update-form.tsx.template | 26 + .../tools/src/lib/web/generate-web-feature.ts | 28 + libs/tools/src/lib/web/generate-web-lib.ts | 28 + libs/tools/src/lib/web/index.ts | 3 + .../lib/web/normalize-web-feature-schema.ts | 19 + libs/tools/tsconfig.json | 16 + libs/tools/tsconfig.lib.json | 10 + libs/tools/tsconfig.spec.json | 9 + libs/web/auth/data-access/.babelrc | 12 + libs/web/auth/data-access/.eslintrc.json | 18 + libs/web/auth/data-access/README.md | 7 + libs/web/auth/data-access/project.json | 13 + libs/web/auth/data-access/src/index.ts | 2 + .../data-access/src/lib/auth.provider.tsx | 199 + libs/web/auth/data-access/src/lib/use-me.ts | 19 + libs/web/auth/data-access/tsconfig.json | 17 + libs/web/auth/data-access/tsconfig.lib.json | 23 + libs/web/auth/feature/.babelrc | 12 + libs/web/auth/feature/.eslintrc.json | 18 + libs/web/auth/feature/README.md | 7 + libs/web/auth/feature/project.json | 13 + libs/web/auth/feature/src/index.ts | 4 + .../feature/src/lib/auth-login-feature.tsx | 69 + .../feature/src/lib/auth-register-feature.tsx | 69 + libs/web/auth/feature/tsconfig.json | 17 + libs/web/auth/feature/tsconfig.lib.json | 23 + libs/web/auth/ui/.babelrc | 12 + libs/web/auth/ui/.eslintrc.json | 18 + libs/web/auth/ui/README.md | 7 + libs/web/auth/ui/project.json | 13 + libs/web/auth/ui/src/index.ts | 8 + libs/web/auth/ui/src/lib/auth-ui-enabled.tsx | 12 + libs/web/auth/ui/src/lib/auth-ui-form.tsx | 33 + libs/web/auth/ui/src/lib/auth-ui-full.tsx | 9 + libs/web/auth/ui/src/lib/auth-ui-page.tsx | 22 + .../auth/ui/src/lib/auth-ui-route-guard.tsx | 19 + libs/web/auth/ui/src/lib/auth-ui-shell.tsx | 63 + .../ui/src/lib/auth-ui-user-role-guard.tsx | 17 + .../ui/src/lib/auth-ui-user-status-guard.tsx | 23 + libs/web/auth/ui/tsconfig.json | 17 + libs/web/auth/ui/tsconfig.lib.json | 23 + libs/web/core/data-access/.babelrc | 12 + libs/web/core/data-access/.eslintrc.json | 18 + libs/web/core/data-access/README.md | 7 + libs/web/core/data-access/project.json | 13 + libs/web/core/data-access/src/index.ts | 1 + .../core/data-access/src/lib/sdk-provider.tsx | 14 + libs/web/core/data-access/tsconfig.json | 17 + libs/web/core/data-access/tsconfig.lib.json | 23 + libs/web/dashboard/feature/.babelrc | 12 + libs/web/dashboard/feature/.eslintrc.json | 18 + libs/web/dashboard/feature/README.md | 7 + libs/web/dashboard/feature/jest.config.ts | 11 + libs/web/dashboard/feature/project.json | 20 + libs/web/dashboard/feature/src/index.ts | 3 + .../feature/src/lib/dashboard-feature.tsx | 14 + libs/web/dashboard/feature/tsconfig.json | 20 + libs/web/dashboard/feature/tsconfig.lib.json | 23 + libs/web/dashboard/feature/tsconfig.spec.json | 20 + libs/web/dev/feature/.babelrc | 12 + libs/web/dev/feature/.eslintrc.json | 18 + libs/web/dev/feature/README.md | 7 + libs/web/dev/feature/project.json | 13 + libs/web/dev/feature/src/index.ts | 3 + .../dev/feature/src/lib/dev-admin-routes.tsx | 19 + .../feature/src/lib/dev-identity-wizard.tsx | 83 + libs/web/dev/feature/src/lib/dev-new.tsx | 22 + .../feature/src/lib/dev-user-autocomplete.tsx | 66 + libs/web/dev/feature/tsconfig.json | 17 + libs/web/dev/feature/tsconfig.lib.json | 23 + libs/web/home/feature/.babelrc | 12 + libs/web/home/feature/.eslintrc.json | 18 + libs/web/home/feature/README.md | 7 + libs/web/home/feature/jest.config.ts | 11 + libs/web/home/feature/project.json | 20 + libs/web/home/feature/src/index.ts | 3 + .../web/home/feature/src/lib/home-feature.tsx | 13 + .../home/feature/src/lib/pages/about-page.tsx | 20 + .../home/feature/src/lib/pages/home-page.tsx | 34 + libs/web/home/feature/tsconfig.json | 20 + libs/web/home/feature/tsconfig.lib.json | 23 + libs/web/home/feature/tsconfig.spec.json | 20 + libs/web/identity/data-access/.babelrc | 12 + libs/web/identity/data-access/.eslintrc.json | 18 + libs/web/identity/data-access/README.md | 7 + libs/web/identity/data-access/project.json | 13 + libs/web/identity/data-access/src/index.ts | 5 + .../src/lib/identity-provider-solana-link.tsx | 106 + .../lib/identity-provider-solana-login.tsx | 83 + .../src/lib/use-admin-find-many-identity.ts | 57 + .../src/lib/use-create-signature.ts | 23 + .../src/lib/use-user-find-many-identity.ts | 67 + libs/web/identity/data-access/tsconfig.json | 17 + .../identity/data-access/tsconfig.lib.json | 23 + libs/web/identity/ui/.babelrc | 12 + libs/web/identity/ui/.eslintrc.json | 18 + libs/web/identity/ui/README.md | 7 + libs/web/identity/ui/project.json | 13 + libs/web/identity/ui/src/index.ts | 23 + .../src/lib/admin-identity-ui-create-form.tsx | 29 + .../ui/src/lib/admin-identity-ui-table.tsx | 66 + .../src/lib/get-identity-provider-color.tsx | 18 + .../ui/src/lib/identity-ui-avatar-group.tsx | 22 + .../ui/src/lib/identity-ui-avatar.tsx | 30 + .../identity/ui/src/lib/identity-ui-badge.tsx | 16 + .../ui/src/lib/identity-ui-group-list.tsx | 42 + .../identity/ui/src/lib/identity-ui-icon.tsx | 26 + .../ui/src/lib/identity-ui-link-button.tsx | 27 + .../identity/ui/src/lib/identity-ui-link.tsx | 13 + .../identity/ui/src/lib/identity-ui-list.tsx | 73 + .../ui/src/lib/identity-ui-login-button.tsx | 22 + .../ui/src/lib/identity-ui-login-buttons.tsx | 17 + .../src/lib/identity-ui-provider-button.tsx | 24 + .../lib/identity-ui-solana-link-button.tsx | 51 + .../lib/identity-ui-solana-link-wizard.tsx | 37 + .../lib/identity-ui-solana-login-button.tsx | 43 + .../lib/identity-ui-solana-login-wizard.tsx | 33 + .../lib/identity-ui-solana-verify-button.tsx | 42 + .../lib/identity-ui-solana-verify-wizard.tsx | 40 + .../lib/identity-ui-solana-wizard-modal.tsx | 32 + .../ui/src/lib/identity-ui-solana-wizard.tsx | 89 + .../ui/src/lib/identity-ui-verified.tsx | 13 + libs/web/identity/ui/tsconfig.json | 17 + libs/web/identity/ui/tsconfig.lib.json | 23 + libs/web/settings/feature/.babelrc | 12 + libs/web/settings/feature/.eslintrc.json | 18 + libs/web/settings/feature/README.md | 7 + libs/web/settings/feature/jest.config.ts | 11 + libs/web/settings/feature/project.json | 20 + libs/web/settings/feature/src/index.ts | 3 + .../feature/src/lib/settings-feature.tsx | 45 + .../src/lib/settings-identity-feature.tsx | 19 + libs/web/settings/feature/tsconfig.json | 20 + libs/web/settings/feature/tsconfig.lib.json | 23 + libs/web/settings/feature/tsconfig.spec.json | 20 + libs/web/shell/feature/.babelrc | 12 + libs/web/shell/feature/.eslintrc.json | 18 + libs/web/shell/feature/README.md | 7 + libs/web/shell/feature/project.json | 13 + libs/web/shell/feature/src/index.ts | 1 + .../feature/src/lib/shell-admin.routes.tsx | 32 + .../shell/feature/src/lib/shell-feature.tsx | 40 + .../shell/feature/src/lib/shell-layout.tsx | 45 + .../feature/src/lib/shell-user.routes.tsx | 26 + .../shell/feature/src/lib/shell.routes.tsx | 39 + .../feature/src/lib/use-guarded-routes.tsx | 56 + libs/web/shell/feature/tsconfig.json | 17 + libs/web/shell/feature/tsconfig.lib.json | 23 + libs/web/solana/data-access/.babelrc | 12 + libs/web/solana/data-access/.eslintrc.json | 18 + libs/web/solana/data-access/README.md | 7 + libs/web/solana/data-access/project.json | 13 + libs/web/solana/data-access/src/index.ts | 5 + .../data-access/src/lib/cluster-provider.tsx | 119 + .../data-access/src/lib/create-transaction.ts | 50 + .../data-access/src/lib/solana-provider.tsx | 50 + .../data-access/src/lib/ui-toast-link.tsx | 18 + .../data-access/src/lib/use-account.tsx | 139 + libs/web/solana/data-access/tsconfig.json | 17 + libs/web/solana/data-access/tsconfig.lib.json | 23 + libs/web/solana/feature/.babelrc | 12 + libs/web/solana/feature/.eslintrc.json | 18 + libs/web/solana/feature/README.md | 7 + libs/web/solana/feature/project.json | 13 + libs/web/solana/feature/src/index.ts | 3 + .../lib/account/account-detail-feature.tsx | 48 + .../src/lib/account/account-list-feature.tsx | 21 + .../src/lib/cluster/cluster-feature.tsx | 10 + .../src/lib/counter/counter-feature.tsx | 20 + .../src/lib/counter/counter-list-feature.tsx | 54 + .../counter-program-account-provider.tsx | 48 + .../counter/data-access/use-counter-close.tsx | 27 + .../data-access/use-counter-decrement.tsx | 25 + .../data-access/use-counter-fetch-all.tsx | 14 + .../counter/data-access/use-counter-fetch.tsx | 13 + .../data-access/use-counter-increment.tsx | 25 + .../data-access/use-counter-initialize.tsx | 32 + .../data-access/use-counter-program.tsx | 14 + .../data-access/use-counter-refresh.tsx | 14 + .../counter/data-access/use-counter-set.tsx | 28 + .../lib/counter/ui/counter-close-button.tsx | 21 + .../counter/ui/counter-decrement-button.tsx | 20 + .../counter/ui/counter-increment-button.tsx | 20 + .../lib/counter/ui/counter-value-button.tsx | 34 + .../counter/ui/program-counter-account.tsx | 46 + .../solana/feature/src/lib/solana-feature.tsx | 18 + libs/web/solana/feature/tsconfig.json | 17 + libs/web/solana/feature/tsconfig.lib.json | 19 + libs/web/solana/ui/.babelrc | 12 + libs/web/solana/ui/.eslintrc.json | 18 + libs/web/solana/ui/README.md | 7 + libs/web/solana/ui/project.json | 13 + libs/web/solana/ui/src/index.ts | 18 + .../lib/solana-ui-account-balance-button.tsx | 60 + .../lib/solana-ui-account-balance-check.tsx | 43 + .../ui/src/lib/solana-ui-account-balance.tsx | 14 + .../ui/src/lib/solana-ui-account-buttons.tsx | 20 + .../ui/src/lib/solana-ui-account-checker.tsx | 10 + .../lib/solana-ui-account-modal-airdrop.tsx | 38 + .../lib/solana-ui-account-modal-receive.tsx | 19 + .../src/lib/solana-ui-account-modal-send.tsx | 57 + .../lib/solana-ui-account-token-balance.tsx | 14 + .../ui/src/lib/solana-ui-account-tokens.tsx | 107 + .../lib/solana-ui-account-transactions.tsx | 86 + .../ui/src/lib/solana-ui-balance-sol.tsx | 17 + .../ui/src/lib/solana-ui-cluster-checker.tsx | 44 + .../src/lib/solana-ui-cluster-modal-add.tsx | 48 + .../ui/src/lib/solana-ui-cluster-select.tsx | 36 + .../ui/src/lib/solana-ui-cluster-ui-table.tsx | 47 + .../ui/src/lib/solana-ui-explorer-link.tsx | 40 + libs/web/solana/ui/tsconfig.json | 17 + libs/web/solana/ui/tsconfig.lib.json | 19 + libs/web/ui/core/.babelrc | 12 + libs/web/ui/core/.eslintrc.json | 18 + libs/web/ui/core/README.md | 7 + libs/web/ui/core/project.json | 13 + libs/web/ui/core/src/index.ts | 7 + libs/web/ui/core/src/lib/ui-avatar.tsx | 29 + libs/web/ui/core/src/lib/ui-grid.tsx | 11 + .../web/ui/core/src/lib/ui-header-profile.tsx | 75 + libs/web/ui/core/src/lib/ui-modal-button.tsx | 33 + libs/web/ui/core/src/lib/ui-page-limit.tsx | 48 + libs/web/ui/core/src/lib/ui-search-field.tsx | 29 + .../ui/core/src/lib/ui-select-enum-option.tsx | 19 + libs/web/ui/core/tsconfig.json | 17 + libs/web/ui/core/tsconfig.lib.json | 23 + libs/web/user/data-access/.babelrc | 12 + libs/web/user/data-access/.eslintrc.json | 18 + libs/web/user/data-access/README.md | 7 + libs/web/user/data-access/project.json | 13 + libs/web/user/data-access/src/index.ts | 5 + .../src/lib/use-admin-find-many-user.ts | 69 + .../src/lib/use-admin-find-one-user.ts | 36 + .../src/lib/use-user-find-many-user.ts | 33 + .../src/lib/use-user-fine-one-user.ts | 16 + .../data-access/src/lib/use-user-profile.ts | 31 + libs/web/user/data-access/tsconfig.json | 17 + libs/web/user/data-access/tsconfig.lib.json | 23 + libs/web/user/feature/.babelrc | 12 + libs/web/user/feature/.eslintrc.json | 18 + libs/web/user/feature/README.md | 7 + libs/web/user/feature/project.json | 13 + libs/web/user/feature/src/index.ts | 4 + .../src/lib/admin-user-create-feature.tsx | 32 + .../admin-user-detail-feature-identities.tsx | 33 + .../admin-user-detail-feature-settings.tsx | 20 + .../src/lib/admin-user-detail-feature.tsx | 52 + .../src/lib/admin-user-list-feature.tsx | 52 + .../src/lib/admin-user-ui-select-role.tsx | 18 + .../src/lib/admin-user-ui-select-status.tsx | 18 + .../feature/src/lib/admin-user.routes.tsx | 15 + .../src/lib/user-user-detail-feature.tsx | 74 + .../src/lib/user-user-list-feature.tsx | 35 + .../user/feature/src/lib/user-user.routes.tsx | 20 + libs/web/user/feature/tsconfig.json | 17 + libs/web/user/feature/tsconfig.lib.json | 23 + libs/web/user/ui/.babelrc | 12 + libs/web/user/ui/.eslintrc.json | 18 + libs/web/user/ui/README.md | 7 + libs/web/user/ui/project.json | 13 + libs/web/user/ui/src/index.ts | 13 + .../ui/src/lib/admin-user-ui-create-form.tsx | 22 + .../user/ui/src/lib/admin-user-ui-search.tsx | 12 + .../user/ui/src/lib/admin-user-ui-table.tsx | 95 + .../ui/src/lib/admin-user-ui-update-form.tsx | 36 + .../user/ui/src/lib/user-ui-autocomplete.tsx | 60 + libs/web/user/ui/src/lib/user-ui-avatar.tsx | 10 + .../web/user/ui/src/lib/user-ui-grid-item.tsx | 15 + libs/web/user/ui/src/lib/user-ui-grid.tsx | 42 + libs/web/user/ui/src/lib/user-ui-item.tsx | 38 + libs/web/user/ui/src/lib/user-ui-profile.tsx | 43 + .../user/ui/src/lib/user-ui-role-badge.tsx | 17 + libs/web/user/ui/src/lib/user-ui-search.tsx | 12 + .../user/ui/src/lib/user-ui-status-badge.tsx | 18 + .../user/ui/src/lib/user-ui-update-form.tsx | 29 + libs/web/user/ui/tsconfig.json | 17 + libs/web/user/ui/tsconfig.lib.json | 23 + nx.json | 43 + package.json | 189 + pnpm-lock.yaml | 18934 ++++++++++++++++ prisma/schema.prisma | 73 + tools/tsconfig.tools.json | 12 + tsconfig.base.json | 50 + 699 files changed, 44433 insertions(+) create mode 100644 .dockerignore create mode 100644 .editorconfig create mode 100644 .env.example create mode 100644 .eslintignore create mode 100644 .eslintrc.json create mode 100644 .github/workflows/build-publish-docker.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/e2e.yml create mode 100644 .gitignore create mode 100755 .husky/pre-commit create mode 100755 .husky/pre-push create mode 100644 .npmrc create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 .run/dev_api.run.xml create mode 100644 .run/dev_sdk.run.xml create mode 100644 .run/dev_services.run.xml create mode 100644 .run/dev_web.run.xml create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 api-schema.graphql create mode 100644 apps/api-e2e/.eslintrc.json create mode 100644 apps/api-e2e/jest.config.ts create mode 100644 apps/api-e2e/project.json create mode 100644 apps/api-e2e/src/api/api-auth-feature.spec.ts create mode 100644 apps/api-e2e/src/api/api-core-feature.spec.ts create mode 100644 apps/api-e2e/src/api/api-identity-feature.spec.ts create mode 100644 apps/api-e2e/src/api/api-user-feature.spec.ts create mode 100644 apps/api-e2e/src/support/break-string.ts create mode 100644 apps/api-e2e/src/support/get-api.url.ts create mode 100644 apps/api-e2e/src/support/global-setup.ts create mode 100644 apps/api-e2e/src/support/global-teardown.ts create mode 100644 apps/api-e2e/src/support/graphql-sdk.ts create mode 100644 apps/api-e2e/src/support/index.ts create mode 100644 apps/api-e2e/src/support/test-setup.ts create mode 100644 apps/api-e2e/src/support/user-identities.ts create mode 100644 apps/api-e2e/tsconfig.json create mode 100644 apps/api-e2e/tsconfig.spec.json create mode 100644 apps/api/.eslintrc.json create mode 100644 apps/api/jest.config.ts create mode 100644 apps/api/project.json create mode 100644 apps/api/src/app/app.module.ts create mode 100644 apps/api/src/assets/.gitkeep create mode 100644 apps/api/src/main.ts create mode 100644 apps/api/tsconfig.app.json create mode 100644 apps/api/tsconfig.json create mode 100644 apps/api/tsconfig.spec.json create mode 100644 apps/api/webpack.config.js create mode 100644 apps/web-e2e/.eslintrc.json create mode 100644 apps/web-e2e/cypress.config.ts create mode 100644 apps/web-e2e/project.json create mode 100644 apps/web-e2e/src/e2e/app.cy.ts create mode 100644 apps/web-e2e/src/fixtures/example.json create mode 100644 apps/web-e2e/src/support/app.po.ts create mode 100644 apps/web-e2e/src/support/commands.ts create mode 100644 apps/web-e2e/src/support/e2e.ts create mode 100644 apps/web-e2e/tsconfig.json create mode 100644 apps/web/.babelrc create mode 100644 apps/web/.eslintrc.json create mode 100644 apps/web/jest.config.ts create mode 100644 apps/web/postcss.config.cjs create mode 100644 apps/web/project.json create mode 100644 apps/web/proxy.conf.js create mode 100644 apps/web/src/assets/.gitkeep create mode 100644 apps/web/src/environments/environment.prod.ts create mode 100644 apps/web/src/environments/environment.ts create mode 100644 apps/web/src/favicon.ico create mode 100644 apps/web/src/index.html create mode 100644 apps/web/src/main.tsx create mode 100644 apps/web/src/styles.css create mode 100644 apps/web/tsconfig.app.json create mode 100644 apps/web/tsconfig.json create mode 100644 apps/web/tsconfig.spec.json create mode 100644 apps/web/webpack.config.js create mode 100644 babel.config.json create mode 100644 codegen.ts create mode 100644 docker-compose.yml create mode 100644 jest.config.ts create mode 100644 jest.preset.js create mode 100644 libs/anchor/.eslintrc.json create mode 100644 libs/anchor/.swcrc create mode 100644 libs/anchor/Anchor.toml create mode 100644 libs/anchor/Cargo.lock create mode 100644 libs/anchor/Cargo.toml create mode 100644 libs/anchor/README.md create mode 100644 libs/anchor/jest.config.ts create mode 100644 libs/anchor/migrations/deploy.ts create mode 100644 libs/anchor/package.json create mode 100644 libs/anchor/programs/counter/Cargo.toml create mode 100644 libs/anchor/programs/counter/Xargo.toml create mode 100644 libs/anchor/programs/counter/src/lib.rs create mode 100644 libs/anchor/project.json create mode 100644 libs/anchor/src/counter-exports.ts create mode 100644 libs/anchor/src/index.ts create mode 100644 libs/anchor/target/idl/counter.json create mode 100644 libs/anchor/target/types/counter.ts create mode 100644 libs/anchor/tests/counter.spec.ts create mode 100644 libs/anchor/tsconfig.json create mode 100644 libs/anchor/tsconfig.lib.json create mode 100644 libs/anchor/tsconfig.spec.json create mode 100644 libs/api/auth/data-access/.eslintrc.json create mode 100644 libs/api/auth/data-access/README.md create mode 100644 libs/api/auth/data-access/jest.config.ts create mode 100644 libs/api/auth/data-access/project.json create mode 100644 libs/api/auth/data-access/src/index.ts create mode 100644 libs/api/auth/data-access/src/lib/api-auth-data-access.module.ts create mode 100644 libs/api/auth/data-access/src/lib/api-auth.service.ts create mode 100644 libs/api/auth/data-access/src/lib/contexts/ctx-user.ts create mode 100644 libs/api/auth/data-access/src/lib/dto/login.input.ts create mode 100644 libs/api/auth/data-access/src/lib/dto/register.input.ts create mode 100644 libs/api/auth/data-access/src/lib/guards/api-anon-jwt-guard.ts create mode 100644 libs/api/auth/data-access/src/lib/guards/api-auth-graphql-admin-guard.ts create mode 100644 libs/api/auth/data-access/src/lib/guards/api-auth-graphql-user-guard.ts create mode 100644 libs/api/auth/data-access/src/lib/guards/api-auth-jwt-guard.service.ts create mode 100644 libs/api/auth/data-access/src/lib/interfaces/api-auth.request.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/api-auth-strategy-jwt.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/api-auth-strategy.module.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/api-auth-strategy.service.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/oauth/api-auth-strategy-discord.module.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/oauth/api-auth-strategy-discord.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/oauth/api-auth-strategy-github.module.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/oauth/api-auth-strategy-github.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/oauth/api-auth-strategy-google.module.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/oauth/api-auth-strategy-google.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/oauth/api-auth-strategy-twitter.module.ts create mode 100644 libs/api/auth/data-access/src/lib/strategies/oauth/api-auth-strategy-twitter.ts create mode 100644 libs/api/auth/data-access/tsconfig.json create mode 100644 libs/api/auth/data-access/tsconfig.lib.json create mode 100644 libs/api/auth/data-access/tsconfig.spec.json create mode 100644 libs/api/auth/feature/.eslintrc.json create mode 100644 libs/api/auth/feature/README.md create mode 100644 libs/api/auth/feature/jest.config.ts create mode 100644 libs/api/auth/feature/project.json create mode 100644 libs/api/auth/feature/src/index.ts create mode 100644 libs/api/auth/feature/src/lib/api-auth-feature.module.ts create mode 100644 libs/api/auth/feature/src/lib/api-auth-strategy-discord.controller.ts create mode 100644 libs/api/auth/feature/src/lib/api-auth-strategy-github.controller.ts create mode 100644 libs/api/auth/feature/src/lib/api-auth-strategy-google.controller.ts create mode 100644 libs/api/auth/feature/src/lib/api-auth-strategy-twitter.controller.ts create mode 100644 libs/api/auth/feature/src/lib/api-auth.controller.ts create mode 100644 libs/api/auth/feature/src/lib/api-auth.resolver.ts create mode 100644 libs/api/auth/feature/tsconfig.json create mode 100644 libs/api/auth/feature/tsconfig.lib.json create mode 100644 libs/api/auth/feature/tsconfig.spec.json create mode 100644 libs/api/core/data-access/.eslintrc.json create mode 100644 libs/api/core/data-access/README.md create mode 100644 libs/api/core/data-access/jest.config.ts create mode 100644 libs/api/core/data-access/project.json create mode 100644 libs/api/core/data-access/src/index.ts create mode 100644 libs/api/core/data-access/src/lib/api-core-config.service.ts create mode 100644 libs/api/core/data-access/src/lib/api-core-data-access.module.ts create mode 100644 libs/api/core/data-access/src/lib/api-core-prisma-client.ts create mode 100644 libs/api/core/data-access/src/lib/api-core-provision-data.ts create mode 100644 libs/api/core/data-access/src/lib/api-core-provision.service.ts create mode 100644 libs/api/core/data-access/src/lib/api-core.service.ts create mode 100644 libs/api/core/data-access/src/lib/config/configuration.ts create mode 100644 libs/api/core/data-access/src/lib/config/validation-schema.ts create mode 100644 libs/api/core/data-access/src/lib/dto/paging.input.ts create mode 100644 libs/api/core/data-access/src/lib/entity/app-config.entity.ts create mode 100644 libs/api/core/data-access/src/lib/entity/app-context.ts create mode 100644 libs/api/core/data-access/src/lib/entity/paging-meta.entity.ts create mode 100644 libs/api/core/data-access/src/lib/entity/paging-response.entity.ts create mode 100644 libs/api/core/data-access/src/lib/helpers/ellipsify.spec.ts create mode 100644 libs/api/core/data-access/src/lib/helpers/ellipsify.ts create mode 100644 libs/api/core/data-access/src/lib/helpers/get-avatar-url.ts create mode 100644 libs/api/core/data-access/src/lib/helpers/hash-validate-password.spec.ts create mode 100644 libs/api/core/data-access/src/lib/helpers/hash-validate-password.ts create mode 100644 libs/api/core/data-access/src/lib/helpers/serve-static-factory.ts create mode 100644 libs/api/core/data-access/src/lib/helpers/slugify-id.ts create mode 100644 libs/api/core/data-access/tsconfig.json create mode 100644 libs/api/core/data-access/tsconfig.lib.json create mode 100644 libs/api/core/data-access/tsconfig.spec.json create mode 100644 libs/api/core/feature/.eslintrc.json create mode 100644 libs/api/core/feature/README.md create mode 100644 libs/api/core/feature/jest.config.ts create mode 100644 libs/api/core/feature/project.json create mode 100644 libs/api/core/feature/src/index.ts create mode 100644 libs/api/core/feature/src/lib/api-core-feature.module.ts create mode 100644 libs/api/core/feature/src/lib/api-core.controller.ts create mode 100644 libs/api/core/feature/src/lib/api-core.resolver.ts create mode 100644 libs/api/core/feature/tsconfig.json create mode 100644 libs/api/core/feature/tsconfig.lib.json create mode 100644 libs/api/core/feature/tsconfig.spec.json create mode 100644 libs/api/identity/data-access/.eslintrc.json create mode 100644 libs/api/identity/data-access/README.md create mode 100644 libs/api/identity/data-access/jest.config.ts create mode 100644 libs/api/identity/data-access/project.json create mode 100644 libs/api/identity/data-access/src/index.ts create mode 100644 libs/api/identity/data-access/src/lib/api-admin-identity.service.ts create mode 100644 libs/api/identity/data-access/src/lib/api-anon-identity.service.ts create mode 100644 libs/api/identity/data-access/src/lib/api-identity-data-access.module.ts create mode 100644 libs/api/identity/data-access/src/lib/api-identity.service.ts create mode 100644 libs/api/identity/data-access/src/lib/api-solana-identity.service.ts create mode 100644 libs/api/identity/data-access/src/lib/api-user-identity.service.ts create mode 100644 libs/api/identity/data-access/src/lib/dto/admin-create-identity.input.ts create mode 100644 libs/api/identity/data-access/src/lib/dto/admin-find-many-identity.input.ts create mode 100644 libs/api/identity/data-access/src/lib/dto/link-identity-input.ts create mode 100644 libs/api/identity/data-access/src/lib/dto/request-identity-challenge.input.ts create mode 100644 libs/api/identity/data-access/src/lib/dto/user-find-many-identity-input.ts create mode 100644 libs/api/identity/data-access/src/lib/dto/verify-identity-challenge-input.ts create mode 100644 libs/api/identity/data-access/src/lib/entity/identity-challenge.entity.ts create mode 100644 libs/api/identity/data-access/src/lib/entity/identity-provider.enum.ts create mode 100644 libs/api/identity/data-access/src/lib/entity/identity.entity.ts create mode 100644 libs/api/identity/data-access/src/lib/helpers/get-identity-url.ts create mode 100644 libs/api/identity/data-access/src/lib/helpers/sha256.ts create mode 100644 libs/api/identity/data-access/tsconfig.json create mode 100644 libs/api/identity/data-access/tsconfig.lib.json create mode 100644 libs/api/identity/data-access/tsconfig.spec.json create mode 100644 libs/api/identity/feature/.eslintrc.json create mode 100644 libs/api/identity/feature/README.md create mode 100644 libs/api/identity/feature/jest.config.ts create mode 100644 libs/api/identity/feature/project.json create mode 100644 libs/api/identity/feature/src/index.ts create mode 100644 libs/api/identity/feature/src/lib/api-admin-identity.resolver.ts create mode 100644 libs/api/identity/feature/src/lib/api-anon-identity.resolver.ts create mode 100644 libs/api/identity/feature/src/lib/api-identity-feature.module.ts create mode 100644 libs/api/identity/feature/src/lib/api-identity.resolver.ts create mode 100644 libs/api/identity/feature/src/lib/api-user-identity.resolver.ts create mode 100644 libs/api/identity/feature/tsconfig.json create mode 100644 libs/api/identity/feature/tsconfig.lib.json create mode 100644 libs/api/identity/feature/tsconfig.spec.json create mode 100644 libs/api/user/data-access/.eslintrc.json create mode 100644 libs/api/user/data-access/README.md create mode 100644 libs/api/user/data-access/jest.config.ts create mode 100644 libs/api/user/data-access/project.json create mode 100644 libs/api/user/data-access/src/index.ts create mode 100644 libs/api/user/data-access/src/lib/api-admin-user.service.ts create mode 100644 libs/api/user/data-access/src/lib/api-user-data-access.module.ts create mode 100644 libs/api/user/data-access/src/lib/api-user-user.service.ts create mode 100644 libs/api/user/data-access/src/lib/api-user.service.ts create mode 100644 libs/api/user/data-access/src/lib/dto/admin-create-user.input.ts create mode 100644 libs/api/user/data-access/src/lib/dto/admin-find-many-user.input.ts create mode 100644 libs/api/user/data-access/src/lib/dto/admin-update-user.input.ts create mode 100644 libs/api/user/data-access/src/lib/dto/user-find-many-user.input.ts create mode 100644 libs/api/user/data-access/src/lib/dto/user-update-user.input.ts create mode 100644 libs/api/user/data-access/src/lib/entity/user-paging.entity.ts create mode 100644 libs/api/user/data-access/src/lib/entity/user-role.enum.ts create mode 100644 libs/api/user/data-access/src/lib/entity/user-status.enum.ts create mode 100644 libs/api/user/data-access/src/lib/entity/user.entity.ts create mode 100644 libs/api/user/data-access/src/lib/helpers/get-admin-user-where.input.ts create mode 100644 libs/api/user/data-access/src/lib/helpers/get-user-user-where.input.ts create mode 100644 libs/api/user/data-access/tsconfig.json create mode 100644 libs/api/user/data-access/tsconfig.lib.json create mode 100644 libs/api/user/data-access/tsconfig.spec.json create mode 100644 libs/api/user/feature/.eslintrc.json create mode 100644 libs/api/user/feature/README.md create mode 100644 libs/api/user/feature/jest.config.ts create mode 100644 libs/api/user/feature/project.json create mode 100644 libs/api/user/feature/src/index.ts create mode 100644 libs/api/user/feature/src/lib/api-admin-user.resolver.ts create mode 100644 libs/api/user/feature/src/lib/api-user-feature.module.ts create mode 100644 libs/api/user/feature/src/lib/api-user-user.resolver.ts create mode 100644 libs/api/user/feature/src/lib/api-user.resolver.ts create mode 100644 libs/api/user/feature/tsconfig.json create mode 100644 libs/api/user/feature/tsconfig.lib.json create mode 100644 libs/api/user/feature/tsconfig.spec.json create mode 100644 libs/sdk/.eslintrc.json create mode 100644 libs/sdk/README.md create mode 100644 libs/sdk/jest.config.ts create mode 100644 libs/sdk/package.json create mode 100644 libs/sdk/project.json create mode 100644 libs/sdk/src/generated/graphql-sdk.ts create mode 100644 libs/sdk/src/graphql/feature-auth.graphql create mode 100644 libs/sdk/src/graphql/feature-core.graphql create mode 100644 libs/sdk/src/graphql/feature-identity.graphql create mode 100644 libs/sdk/src/graphql/feature-user.graphql create mode 100644 libs/sdk/src/index.ts create mode 100644 libs/sdk/src/lib/constants.ts create mode 100644 libs/sdk/src/lib/dummy.spec.ts create mode 100644 libs/sdk/src/lib/ellipsify.ts create mode 100644 libs/sdk/src/lib/get-enum-options.ts create mode 100644 libs/sdk/src/lib/get-graphql-client.ts create mode 100644 libs/sdk/src/lib/get-graphql-sdk.ts create mode 100644 libs/sdk/src/lib/get-random-int.ts create mode 100644 libs/sdk/src/lib/response-middleware.ts create mode 100644 libs/sdk/src/lib/validate-challenge.ts create mode 100644 libs/sdk/src/lib/verify-signature.ts create mode 100644 libs/sdk/tsconfig.json create mode 100644 libs/sdk/tsconfig.lib.json create mode 100644 libs/sdk/tsconfig.spec.json create mode 100644 libs/tools/.eslintrc.json create mode 100644 libs/tools/README.md create mode 100644 libs/tools/generators.json create mode 100644 libs/tools/jest.config.ts create mode 100644 libs/tools/package.json create mode 100644 libs/tools/project.json create mode 100644 libs/tools/src/generators/api-crud/__snapshots__/api-crud-generator.spec.ts.snap create mode 100644 libs/tools/src/generators/api-crud/api-crud-generator.spec.ts create mode 100644 libs/tools/src/generators/api-crud/api-crud-generator.ts create mode 100644 libs/tools/src/generators/api-crud/api-crud-schema.d.ts create mode 100644 libs/tools/src/generators/api-crud/api-crud-schema.json create mode 100644 libs/tools/src/generators/api-feature/__snapshots__/api-feature-generator.spec.ts.snap create mode 100644 libs/tools/src/generators/api-feature/api-feature-generator.spec.ts create mode 100644 libs/tools/src/generators/api-feature/api-feature-generator.ts create mode 100644 libs/tools/src/generators/api-feature/api-feature-schema.d.ts create mode 100644 libs/tools/src/generators/api-feature/api-feature-schema.json create mode 100644 libs/tools/src/generators/prisma-model/prisma-model-generator.spec.ts create mode 100644 libs/tools/src/generators/prisma-model/prisma-model-generator.ts create mode 100644 libs/tools/src/generators/prisma-model/prisma-model-schema.d.ts create mode 100644 libs/tools/src/generators/prisma-model/prisma-model-schema.json create mode 100644 libs/tools/src/generators/prisma-sync/files/src/index.ts.template create mode 100644 libs/tools/src/generators/prisma-sync/prisma-sync-generator.spec.ts create mode 100644 libs/tools/src/generators/prisma-sync/prisma-sync-generator.ts create mode 100644 libs/tools/src/generators/prisma-sync/prisma-sync-schema.d.ts create mode 100644 libs/tools/src/generators/prisma-sync/prisma-sync-schema.json create mode 100644 libs/tools/src/generators/rename/rename-generator.spec.ts create mode 100644 libs/tools/src/generators/rename/rename-generator.ts create mode 100644 libs/tools/src/generators/rename/rename-schema.d.ts create mode 100644 libs/tools/src/generators/rename/rename-schema.json create mode 100644 libs/tools/src/generators/rename/tree-walker.ts create mode 100644 libs/tools/src/generators/setup/setup-generator.ts create mode 100644 libs/tools/src/generators/setup/setup-schema.json create mode 100644 libs/tools/src/generators/web-crud/web-crud-generator.spec.ts create mode 100644 libs/tools/src/generators/web-crud/web-crud-generator.ts create mode 100644 libs/tools/src/generators/web-crud/web-crud-schema.d.ts create mode 100644 libs/tools/src/generators/web-crud/web-crud-schema.json create mode 100644 libs/tools/src/generators/web-feature/__snapshots__/web-feature-generator.spec.ts.snap create mode 100644 libs/tools/src/generators/web-feature/web-feature-generator.spec.ts create mode 100644 libs/tools/src/generators/web-feature/web-feature-generator.ts create mode 100644 libs/tools/src/generators/web-feature/web-feature-schema.d.ts create mode 100644 libs/tools/src/generators/web-feature/web-feature-schema.json create mode 100644 libs/tools/src/index.ts create mode 100644 libs/tools/src/lib/api-crud/add-service-to-class-constructor.spec.ts create mode 100644 libs/tools/src/lib/api-crud/add-service-to-class-constructor.ts create mode 100644 libs/tools/src/lib/api-crud/add-service-to-module-decorator.spec.ts create mode 100644 libs/tools/src/lib/api-crud/add-service-to-module-decorator.ts create mode 100644 libs/tools/src/lib/api-crud/files/data-access/lib/__appFileName__-__actorFileName__-__modelFileName__.service.ts.template create mode 100644 libs/tools/src/lib/api-crud/files/data-access/lib/api-__actorFileName__-__modelFileName__.service.ts.template create mode 100644 libs/tools/src/lib/api-crud/files/data-access/lib/dto/__actorFileName__-create-__modelFileName__.input.ts.template create mode 100644 libs/tools/src/lib/api-crud/files/data-access/lib/dto/__actorFileName__-find-many-__modelFileName__.input.ts.template create mode 100644 libs/tools/src/lib/api-crud/files/data-access/lib/dto/__actorFileName__-update-__modelFileName__.input.ts.template create mode 100644 libs/tools/src/lib/api-crud/files/data-access/lib/helpers/get-__actorFileName__-__modelFileName__-where.input.ts.template create mode 100644 libs/tools/src/lib/api-crud/files/e2e/__appFileName__-__modelFileName__-__actorFileName__-feature.spec.ts.template create mode 100644 libs/tools/src/lib/api-crud/files/entity/lib/entity/__modelFileName__-paging.entity.ts.template create mode 100644 libs/tools/src/lib/api-crud/files/entity/lib/entity/__modelFileName__.entity.ts.template create mode 100644 libs/tools/src/lib/api-crud/files/feature/lib/api-__actorFileName__-__modelFileName__.resolver.ts.template create mode 100644 libs/tools/src/lib/api-crud/generate-api-crud.ts create mode 100644 libs/tools/src/lib/api-crud/generate-sdk-file.ts create mode 100644 libs/tools/src/lib/api-crud/get-api-crud-substitutions.ts create mode 100644 libs/tools/src/lib/api-crud/normalize-api-crud-schema.ts create mode 100644 libs/tools/src/lib/api/api-update-core-feature-module.ts create mode 100644 libs/tools/src/lib/api/create-mock-api-app.ts create mode 100644 libs/tools/src/lib/api/files/data-access/lib/__appFileName__-__modelFileName__-data-access.module.ts.template create mode 100644 libs/tools/src/lib/api/files/data-access/lib/__appFileName__-__modelFileName__.service.ts.template create mode 100644 libs/tools/src/lib/api/files/feature/lib/__appFileName__-__modelFileName__-feature.module.ts.template create mode 100644 libs/tools/src/lib/api/files/feature/lib/__appFileName__-__modelFileName__.resolver.ts.template create mode 100644 libs/tools/src/lib/api/generate-api-feature.ts create mode 100644 libs/tools/src/lib/api/generate-api-lib-data-access.ts create mode 100644 libs/tools/src/lib/api/generate-api-lib-feature.ts create mode 100644 libs/tools/src/lib/api/generate-api-lib.ts create mode 100644 libs/tools/src/lib/api/get-api-core-feature-info.ts create mode 100644 libs/tools/src/lib/api/get-api-feature-module-info.ts create mode 100644 libs/tools/src/lib/api/get-api-substitutions.ts create mode 100644 libs/tools/src/lib/api/index.ts create mode 100644 libs/tools/src/lib/api/normalize-api-feature-schema.ts create mode 100644 libs/tools/src/lib/prisma/__snapshots__/parse-prisma-model-fields.spec.ts.snap create mode 100644 libs/tools/src/lib/prisma/create-mock-prisma-schema.ts create mode 100644 libs/tools/src/lib/prisma/get-domain-from-project-name.ts create mode 100644 libs/tools/src/lib/prisma/get-prisma-enums.ts create mode 100644 libs/tools/src/lib/prisma/get-prisma-models.ts create mode 100644 libs/tools/src/lib/prisma/get-prisma-schema-file.ts create mode 100644 libs/tools/src/lib/prisma/get-prisma-schema.ts create mode 100644 libs/tools/src/lib/prisma/get-project-entities.ts create mode 100644 libs/tools/src/lib/prisma/normalize-prisma-model-schema.spec.ts create mode 100644 libs/tools/src/lib/prisma/normalize-prisma-model-schema.ts create mode 100644 libs/tools/src/lib/prisma/normalize-prisma-sync-schema.ts create mode 100644 libs/tools/src/lib/prisma/parse-prisma-model-fields.spec.ts create mode 100644 libs/tools/src/lib/prisma/parse-prisma-model-fields.ts create mode 100644 libs/tools/src/lib/prisma/sync-prisma-entities.ts create mode 100644 libs/tools/src/lib/setup/validate-env-file.ts create mode 100644 libs/tools/src/lib/setup/validate-postgres-connection.ts create mode 100644 libs/tools/src/lib/types/api-feature.d.ts create mode 100644 libs/tools/src/lib/types/web-feature.d.ts create mode 100644 libs/tools/src/lib/utils/add-array-item.ts create mode 100644 libs/tools/src/lib/utils/add-constructors.ts create mode 100644 libs/tools/src/lib/utils/add-export.ts create mode 100644 libs/tools/src/lib/utils/add-named-import.ts create mode 100644 libs/tools/src/lib/utils/ensure-nx-project-exists.ts create mode 100644 libs/tools/src/lib/utils/get-decorator-args.ts create mode 100644 libs/tools/src/lib/utils/get-import-path.ts create mode 100644 libs/tools/src/lib/utils/get-recursive-file-contents.ts create mode 100644 libs/tools/src/lib/utils/get-recursive-file-names.ts create mode 100644 libs/tools/src/lib/utils/get-source-file.ts create mode 100644 libs/tools/src/lib/utils/update-source-file.ts create mode 100644 libs/tools/src/lib/web-crud/files/data-access/lib/use-__actorFileName__-find-many-__modelFileName__.ts.template create mode 100644 libs/tools/src/lib/web-crud/files/data-access/lib/use-__actorFileName__-find-one-__modelFileName__.ts.template create mode 100644 libs/tools/src/lib/web-crud/files/feature/lib/__actorFileName__-__modelFileName__-create.feature.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/feature/lib/__actorFileName__-__modelFileName__-detail-overview.tab.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/feature/lib/__actorFileName__-__modelFileName__-detail-settings.tab.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/feature/lib/__actorFileName__-__modelFileName__-detail.feature.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/feature/lib/__actorFileName__-__modelFileName__-list.feature.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/feature/lib/__actorFileName__-__modelFileName__.routes.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/ui/lib/__actorFileName__-__modelFileName__-ui-create-form.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/ui/lib/__actorFileName__-__modelFileName__-ui-table.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/ui/lib/__actorFileName__-__modelFileName__-ui-update-form.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/ui/lib/__modelFileName__-ui-avatar.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/ui/lib/__modelFileName__-ui-grid-item.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/ui/lib/__modelFileName__-ui-grid.tsx.template create mode 100644 libs/tools/src/lib/web-crud/files/ui/lib/__modelFileName__-ui-item.tsx.template create mode 100644 libs/tools/src/lib/web-crud/generate-web-crud.ts create mode 100644 libs/tools/src/lib/web-crud/get-web-crud-substitutions.ts create mode 100644 libs/tools/src/lib/web-crud/normalize-web-crud-schema.ts create mode 100644 libs/tools/src/lib/web/create-mock-web-app.ts create mode 100644 libs/tools/src/lib/web/files/data-access/lib/use-admin-find-many-__modelFileName__.ts.template create mode 100644 libs/tools/src/lib/web/files/data-access/lib/use-admin-find-one-__modelFileName__.ts.template create mode 100644 libs/tools/src/lib/web/files/feature/lib/admin-__modelFileName__-create.feature.tsx.template create mode 100644 libs/tools/src/lib/web/files/feature/lib/admin-__modelFileName__-detail-overview.tab.tsx.template create mode 100644 libs/tools/src/lib/web/files/feature/lib/admin-__modelFileName__-detail-settings.tab.tsx.template create mode 100644 libs/tools/src/lib/web/files/feature/lib/admin-__modelFileName__-detail.feature.tsx.template create mode 100644 libs/tools/src/lib/web/files/feature/lib/admin-__modelFileName__-feature.tsx.template create mode 100644 libs/tools/src/lib/web/files/feature/lib/admin-__modelFileName__-list.feature.tsx.template create mode 100644 libs/tools/src/lib/web/files/ui/lib/admin-__modelFileName__-ui-create-form.tsx.template create mode 100644 libs/tools/src/lib/web/files/ui/lib/admin-__modelFileName__-ui-table.tsx.template create mode 100644 libs/tools/src/lib/web/files/ui/lib/admin-__modelFileName__-ui-update-form.tsx.template create mode 100644 libs/tools/src/lib/web/generate-web-feature.ts create mode 100644 libs/tools/src/lib/web/generate-web-lib.ts create mode 100644 libs/tools/src/lib/web/index.ts create mode 100644 libs/tools/src/lib/web/normalize-web-feature-schema.ts create mode 100644 libs/tools/tsconfig.json create mode 100644 libs/tools/tsconfig.lib.json create mode 100644 libs/tools/tsconfig.spec.json create mode 100644 libs/web/auth/data-access/.babelrc create mode 100644 libs/web/auth/data-access/.eslintrc.json create mode 100644 libs/web/auth/data-access/README.md create mode 100644 libs/web/auth/data-access/project.json create mode 100644 libs/web/auth/data-access/src/index.ts create mode 100644 libs/web/auth/data-access/src/lib/auth.provider.tsx create mode 100644 libs/web/auth/data-access/src/lib/use-me.ts create mode 100644 libs/web/auth/data-access/tsconfig.json create mode 100644 libs/web/auth/data-access/tsconfig.lib.json create mode 100644 libs/web/auth/feature/.babelrc create mode 100644 libs/web/auth/feature/.eslintrc.json create mode 100644 libs/web/auth/feature/README.md create mode 100644 libs/web/auth/feature/project.json create mode 100644 libs/web/auth/feature/src/index.ts create mode 100644 libs/web/auth/feature/src/lib/auth-login-feature.tsx create mode 100644 libs/web/auth/feature/src/lib/auth-register-feature.tsx create mode 100644 libs/web/auth/feature/tsconfig.json create mode 100644 libs/web/auth/feature/tsconfig.lib.json create mode 100644 libs/web/auth/ui/.babelrc create mode 100644 libs/web/auth/ui/.eslintrc.json create mode 100644 libs/web/auth/ui/README.md create mode 100644 libs/web/auth/ui/project.json create mode 100644 libs/web/auth/ui/src/index.ts create mode 100644 libs/web/auth/ui/src/lib/auth-ui-enabled.tsx create mode 100644 libs/web/auth/ui/src/lib/auth-ui-form.tsx create mode 100644 libs/web/auth/ui/src/lib/auth-ui-full.tsx create mode 100644 libs/web/auth/ui/src/lib/auth-ui-page.tsx create mode 100644 libs/web/auth/ui/src/lib/auth-ui-route-guard.tsx create mode 100644 libs/web/auth/ui/src/lib/auth-ui-shell.tsx create mode 100644 libs/web/auth/ui/src/lib/auth-ui-user-role-guard.tsx create mode 100644 libs/web/auth/ui/src/lib/auth-ui-user-status-guard.tsx create mode 100644 libs/web/auth/ui/tsconfig.json create mode 100644 libs/web/auth/ui/tsconfig.lib.json create mode 100644 libs/web/core/data-access/.babelrc create mode 100644 libs/web/core/data-access/.eslintrc.json create mode 100644 libs/web/core/data-access/README.md create mode 100644 libs/web/core/data-access/project.json create mode 100644 libs/web/core/data-access/src/index.ts create mode 100644 libs/web/core/data-access/src/lib/sdk-provider.tsx create mode 100644 libs/web/core/data-access/tsconfig.json create mode 100644 libs/web/core/data-access/tsconfig.lib.json create mode 100644 libs/web/dashboard/feature/.babelrc create mode 100644 libs/web/dashboard/feature/.eslintrc.json create mode 100644 libs/web/dashboard/feature/README.md create mode 100644 libs/web/dashboard/feature/jest.config.ts create mode 100644 libs/web/dashboard/feature/project.json create mode 100644 libs/web/dashboard/feature/src/index.ts create mode 100644 libs/web/dashboard/feature/src/lib/dashboard-feature.tsx create mode 100644 libs/web/dashboard/feature/tsconfig.json create mode 100644 libs/web/dashboard/feature/tsconfig.lib.json create mode 100644 libs/web/dashboard/feature/tsconfig.spec.json create mode 100644 libs/web/dev/feature/.babelrc create mode 100644 libs/web/dev/feature/.eslintrc.json create mode 100644 libs/web/dev/feature/README.md create mode 100644 libs/web/dev/feature/project.json create mode 100644 libs/web/dev/feature/src/index.ts create mode 100644 libs/web/dev/feature/src/lib/dev-admin-routes.tsx create mode 100644 libs/web/dev/feature/src/lib/dev-identity-wizard.tsx create mode 100644 libs/web/dev/feature/src/lib/dev-new.tsx create mode 100644 libs/web/dev/feature/src/lib/dev-user-autocomplete.tsx create mode 100644 libs/web/dev/feature/tsconfig.json create mode 100644 libs/web/dev/feature/tsconfig.lib.json create mode 100644 libs/web/home/feature/.babelrc create mode 100644 libs/web/home/feature/.eslintrc.json create mode 100644 libs/web/home/feature/README.md create mode 100644 libs/web/home/feature/jest.config.ts create mode 100644 libs/web/home/feature/project.json create mode 100644 libs/web/home/feature/src/index.ts create mode 100644 libs/web/home/feature/src/lib/home-feature.tsx create mode 100644 libs/web/home/feature/src/lib/pages/about-page.tsx create mode 100644 libs/web/home/feature/src/lib/pages/home-page.tsx create mode 100644 libs/web/home/feature/tsconfig.json create mode 100644 libs/web/home/feature/tsconfig.lib.json create mode 100644 libs/web/home/feature/tsconfig.spec.json create mode 100644 libs/web/identity/data-access/.babelrc create mode 100644 libs/web/identity/data-access/.eslintrc.json create mode 100644 libs/web/identity/data-access/README.md create mode 100644 libs/web/identity/data-access/project.json create mode 100644 libs/web/identity/data-access/src/index.ts create mode 100644 libs/web/identity/data-access/src/lib/identity-provider-solana-link.tsx create mode 100644 libs/web/identity/data-access/src/lib/identity-provider-solana-login.tsx create mode 100644 libs/web/identity/data-access/src/lib/use-admin-find-many-identity.ts create mode 100644 libs/web/identity/data-access/src/lib/use-create-signature.ts create mode 100644 libs/web/identity/data-access/src/lib/use-user-find-many-identity.ts create mode 100644 libs/web/identity/data-access/tsconfig.json create mode 100644 libs/web/identity/data-access/tsconfig.lib.json create mode 100644 libs/web/identity/ui/.babelrc create mode 100644 libs/web/identity/ui/.eslintrc.json create mode 100644 libs/web/identity/ui/README.md create mode 100644 libs/web/identity/ui/project.json create mode 100644 libs/web/identity/ui/src/index.ts create mode 100644 libs/web/identity/ui/src/lib/admin-identity-ui-create-form.tsx create mode 100644 libs/web/identity/ui/src/lib/admin-identity-ui-table.tsx create mode 100644 libs/web/identity/ui/src/lib/get-identity-provider-color.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-avatar-group.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-avatar.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-badge.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-group-list.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-icon.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-link-button.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-link.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-list.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-login-button.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-login-buttons.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-provider-button.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-solana-link-button.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-solana-link-wizard.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-solana-login-button.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-solana-login-wizard.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-solana-verify-button.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-solana-verify-wizard.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-solana-wizard-modal.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-solana-wizard.tsx create mode 100644 libs/web/identity/ui/src/lib/identity-ui-verified.tsx create mode 100644 libs/web/identity/ui/tsconfig.json create mode 100644 libs/web/identity/ui/tsconfig.lib.json create mode 100644 libs/web/settings/feature/.babelrc create mode 100644 libs/web/settings/feature/.eslintrc.json create mode 100644 libs/web/settings/feature/README.md create mode 100644 libs/web/settings/feature/jest.config.ts create mode 100644 libs/web/settings/feature/project.json create mode 100644 libs/web/settings/feature/src/index.ts create mode 100644 libs/web/settings/feature/src/lib/settings-feature.tsx create mode 100644 libs/web/settings/feature/src/lib/settings-identity-feature.tsx create mode 100644 libs/web/settings/feature/tsconfig.json create mode 100644 libs/web/settings/feature/tsconfig.lib.json create mode 100644 libs/web/settings/feature/tsconfig.spec.json create mode 100644 libs/web/shell/feature/.babelrc create mode 100644 libs/web/shell/feature/.eslintrc.json create mode 100644 libs/web/shell/feature/README.md create mode 100644 libs/web/shell/feature/project.json create mode 100644 libs/web/shell/feature/src/index.ts create mode 100644 libs/web/shell/feature/src/lib/shell-admin.routes.tsx create mode 100644 libs/web/shell/feature/src/lib/shell-feature.tsx create mode 100644 libs/web/shell/feature/src/lib/shell-layout.tsx create mode 100644 libs/web/shell/feature/src/lib/shell-user.routes.tsx create mode 100644 libs/web/shell/feature/src/lib/shell.routes.tsx create mode 100644 libs/web/shell/feature/src/lib/use-guarded-routes.tsx create mode 100644 libs/web/shell/feature/tsconfig.json create mode 100644 libs/web/shell/feature/tsconfig.lib.json create mode 100644 libs/web/solana/data-access/.babelrc create mode 100644 libs/web/solana/data-access/.eslintrc.json create mode 100644 libs/web/solana/data-access/README.md create mode 100644 libs/web/solana/data-access/project.json create mode 100644 libs/web/solana/data-access/src/index.ts create mode 100644 libs/web/solana/data-access/src/lib/cluster-provider.tsx create mode 100644 libs/web/solana/data-access/src/lib/create-transaction.ts create mode 100644 libs/web/solana/data-access/src/lib/solana-provider.tsx create mode 100644 libs/web/solana/data-access/src/lib/ui-toast-link.tsx create mode 100644 libs/web/solana/data-access/src/lib/use-account.tsx create mode 100644 libs/web/solana/data-access/tsconfig.json create mode 100644 libs/web/solana/data-access/tsconfig.lib.json create mode 100644 libs/web/solana/feature/.babelrc create mode 100644 libs/web/solana/feature/.eslintrc.json create mode 100644 libs/web/solana/feature/README.md create mode 100644 libs/web/solana/feature/project.json create mode 100644 libs/web/solana/feature/src/index.ts create mode 100644 libs/web/solana/feature/src/lib/account/account-detail-feature.tsx create mode 100644 libs/web/solana/feature/src/lib/account/account-list-feature.tsx create mode 100644 libs/web/solana/feature/src/lib/cluster/cluster-feature.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/counter-feature.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/counter-list-feature.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/data-access/counter-program-account-provider.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/data-access/use-counter-close.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/data-access/use-counter-decrement.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/data-access/use-counter-fetch-all.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/data-access/use-counter-fetch.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/data-access/use-counter-increment.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/data-access/use-counter-initialize.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/data-access/use-counter-program.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/data-access/use-counter-refresh.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/data-access/use-counter-set.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/ui/counter-close-button.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/ui/counter-decrement-button.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/ui/counter-increment-button.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/ui/counter-value-button.tsx create mode 100644 libs/web/solana/feature/src/lib/counter/ui/program-counter-account.tsx create mode 100644 libs/web/solana/feature/src/lib/solana-feature.tsx create mode 100644 libs/web/solana/feature/tsconfig.json create mode 100644 libs/web/solana/feature/tsconfig.lib.json create mode 100644 libs/web/solana/ui/.babelrc create mode 100644 libs/web/solana/ui/.eslintrc.json create mode 100644 libs/web/solana/ui/README.md create mode 100644 libs/web/solana/ui/project.json create mode 100644 libs/web/solana/ui/src/index.ts create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-balance-button.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-balance-check.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-balance.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-buttons.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-checker.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-modal-airdrop.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-modal-receive.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-modal-send.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-token-balance.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-tokens.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-account-transactions.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-balance-sol.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-cluster-checker.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-cluster-modal-add.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-cluster-select.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-cluster-ui-table.tsx create mode 100644 libs/web/solana/ui/src/lib/solana-ui-explorer-link.tsx create mode 100644 libs/web/solana/ui/tsconfig.json create mode 100644 libs/web/solana/ui/tsconfig.lib.json create mode 100644 libs/web/ui/core/.babelrc create mode 100644 libs/web/ui/core/.eslintrc.json create mode 100644 libs/web/ui/core/README.md create mode 100644 libs/web/ui/core/project.json create mode 100644 libs/web/ui/core/src/index.ts create mode 100644 libs/web/ui/core/src/lib/ui-avatar.tsx create mode 100644 libs/web/ui/core/src/lib/ui-grid.tsx create mode 100644 libs/web/ui/core/src/lib/ui-header-profile.tsx create mode 100644 libs/web/ui/core/src/lib/ui-modal-button.tsx create mode 100644 libs/web/ui/core/src/lib/ui-page-limit.tsx create mode 100644 libs/web/ui/core/src/lib/ui-search-field.tsx create mode 100644 libs/web/ui/core/src/lib/ui-select-enum-option.tsx create mode 100644 libs/web/ui/core/tsconfig.json create mode 100644 libs/web/ui/core/tsconfig.lib.json create mode 100644 libs/web/user/data-access/.babelrc create mode 100644 libs/web/user/data-access/.eslintrc.json create mode 100644 libs/web/user/data-access/README.md create mode 100644 libs/web/user/data-access/project.json create mode 100644 libs/web/user/data-access/src/index.ts create mode 100644 libs/web/user/data-access/src/lib/use-admin-find-many-user.ts create mode 100644 libs/web/user/data-access/src/lib/use-admin-find-one-user.ts create mode 100644 libs/web/user/data-access/src/lib/use-user-find-many-user.ts create mode 100644 libs/web/user/data-access/src/lib/use-user-fine-one-user.ts create mode 100644 libs/web/user/data-access/src/lib/use-user-profile.ts create mode 100644 libs/web/user/data-access/tsconfig.json create mode 100644 libs/web/user/data-access/tsconfig.lib.json create mode 100644 libs/web/user/feature/.babelrc create mode 100644 libs/web/user/feature/.eslintrc.json create mode 100644 libs/web/user/feature/README.md create mode 100644 libs/web/user/feature/project.json create mode 100644 libs/web/user/feature/src/index.ts create mode 100644 libs/web/user/feature/src/lib/admin-user-create-feature.tsx create mode 100644 libs/web/user/feature/src/lib/admin-user-detail-feature-identities.tsx create mode 100644 libs/web/user/feature/src/lib/admin-user-detail-feature-settings.tsx create mode 100644 libs/web/user/feature/src/lib/admin-user-detail-feature.tsx create mode 100644 libs/web/user/feature/src/lib/admin-user-list-feature.tsx create mode 100644 libs/web/user/feature/src/lib/admin-user-ui-select-role.tsx create mode 100644 libs/web/user/feature/src/lib/admin-user-ui-select-status.tsx create mode 100644 libs/web/user/feature/src/lib/admin-user.routes.tsx create mode 100644 libs/web/user/feature/src/lib/user-user-detail-feature.tsx create mode 100644 libs/web/user/feature/src/lib/user-user-list-feature.tsx create mode 100644 libs/web/user/feature/src/lib/user-user.routes.tsx create mode 100644 libs/web/user/feature/tsconfig.json create mode 100644 libs/web/user/feature/tsconfig.lib.json create mode 100644 libs/web/user/ui/.babelrc create mode 100644 libs/web/user/ui/.eslintrc.json create mode 100644 libs/web/user/ui/README.md create mode 100644 libs/web/user/ui/project.json create mode 100644 libs/web/user/ui/src/index.ts create mode 100644 libs/web/user/ui/src/lib/admin-user-ui-create-form.tsx create mode 100644 libs/web/user/ui/src/lib/admin-user-ui-search.tsx create mode 100644 libs/web/user/ui/src/lib/admin-user-ui-table.tsx create mode 100644 libs/web/user/ui/src/lib/admin-user-ui-update-form.tsx create mode 100644 libs/web/user/ui/src/lib/user-ui-autocomplete.tsx create mode 100644 libs/web/user/ui/src/lib/user-ui-avatar.tsx create mode 100644 libs/web/user/ui/src/lib/user-ui-grid-item.tsx create mode 100644 libs/web/user/ui/src/lib/user-ui-grid.tsx create mode 100644 libs/web/user/ui/src/lib/user-ui-item.tsx create mode 100644 libs/web/user/ui/src/lib/user-ui-profile.tsx create mode 100644 libs/web/user/ui/src/lib/user-ui-role-badge.tsx create mode 100644 libs/web/user/ui/src/lib/user-ui-search.tsx create mode 100644 libs/web/user/ui/src/lib/user-ui-status-badge.tsx create mode 100644 libs/web/user/ui/src/lib/user-ui-update-form.tsx create mode 100644 libs/web/user/ui/tsconfig.json create mode 100644 libs/web/user/ui/tsconfig.lib.json create mode 100644 nx.json create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 prisma/schema.prisma create mode 100644 tools/tsconfig.tools.json create mode 100644 tsconfig.base.json diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..816ae806 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +dist +node_modules +tmp diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..6e87a003 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..108cecfa --- /dev/null +++ b/.env.example @@ -0,0 +1,60 @@ +# API Url +API_URL=http://localhost:3000/api +# Discord Admin IDs (comma-separated) +#AUTH_DISCORD_ADMIN_IDS= +# Discord OAuth2 client ID and secret +#AUTH_DISCORD_CLIENT_ID= +#AUTH_DISCORD_CLIENT_SECRET= +# Enable login with Discord +#AUTH_DISCORD_ENABLED=true +# GitHub Admin IDs (comma-separated) +#AUTH_GITHUB_ADMIN_IDS= +# GitHub OAuth2 client ID and secret +#AUTH_GITHUB_CLIENT_ID= +#AUTH_GITHUB_CLIENT_SECRET= +# Enable login with GitHub +#AUTH_GITHUB_ENABLED=true +# Google Admin IDs (comma-separated) +#AUTH_GOOGLE_ADMIN_IDS= +# Google OAuth +#AUTH_GOOGLE_CLIENT_ID= +#AUTH_GOOGLE_CLIENT_SECRET= +# Enable login with Google +#AUTH_GOOGLE_ENABLED=true +# Twitter Admin IDs (comma-separated) +#AUTH_TWITTER_ADMIN_IDS=386584531353862154 +# Twitter OAuth2 Consumer Key and Consumer Secret +#AUTH_TWITTER_CONSUMER_KEY= +#AUTH_TWITTER_CONSUMER_SECRET= +# Enable login with Twitter +#AUTH_TWITTER_ENABLED=true +# Enable login with password +AUTH_PASSWORD_ENABLED=true +# Enable user registration +AUTH_REGISTER_ENABLED=true +# Solana accounts that get the Admin role (comma-separated) +AUTH_SOLANA_ADMIN_IDS= +# Enable login with Solana +AUTH_SOLANA_ENABLED=true +# Domains to allow cookies for (comma-separated) +COOKIE_DOMAINS=localhost,127.0.0.1 +# URL of the database to connect to +DATABASE_URL="postgresql://pubkey-link:pubkey-link@localhost:5432/pubkey-link?schema=public" +# Enable database provisioning +DATABASE_PROVISION=true +# Enable database reset on each startup +DATABASE_RESET=false +# Enable GraphQL Playground +GRAPHQL_PLAYGROUND=true +# JWT Secret (generate a random string with `openssl rand -hex 32`) +JWT_SECRET= +# Host to listen on +HOST=127.0.0.1 +# Port to listen on +PORT=3000 +# Session Secret (generate a random string with `openssl rand -hex 32`) +SESSION_SECRET= +# The URL of the Web UI, used to redirect to the Web UI after login. +# In a typical deployment, this is the same as the API_URL with the '/api' suffix removed (the default). +# This means you will probably only need to set this if you are running a local development setup. +WEB_URL=http://localhost:4200 diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..728fa507 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +node_modules +libs/sdk/src/generated/* +tmp diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..c294671f --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,55 @@ +{ + "root": true, + "ignorePatterns": ["**/*"], + "plugins": ["@nx"], + "overrides": [ + // Opinionated defaults, feel free to change in your own projects + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": { + // Only allow function declarations and not const fn = () => {} + "func-style": ["error", "declaration"] + } + }, + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": { + "@nx/enforce-module-boundaries": [ + "error", + { + "enforceBuildableLibDependency": true, + "allow": [], + "depConstraints": [ + { + "sourceTag": "*", + "onlyDependOnLibsWithTags": ["*"] + } + ] + } + ] + } + }, + { + "files": ["*.ts", "*.tsx"], + "extends": ["plugin:@nx/typescript"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "extends": ["plugin:@nx/javascript"], + "rules": {} + }, + { + "files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"], + "env": { + "jest": true + }, + "rules": {} + }, + { + "files": "*.json", + "parser": "jsonc-eslint-parser", + "rules": {} + } + ] +} diff --git a/.github/workflows/build-publish-docker.yml b/.github/workflows/build-publish-docker.yml new file mode 100644 index 00000000..51364471 --- /dev/null +++ b/.github/workflows/build-publish-docker.yml @@ -0,0 +1,64 @@ +name: Docker Build and Publish + +on: + push: + branches: + - dev + - main + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker (dev) + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + if: github.ref == 'refs/heads/dev' + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev + labels: ${{ steps.meta.outputs.labels }} + - name: Build and push Docker (main) + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + if: github.ref == 'refs/heads/main' + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + labels: ${{ steps.meta.outputs.labels }} + - name: Build and push Docker (Manual) + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + if: github.event_name == 'workflow_dispatch' + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..a91306c9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +env: + API_URL: http://localhost:3000/api + DATABASE_URL: postgresql://pubkey-link:pubkey-link@localhost:5432/pubkey-link?schema=public + DATABASE_PROVISION: true + DATABASE_RESET: true + PORT: 3000 + +jobs: + main: + name: Nx Cloud - Main Job + uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.13.0 + with: + node-version: 20.10.0 + main-branch-name: main + number-of-agents: 3 + init-commands: | + pnpm prisma generate + pnpm nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3 + parallel-commands: | + pnpm nx-cloud record -- pnpm nx format:check + parallel-commands-on-agents: | + pnpm nx affected --target=lint --parallel=3 + pnpm nx affected --target=test --parallel=3 --ci --code-coverage --exclude anchor + pnpm nx affected --target=build --parallel=3 + + agents: + name: Nx Cloud - Agents + uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.13.0 + with: + node-version: 20.10.0 + number-of-agents: 3 + install-commands: | + pnpm install --frozen-lockfile + pnpm prisma generate diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 00000000..c52af619 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,54 @@ +name: E2E + +on: + push: + branches: + - main + pull_request: + +env: + API_URL: http://localhost:3000/api + DATABASE_URL: postgresql://pubkey-link:pubkey-link@localhost:5432/pubkey-link?schema=public + DATABASE_PROVISION: true + DATABASE_RESET: true + HOST: 127.0.0.1 + JWT_SECRET: 1dfe5003518560c6362eab48f8220edf8708bbc67efbd4ed8cdf621965e938ee + PORT: 3000 + SESSION_SECRET: 1dfe5003518560c6362eab48f8220edf8708bbc67efbd4ed8cdf621965e938ee + +jobs: + main-e2e: + runs-on: ubuntu-22.04 + services: + postgres: + image: postgres:15-alpine + env: + POSTGRES_USER: pubkey-link + POSTGRES_PASSWORD: pubkey-link + POSTGRES_DB: pubkey-link + ports: ['5432:5432'] + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + redis: + image: redis:7-alpine + ports: ['6379:6379'] + options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 + steps: + - uses: pnpm/action-setup@v2 + with: + version: 8 + - uses: actions/checkout@v3 + name: Checkout [main] + with: + fetch-depth: 0 + - uses: actions/cache@v3 + with: + path: '**/node_modules' + key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} + - uses: actions/setup-node@v3 + with: + node-version: '18' + - run: pnpm install --frozen-lockfile --prefer-frozen-lockfile + - run: pnpm prisma generate + - run: pnpm prisma db push --skip-generate + - run: pnpm nx run-many --target=build --all --parallel --skip-nx-cache --verbose + - run: pnpm nx e2e api-e2e --skip-nx-cache --verbose diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..369e719a --- /dev/null +++ b/.gitignore @@ -0,0 +1,46 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +dist +tmp +/out-tsc +# dependencies +node_modules +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/typings +.env +# System Files +.DS_Store +Thumbs.db +.nx/cache +.anchor +libs/anchor/target/deploy +libs/anchor/target/debug +libs/anchor/target/release +libs/anchor/target/sbf-solana-solana +libs/anchor/target/.rustc_info.json +!libs/anchor/target/idl/*.json +!libs/anchor/target/types/*.ts +test-ledger +.yarn \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..fab6428a --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +pnpm lint-staged diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 00000000..bb522380 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +pnpm nx format:check diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..19be10eb --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +strict-peer-dependencies=false +auto-install-peers=true diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..0227505a --- /dev/null +++ b/.prettierignore @@ -0,0 +1,13 @@ +# Add files here to ignore them from prettier formatting + +/dist +/coverage +tmp +/.nx/cache +pnpm-lock.yaml +.anchor +target +node_modules +dist +build +test-ledger \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..f8fb56b0 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "singleQuote": true, + "printWidth": 120, + "semi": false, + "trailingComma": "all", + "arrowParens": "always" +} diff --git a/.run/dev_api.run.xml b/.run/dev_api.run.xml new file mode 100644 index 00000000..43a28b93 --- /dev/null +++ b/.run/dev_api.run.xml @@ -0,0 +1,12 @@ + + + + + +