From 1014c8508e88cc131ed30e911fbc47cb31f33a4e Mon Sep 17 00:00:00 2001 From: pranalidhanavade Date: Thu, 6 Mar 2025 13:52:16 +0530 Subject: [PATCH 01/15] added compass.yml file Signed-off-by: pranalidhanavade --- compass.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 compass.yml diff --git a/compass.yml b/compass.yml new file mode 100644 index 000000000..6023464c7 --- /dev/null +++ b/compass.yml @@ -0,0 +1,36 @@ +name: platform +id: ari:cloud:compass:6095931c-8137-4ae1-822a-2d7411835fc7:component/9029b47a-062e-4e25-a761-a2c0fc9ebd98/2317fb9a-d40a-4b4b-b5f7-17fa53b0a8be +description: Open source, Open standards based Decentralised Identity & Verifiable Credentials Platform +configVersion: 1 +typeId: SERVICE +ownerId: ari:cloud:identity::team/6fe50e36-8efb-47a6-aab5-ea47bd10ec4e +fields: + tier: 4 +links: + - name: null + type: REPOSITORY + url: https://github.com/credebl/platform +relationships: + DEPENDS_ON: [] +labels: + - decentralized-identity + - digital-identity + - digital-public-goods + - digital-public-infrastructure + - digital-travel-credential + - digital-trust-ecosystems + - digitaltrust + - dpg + - dpi + - foundational-identity + - language:typescript + - national-identity + - privacy-preserving-technologies + - public-good + - public-goods + - self-sovereign-identity + - source:github + - verifiable-credentials + - w3c-did + - w3c-vc +customFields: null From e4f076ebfc24c9b3e4ef702d4c624e2906ddca2b Mon Sep 17 00:00:00 2001 From: Ajay Jadhav Date: Fri, 7 Mar 2025 19:55:35 +0530 Subject: [PATCH 02/15] merge: Qa to main (#1134) * added compass.yml file Signed-off-by: pranalidhanavade * feat: update schema details and add alias in schema table (#1129) * API for update schema details Signed-off-by: pallavighule * refactored query Signed-off-by: pallavighule * chore: added alias in response Signed-off-by: bhavanakarwade --------- Signed-off-by: pallavighule Signed-off-by: bhavanakarwade Co-authored-by: bhavanakarwade --------- Signed-off-by: pranalidhanavade Signed-off-by: pallavighule Signed-off-by: bhavanakarwade Co-authored-by: pranalidhanavade Co-authored-by: pallavighule Co-authored-by: bhavanakarwade --- .../api-gateway/src/dtos/create-schema.dto.ts | 7 ++ .../src/schema/dtos/update-schema-dto.ts | 23 ++++++ .../src/schema/schema.controller.ts | 29 ++++++- apps/api-gateway/src/schema/schema.service.ts | 8 ++ .../interfaces/schema-payload.interface.ts | 1 + .../src/schema/interfaces/schema.interface.ts | 12 +++ .../schema/repositories/schema.repository.ts | 75 ++++++++++++------- apps/ledger/src/schema/schema.controller.ts | 7 ++ apps/ledger/src/schema/schema.service.ts | 32 ++++++-- libs/common/src/response-messages/index.ts | 3 +- .../migration.sql | 2 + libs/prisma-service/prisma/schema.prisma | 1 + 12 files changed, 163 insertions(+), 37 deletions(-) create mode 100644 apps/api-gateway/src/schema/dtos/update-schema-dto.ts create mode 100644 libs/prisma-service/prisma/migrations/20250305061413_add_column_alias_in_schema_table/migration.sql diff --git a/apps/api-gateway/src/dtos/create-schema.dto.ts b/apps/api-gateway/src/dtos/create-schema.dto.ts index 61f45e2b3..c74cc2e44 100644 --- a/apps/api-gateway/src/dtos/create-schema.dto.ts +++ b/apps/api-gateway/src/dtos/create-schema.dto.ts @@ -159,6 +159,13 @@ export class GenericSchemaDTO { @IsNotEmpty({ message: 'Type is required' }) type: SchemaTypeEnum; + @ApiPropertyOptional() + @Transform(({ value }) => trim(value)) + @IsOptional() + @IsString({ message: 'alias must be a string' }) + @IsNotEmpty({ message: 'alias is required' }) + alias: string; + @ApiProperty({ type: Object, oneOf: [ diff --git a/apps/api-gateway/src/schema/dtos/update-schema-dto.ts b/apps/api-gateway/src/schema/dtos/update-schema-dto.ts new file mode 100644 index 000000000..80fe4f876 --- /dev/null +++ b/apps/api-gateway/src/schema/dtos/update-schema-dto.ts @@ -0,0 +1,23 @@ +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; +import { Transform } from 'class-transformer'; +import { IsNotEmpty, IsOptional, IsString, IsUUID } from 'class-validator'; + +export class UpdateSchemaDto { + @ApiProperty() + @Transform(({ value }) => value?.trim()) + @IsNotEmpty({ message: 'Alias is required.' }) + @IsString({ message: 'Alias must be in string format.' }) + alias: string; + + @ApiProperty() + @Transform(({ value }) => value?.trim()) + @IsNotEmpty({ message: 'schemaLedgerId is required.' }) + @IsString({ message: 'schemaLedgerId must be in string format.' }) + schemaLedgerId: string; + + @ApiPropertyOptional() + @IsOptional() + @Transform(({ value }) => value?.trim()) + @IsUUID('4') + orgId?: string; +} diff --git a/apps/api-gateway/src/schema/schema.controller.ts b/apps/api-gateway/src/schema/schema.controller.ts index b1c172a1d..93682107f 100644 --- a/apps/api-gateway/src/schema/schema.controller.ts +++ b/apps/api-gateway/src/schema/schema.controller.ts @@ -1,7 +1,7 @@ -import { Controller, Logger, Post, Body, HttpStatus, UseGuards, Get, Query, BadRequestException, Res, UseFilters, Param, ParseUUIDPipe } from '@nestjs/common'; +import { Controller, Logger, Post, Body, HttpStatus, UseGuards, Get, Query, BadRequestException, Res, UseFilters, Param, ParseUUIDPipe, Put } from '@nestjs/common'; /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable camelcase */ -import { ApiOperation, ApiResponse, ApiTags, ApiBearerAuth, ApiForbiddenResponse, ApiUnauthorizedResponse, ApiQuery, ApiExtraModels, ApiBody, getSchemaPath } from '@nestjs/swagger'; +import { ApiOperation, ApiResponse, ApiTags, ApiBearerAuth, ApiForbiddenResponse, ApiUnauthorizedResponse, ApiQuery, ApiExcludeEndpoint } from '@nestjs/swagger'; import { SchemaService } from './schema.service'; import { AuthGuard } from '@nestjs/passport'; import { ApiResponseDto } from '../dtos/apiResponse.dto'; @@ -21,6 +21,7 @@ import { GenericSchemaDTO } from '../dtos/create-schema.dto'; import { CustomExceptionFilter } from 'apps/api-gateway/common/exception-handler'; import { CredDefSortFields, SortFields } from '@credebl/enum/enum'; import { TrimStringParamPipe } from '@credebl/common/cast.helper'; +import { UpdateSchemaDto } from './dtos/update-schema-dto'; @UseFilters(CustomExceptionFilter) @Controller('orgs') @@ -186,4 +187,28 @@ export class SchemaController { }; return res.status(HttpStatus.CREATED).json(finalResponse); } + + /** + * Update an schema alias + * @param updateSchemaDto The details of the schema to be updated + * @returns Success message + */ + @Put('/schema') + @ApiOperation({ summary: 'Update schema', description: 'Update the details of the schema' }) + @ApiResponse({ status: HttpStatus.OK, description: 'Success', type: ApiResponseDto }) + @ApiExcludeEndpoint() + @ApiBearerAuth() + @Roles(OrgRoles.OWNER, OrgRoles.ADMIN) + @UseGuards(AuthGuard('jwt')) + async updateSchema(@Body() updateSchemaDto: UpdateSchemaDto, @Res() res: Response): Promise { + + await this.appService.updateSchema(updateSchemaDto); + + const finalResponse: IResponse = { + statusCode: HttpStatus.OK, + message: ResponseMessages.schema.success.update + }; + return res.status(HttpStatus.OK).json(finalResponse); + } + } diff --git a/apps/api-gateway/src/schema/schema.service.ts b/apps/api-gateway/src/schema/schema.service.ts index 2360dea2e..bb328e5dc 100644 --- a/apps/api-gateway/src/schema/schema.service.ts +++ b/apps/api-gateway/src/schema/schema.service.ts @@ -8,6 +8,9 @@ import { ICredDefWithPagination, ISchemaData, ISchemasWithPagination } from '@cr import { GetCredentialDefinitionBySchemaIdDto } from './dtos/get-all-schema.dto'; import { NATSClient } from '@credebl/common/NATSClient'; +import { UpdateSchemaResponse } from 'apps/ledger/src/schema/interfaces/schema.interface'; +import { UpdateSchemaDto } from './dtos/update-schema-dto'; + @Injectable() export class SchemaService extends BaseService { @@ -36,4 +39,9 @@ export class SchemaService extends BaseService { const payload = { schemaSearchCriteria, user }; return this.natsClient.sendNatsMessage(this.schemaServiceProxy, 'get-cred-def-list-by-schemas-id', payload); } + + updateSchema(schemaDetails: UpdateSchemaDto): Promise { + const payload = { schemaDetails }; + return this.natsClient.sendNatsMessage(this.schemaServiceProxy, 'update-schema', payload); + } } \ No newline at end of file diff --git a/apps/ledger/src/schema/interfaces/schema-payload.interface.ts b/apps/ledger/src/schema/interfaces/schema-payload.interface.ts index c988c20c3..02bf74de3 100644 --- a/apps/ledger/src/schema/interfaces/schema-payload.interface.ts +++ b/apps/ledger/src/schema/interfaces/schema-payload.interface.ts @@ -18,6 +18,7 @@ export interface ISchema { endorserWriteTxn?: string; orgDid?: string; type?: string; + alias?: string; } export interface IAttributeValue { diff --git a/apps/ledger/src/schema/interfaces/schema.interface.ts b/apps/ledger/src/schema/interfaces/schema.interface.ts index 36bbb5d9f..cf85b4c70 100644 --- a/apps/ledger/src/schema/interfaces/schema.interface.ts +++ b/apps/ledger/src/schema/interfaces/schema.interface.ts @@ -94,6 +94,7 @@ export interface ICreateW3CSchema { schemaType: JSONSchemaType; } export interface IGenericSchema { + alias:string; type: SchemaTypeEnum; schemaPayload: ICreateSchema | ICreateW3CSchema; } @@ -123,4 +124,15 @@ export interface ISchemasResult { export interface ISchemasList { schemasCount: number; schemasResult: ISchemasResult[]; +} + + +export interface IUpdateSchema { + alias: string; + schemaLedgerId: string; + orgId?: string; +} + +export interface UpdateSchemaResponse { + count: number; } \ No newline at end of file diff --git a/apps/ledger/src/schema/repositories/schema.repository.ts b/apps/ledger/src/schema/repositories/schema.repository.ts index 78b1f97e0..381eef7bd 100644 --- a/apps/ledger/src/schema/repositories/schema.repository.ts +++ b/apps/ledger/src/schema/repositories/schema.repository.ts @@ -4,7 +4,7 @@ import { PrismaService } from '@credebl/prisma-service'; import { ledgers, org_agents, org_agents_type, organisation, Prisma, schema } from '@prisma/client'; import { ISchema, ISchemaExist, ISchemaSearchCriteria, ISaveSchema } from '../interfaces/schema-payload.interface'; import { ResponseMessages } from '@credebl/common/response-messages'; -import { AgentDetails, ISchemasWithCount } from '../interfaces/schema.interface'; +import { AgentDetails, ISchemasWithCount, IUpdateSchema, UpdateSchemaResponse } from '../interfaces/schema.interface'; import { SchemaType, SortValue } from '@credebl/enum/enum'; import { ICredDefWithCount, IPlatformSchemas } from '@credebl/common/interfaces/schema.interface'; import { ISchemaId } from '../schema.interface'; @@ -38,7 +38,8 @@ export class SchemaRepository { orgId: schemaResult.orgId, ledgerId: schemaResult.ledgerId, type: schemaResult.type, - isSchemaArchived: false + isSchemaArchived: false, + alias: schemaResult.alias } }); return saveResult; @@ -119,8 +120,9 @@ export class SchemaRepository { publisherDid: true, orgId: true, issuerId: true, + alias: true, organisation: { - select:{ + select: { name: true, userOrgRoles: { select: { @@ -299,11 +301,11 @@ export class SchemaRepository { try { const { ledgerId, schemaType, searchByText, sortField, sortBy, pageSize, pageNumber } = payload; let schemaResult; - /** - * This is made so because the default pageNumber is set to 1 in DTO, + /** + * This is made so because the default pageNumber is set to 1 in DTO, * If there is any 'searchByText' field, we ignore the pageNumbers and search * in all available records. - * + * * Because in that case pageNumber would be insignificant. */ if (searchByText) { @@ -316,7 +318,8 @@ export class SchemaRepository { { name: { contains: searchByText, mode: 'insensitive' } }, { version: { contains: searchByText, mode: 'insensitive' } }, { schemaLedgerId: { contains: searchByText, mode: 'insensitive' } }, - { issuerId: { contains: searchByText, mode: 'insensitive' } } + { issuerId: { contains: searchByText, mode: 'insensitive' } }, + { alias: { contains: searchByText, mode: 'insensitive' } } ] }, select: { @@ -328,9 +331,10 @@ export class SchemaRepository { isSchemaArchived: true, createdBy: true, publisherDid: true, - orgId: true, // This field can be null + orgId: true, // This field can be null issuerId: true, - type: true + type: true, + alias: true }, orderBy: { [sortField]: SortValue.DESC === sortBy ? SortValue.DESC : SortValue.ASC @@ -356,9 +360,10 @@ export class SchemaRepository { isSchemaArchived: true, createdBy: true, publisherDid: true, - orgId: true, // This field can be null + orgId: true, // This field can be null issuerId: true, - type: true + type: true, + alias: true }, orderBy: { [sortField]: SortValue.DESC === sortBy ? SortValue.DESC : SortValue.ASC @@ -376,7 +381,7 @@ export class SchemaRepository { }); // Handle null orgId in the response - const schemasWithDefaultOrgId = schemaResult.map(schema => ({ + const schemasWithDefaultOrgId = schemaResult.map((schema) => ({ ...schema, orgId: schema.orgId || null // Replace null orgId with 'N/A' or any default value })); @@ -429,21 +434,23 @@ export class SchemaRepository { } } - async schemaExist(payload: ISchemaExist): Promise<{ - id: string; - createDateTime: Date; - createdBy: string; - lastChangedDateTime: Date; - lastChangedBy: string; - name: string; - version: string; - attributes: string; - schemaLedgerId: string; - publisherDid: string; - issuerId: string; - orgId: string; - ledgerId: string; - }[]> { + async schemaExist(payload: ISchemaExist): Promise< + { + id: string; + createDateTime: Date; + createdBy: string; + lastChangedDateTime: Date; + lastChangedBy: string; + name: string; + version: string; + attributes: string; + schemaLedgerId: string; + publisherDid: string; + issuerId: string; + orgId: string; + ledgerId: string; + }[] + > { try { return this.prisma.schema.findMany({ where: { @@ -456,4 +463,18 @@ export class SchemaRepository { throw error; } } + + async updateSchema(schemaDetails: IUpdateSchema): Promise { + const { alias, schemaLedgerId, orgId } = schemaDetails; + + try { + return await this.prisma.schema.updateMany({ + where: orgId ? { schemaLedgerId, orgId } : { schemaLedgerId }, + data: { alias } + }); + } catch (error) { + this.logger.error(`Error in updating schema details: ${error}`); + throw error; + } + } } \ No newline at end of file diff --git a/apps/ledger/src/schema/schema.controller.ts b/apps/ledger/src/schema/schema.controller.ts index a423b8d22..45d36462c 100644 --- a/apps/ledger/src/schema/schema.controller.ts +++ b/apps/ledger/src/schema/schema.controller.ts @@ -17,6 +17,8 @@ import { } from '@credebl/common/interfaces/schema.interface'; import { IschemaPayload } from './interfaces/schema.interface'; import { ISchemaId } from './schema.interface'; +import { UpdateSchemaDto } from 'apps/api-gateway/src/schema/dtos/update-schema-dto'; + @Controller('schema') export class SchemaController { @@ -96,4 +98,9 @@ export class SchemaController { async getSchemaRecordBySchemaId(payload: {schemaId: string}): Promise { return this.schemaService.getSchemaBySchemaId(payload.schemaId); } + +@MessagePattern({ cmd: 'update-schema' }) + updateSchema(payload:{schemaDetails:UpdateSchemaDto}): Promise { + return this.schemaService.updateSchema(payload.schemaDetails); + } } \ No newline at end of file diff --git a/apps/ledger/src/schema/schema.service.ts b/apps/ledger/src/schema/schema.service.ts index e747db035..47f8708d3 100644 --- a/apps/ledger/src/schema/schema.service.ts +++ b/apps/ledger/src/schema/schema.service.ts @@ -12,7 +12,7 @@ import { SchemaRepository } from './repositories/schema.repository'; import { Prisma, schema } from '@prisma/client'; import { ISaveSchema, ISchema, ISchemaCredDeffSearchInterface, ISchemaExist, ISchemaSearchCriteria, W3CCreateSchema } from './interfaces/schema-payload.interface'; import { ResponseMessages } from '@credebl/common/response-messages'; -import { ICreateSchema, ICreateW3CSchema, IGenericSchema, IUserRequestInterface } from './interfaces/schema.interface'; +import { ICreateSchema, ICreateW3CSchema, IGenericSchema, IUpdateSchema, IUserRequestInterface, UpdateSchemaResponse } from './interfaces/schema.interface'; import { CreateSchemaAgentRedirection, GetSchemaAgentRedirection, ISchemaId } from './schema.interface'; import { map } from 'rxjs/operators'; import { JSONSchemaType, LedgerLessConstant, LedgerLessMethods, OrgAgentType, SchemaType, SchemaTypeEnum } from '@credebl/enum/enum'; @@ -48,7 +48,7 @@ export class SchemaService extends BaseService { const userId = user.id; try { - const {schemaPayload, type} = schemaDetails; + const {schemaPayload, type, alias} = schemaDetails; if (type === SchemaTypeEnum.INDY) { @@ -247,7 +247,7 @@ export class SchemaService extends BaseService { } } else if (type === SchemaTypeEnum.JSON) { const josnSchemaDetails = schemaPayload as unknown as ICreateW3CSchema; - const createW3CSchema = await this.createW3CSchema(orgId, josnSchemaDetails, user.id); + const createW3CSchema = await this.createW3CSchema(orgId, josnSchemaDetails, user.id, alias); return createW3CSchema; } } catch (error) { @@ -259,7 +259,7 @@ export class SchemaService extends BaseService { } } - async createW3CSchema(orgId:string, schemaPayload: ICreateW3CSchema, user: string): Promise { + async createW3CSchema(orgId:string, schemaPayload: ICreateW3CSchema, user: string, alias: string): Promise { try { let createSchema; @@ -325,7 +325,7 @@ export class SchemaService extends BaseService { createSchema.schemaUrl = `${process.env.SCHEMA_FILE_SERVER_URL}${createSchemaPayload.data.schemaId}`; } - const storeW3CSchema = await this.storeW3CSchemas(createSchema, user, orgId, attributes); + const storeW3CSchema = await this.storeW3CSchemas(createSchema, user, orgId, attributes, alias); if (!storeW3CSchema) { throw new BadRequestException(ResponseMessages.schema.error.storeW3CSchema, { @@ -524,7 +524,7 @@ export class SchemaService extends BaseService { return W3CSchema; } - private async storeW3CSchemas(schemaDetails, user, orgId, attributes): Promise { + private async storeW3CSchemas(schemaDetails, user, orgId, attributes, alias): Promise { let ledgerDetails; const schemaServerUrl = `${process.env.SCHEMA_FILE_SERVER_URL}${schemaDetails.schemaId}`; const schemaRequest = await this.commonService @@ -563,7 +563,8 @@ export class SchemaService extends BaseService { publisherDid: schemaDetails.did, orgId, ledgerId: ledgerDetails.id, - type: SchemaType.W3C_Schema + type: SchemaType.W3C_Schema, + alias }; const saveResponse = await this.schemaRepository.saveSchema( storeSchemaDetails @@ -928,4 +929,21 @@ export class SchemaService extends BaseService { throw new RpcException(error.response ? error.response : error); } } + + + async updateSchema(schemaDetails:IUpdateSchema): Promise { + try { + const schemaSearchResult = await this.schemaRepository.updateSchema(schemaDetails); + + if (0 === schemaSearchResult?.count) { + throw new NotFoundException('Records with given condition not found'); + } + + return schemaSearchResult; + } catch (error) { + this.logger.error(`Error in updateSchema: ${error}`); + throw new RpcException(error.response ? error.response : error); + } + } + } \ No newline at end of file diff --git a/libs/common/src/response-messages/index.ts b/libs/common/src/response-messages/index.ts index 834e4dc2e..320ba8c6b 100644 --- a/libs/common/src/response-messages/index.ts +++ b/libs/common/src/response-messages/index.ts @@ -148,7 +148,8 @@ export const ResponseMessages = { schema: { success: { fetch: 'Schema retrieved successfully.', - create: 'Schema created successfully.' + create: 'Schema created successfully.', + update:'Schema updated successfully' }, error: { invalidSchemaId: 'Please provide valid schema Id', diff --git a/libs/prisma-service/prisma/migrations/20250305061413_add_column_alias_in_schema_table/migration.sql b/libs/prisma-service/prisma/migrations/20250305061413_add_column_alias_in_schema_table/migration.sql new file mode 100644 index 000000000..e0db73c11 --- /dev/null +++ b/libs/prisma-service/prisma/migrations/20250305061413_add_column_alias_in_schema_table/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "schema" ADD COLUMN "alias" TEXT; diff --git a/libs/prisma-service/prisma/schema.prisma b/libs/prisma-service/prisma/schema.prisma index ddde8f19d..f5c842b4a 100644 --- a/libs/prisma-service/prisma/schema.prisma +++ b/libs/prisma-service/prisma/schema.prisma @@ -269,6 +269,7 @@ model schema { type String? @db.VarChar isSchemaArchived Boolean @default(false) credential_definition credential_definition[] + alias String? } model credential_definition { From 5f88f7750bc4de02e135b476becd70243e3b8030 Mon Sep 17 00:00:00 2001 From: bhavanakarwade Date: Thu, 13 Mar 2025 17:37:56 +0530 Subject: [PATCH 03/15] fix: platform agent spin p issue (#1137) Signed-off-by: bhavanakarwade --- libs/common/src/NATSClient.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/common/src/NATSClient.ts b/libs/common/src/NATSClient.ts index c4e0074f5..7d3243283 100644 --- a/libs/common/src/NATSClient.ts +++ b/libs/common/src/NATSClient.ts @@ -6,6 +6,7 @@ import { map } from 'rxjs/operators'; import * as nats from 'nats'; import { firstValueFrom } from 'rxjs'; import ContextStorageService, { ContextStorageServiceKey } from '@credebl/context/contextStorageService.interface'; +import { v4 } from 'uuid'; @Injectable() export class NATSClient { @@ -45,7 +46,13 @@ sendNatsMessage(serviceProxy: ClientProxy, cmd: string, payload: any): Promise(serviceProxy: ClientProxy, pattern: object, payload: any): Promise { - const headers = nats.headers(1, this.contextStorageService.getContextId()); + let contextId = this.contextStorageService.getContextId(); + + if (!contextId) { + contextId = v4(); + } + + const headers = nats.headers(1, contextId); const record = new NatsRecordBuilder(payload).setHeaders(headers).build(); const result = serviceProxy.send(pattern, record); From 57d6d5bf63c9f2468bada1170efa6b736185efe7 Mon Sep 17 00:00:00 2001 From: "sahil.kamble@ayanworks.com" Date: Thu, 27 Mar 2025 17:24:44 +0530 Subject: [PATCH 04/15] feat: created yml file for tag v2.0.0 Signed-off-by: sahil.kamble@ayanworks.com --- .github/workflows/cicd.yml | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/cicd.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 000000000..8087d8ba4 --- /dev/null +++ b/.github/workflows/cicd.yml @@ -0,0 +1,57 @@ +name: Continuous Delivery + +on: + push: + branches: + - feat/push-docker-image + +env: + REGISTRY: ghcr.io + TAG: v2.0.0 + +jobs: + build-and-push: + name: Push Docker image to GitHub + runs-on: ubuntu-latest + + strategy: + matrix: + service: + - agent-provisioning + - agent-service + - api-gateway + - cloud-wallet + - connection + - geolocation + - issuance + - ledger + - notification + - user + - utility + - verification + - webhook + + permissions: + contents: read + packages: write + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and Push Docker Image ${{ matrix.service }} + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfiles/Dockerfile.${{ matrix.service }} + push: true + tags: | + ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.service }}:${{ env.TAG }} + ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.service }}:latest \ No newline at end of file From 7ec2a8b7dc0e3a215baa1b7a11983ebc7b14b956 Mon Sep 17 00:00:00 2001 From: "sahil.kamble@ayanworks.com" Date: Thu, 27 Mar 2025 17:31:06 +0530 Subject: [PATCH 05/15] fix: updated Dockerfiles Signed-off-by: sahil.kamble@ayanworks.com --- Dockerfiles/Dockerfile.agent-provisioning | 5 +++-- Dockerfiles/Dockerfile.agent-service | 4 ++-- Dockerfiles/Dockerfile.api-gateway | 4 ++-- Dockerfiles/Dockerfile.cloud-wallet | 4 ++-- Dockerfiles/Dockerfile.connection | 4 ++-- Dockerfiles/Dockerfile.geolocation | 4 ++-- Dockerfiles/Dockerfile.issuance | 4 ++-- Dockerfiles/Dockerfile.ledger | 4 ++-- Dockerfiles/Dockerfile.notification | 4 ++-- Dockerfiles/Dockerfile.organization | 5 ++--- Dockerfiles/Dockerfile.user | 4 ++-- Dockerfiles/Dockerfile.utility | 4 ++-- Dockerfiles/Dockerfile.verification | 4 ++-- Dockerfiles/Dockerfile.webhook | 4 ++-- .../agent-provisioning/AFJ/scripts/{farget.sh => fargate.sh} | 0 15 files changed, 29 insertions(+), 29 deletions(-) rename apps/agent-provisioning/AFJ/scripts/{farget.sh => fargate.sh} (100%) diff --git a/Dockerfiles/Dockerfile.agent-provisioning b/Dockerfiles/Dockerfile.agent-provisioning index 5951001a7..4b827611b 100644 --- a/Dockerfiles/Dockerfile.agent-provisioning +++ b/Dockerfiles/Dockerfile.agent-provisioning @@ -29,7 +29,7 @@ COPY . . # Generate Prisma client # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate RUN ls -R /app/apps/agent-provisioning/AFJ/ # Build the user service @@ -68,6 +68,7 @@ COPY --from=build /app/apps/agent-provisioning/AFJ/port-file ./agent-provisionin RUN chmod +x /app/agent-provisioning/AFJ/scripts/start_agent.sh RUN chmod +x /app/agent-provisioning/AFJ/scripts/start_agent_ecs.sh RUN chmod +x /app/agent-provisioning/AFJ/scripts/docker_start_agent.sh +RUN chmod +x /app/agent-provisioning/AFJ/scripts/fargate.sh RUN chmod 777 /app/agent-provisioning/AFJ/endpoints RUN chmod 777 /app/agent-provisioning/AFJ/agent-config RUN chmod 777 /app/agent-provisioning/AFJ/token @@ -76,4 +77,4 @@ RUN chmod 777 /app/agent-provisioning/AFJ/token COPY libs/ ./libs/ # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/agent-provisioning/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-provisioning/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.agent-service b/Dockerfiles/Dockerfile.agent-service index f83554594..3f7cb756f 100644 --- a/Dockerfiles/Dockerfile.agent-service +++ b/Dockerfiles/Dockerfile.agent-service @@ -24,7 +24,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the user service RUN pnpm run build agent-service @@ -53,4 +53,4 @@ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/agent-service/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/agent-service/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.api-gateway b/Dockerfiles/Dockerfile.api-gateway index 6861d18e3..27961f09d 100644 --- a/Dockerfiles/Dockerfile.api-gateway +++ b/Dockerfiles/Dockerfile.api-gateway @@ -18,7 +18,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the api-gateway service RUN pnpm run build api-gateway @@ -40,4 +40,4 @@ COPY --from=build /app/node_modules ./node_modules # COPY --from=build /app/uploadedFiles ./uploadedFiles # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/api-gateway/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/api-gateway/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.cloud-wallet b/Dockerfiles/Dockerfile.cloud-wallet index a56ff5ced..74b05bc05 100644 --- a/Dockerfiles/Dockerfile.cloud-wallet +++ b/Dockerfiles/Dockerfile.cloud-wallet @@ -19,7 +19,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the user service RUN pnpm run build cloud-wallet @@ -43,4 +43,4 @@ COPY --from=build /app/node_modules ./node_modules # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/cloud-wallet/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/cloud-wallet/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.connection b/Dockerfiles/Dockerfile.connection index eee76c2bc..db7be9914 100644 --- a/Dockerfiles/Dockerfile.connection +++ b/Dockerfiles/Dockerfile.connection @@ -18,7 +18,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the connection service RUN pnpm run build connection @@ -43,4 +43,4 @@ COPY --from=build /app/node_modules ./node_modules #RUN npm i --only=production # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/connection/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/connection/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.geolocation b/Dockerfiles/Dockerfile.geolocation index a166b0138..45d92e8f8 100644 --- a/Dockerfiles/Dockerfile.geolocation +++ b/Dockerfiles/Dockerfile.geolocation @@ -18,7 +18,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the connection service RUN pnpm run build geo-location @@ -43,4 +43,4 @@ COPY --from=build /app/node_modules ./node_modules #RUN npm i --only=production # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/geo-location/main.js"] \ No newline at end of file +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/geo-location/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.issuance b/Dockerfiles/Dockerfile.issuance index 24ccaab8f..5ebc2500b 100644 --- a/Dockerfiles/Dockerfile.issuance +++ b/Dockerfiles/Dockerfile.issuance @@ -18,7 +18,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the issuance service RUN pnpm run build issuance @@ -42,4 +42,4 @@ COPY --from=build /app/node_modules ./node_modules # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/issuance/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/issuance/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ledger b/Dockerfiles/Dockerfile.ledger index 4b45e300d..1ea6b1047 100644 --- a/Dockerfiles/Dockerfile.ledger +++ b/Dockerfiles/Dockerfile.ledger @@ -18,7 +18,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the ledger service RUN npm run build ledger @@ -41,4 +41,4 @@ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/ledger/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/ledger/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.notification b/Dockerfiles/Dockerfile.notification index 73e3a4202..ded27f10f 100644 --- a/Dockerfiles/Dockerfile.notification +++ b/Dockerfiles/Dockerfile.notification @@ -16,7 +16,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the notification service RUN npm run build notification @@ -39,4 +39,4 @@ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/notification/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/notification/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.organization b/Dockerfiles/Dockerfile.organization index c84a0d87d..631604c88 100644 --- a/Dockerfiles/Dockerfile.organization +++ b/Dockerfiles/Dockerfile.organization @@ -17,8 +17,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate - +RUN cd libs/prisma-service && npx prisma generate # Build the organization service RUN pnpm run build organization @@ -41,4 +40,4 @@ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/organization/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/organization/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.user b/Dockerfiles/Dockerfile.user index 8261c3a54..74bf9f020 100644 --- a/Dockerfiles/Dockerfile.user +++ b/Dockerfiles/Dockerfile.user @@ -31,7 +31,7 @@ RUN pnpm install # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the user service RUN pnpm run build user @@ -66,4 +66,4 @@ COPY --from=build /app/node_modules ./node_modules # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/user/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/user/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.utility b/Dockerfiles/Dockerfile.utility index 59f0364a1..62daa6864 100644 --- a/Dockerfiles/Dockerfile.utility +++ b/Dockerfiles/Dockerfile.utility @@ -19,7 +19,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the user service RUN pnpm run build utility @@ -43,4 +43,4 @@ COPY --from=build /app/node_modules ./node_modules # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/utility/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/utility/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.verification b/Dockerfiles/Dockerfile.verification index 6d1cbbf6e..93c278a9d 100644 --- a/Dockerfiles/Dockerfile.verification +++ b/Dockerfiles/Dockerfile.verification @@ -17,7 +17,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the user service RUN npm run build verification @@ -39,4 +39,4 @@ COPY --from=build /app/libs/ ./libs/ COPY --from=build /app/node_modules ./node_modules # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/verification/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/verification/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.webhook b/Dockerfiles/Dockerfile.webhook index c984a12c1..aa398f3b8 100644 --- a/Dockerfiles/Dockerfile.webhook +++ b/Dockerfiles/Dockerfile.webhook @@ -18,7 +18,7 @@ RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . # RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate -RUN cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate +RUN cd libs/prisma-service && npx prisma generate # Build the webhook service RUN pnpm run build webhook @@ -42,4 +42,4 @@ COPY --from=build /app/node_modules ./node_modules # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && cd ../.. && node dist/apps/webhook/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/webhook/main.js"] \ No newline at end of file diff --git a/apps/agent-provisioning/AFJ/scripts/farget.sh b/apps/agent-provisioning/AFJ/scripts/fargate.sh similarity index 100% rename from apps/agent-provisioning/AFJ/scripts/farget.sh rename to apps/agent-provisioning/AFJ/scripts/fargate.sh From 97f54e157f6fb6f7ca3a89acdc0eb49059d90d22 Mon Sep 17 00:00:00 2001 From: "sahil.kamble@ayanworks.com" Date: Fri, 28 Mar 2025 14:06:00 +0530 Subject: [PATCH 06/15] fix: added organization service in yml file Signed-off-by: sahil.kamble@ayanworks.com --- .github/workflows/cicd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 8087d8ba4..8c0ef30b0 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -26,6 +26,7 @@ jobs: - issuance - ledger - notification + - organization - user - utility - verification From 05e05abe9c27bf4cbdb464757a64eb79cf047be8 Mon Sep 17 00:00:00 2001 From: "sahil.kamble@ayanworks.com" Date: Fri, 28 Mar 2025 16:25:23 +0530 Subject: [PATCH 07/15] feat: create yml file to push docker images Signed-off-by: sahil.kamble@ayanworks.com --- .../{cicd.yml => continuous-delivery.yml} | 10 +- docker-compose-dev.yml | 200 ++++++++++++++++++ docker-compose.yml | 104 +++++---- 3 files changed, 270 insertions(+), 44 deletions(-) rename .github/workflows/{cicd.yml => continuous-delivery.yml} (90%) create mode 100644 docker-compose-dev.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/continuous-delivery.yml similarity index 90% rename from .github/workflows/cicd.yml rename to .github/workflows/continuous-delivery.yml index 8c0ef30b0..282539bf9 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/continuous-delivery.yml @@ -2,12 +2,11 @@ name: Continuous Delivery on: push: - branches: - - feat/push-docker-image + tags: + - 'v*' env: REGISTRY: ghcr.io - TAG: v2.0.0 jobs: build-and-push: @@ -26,7 +25,6 @@ jobs: - issuance - ledger - notification - - organization - user - utility - verification @@ -40,6 +38,10 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 + - name: Extract Git Tag + id: get_tag + run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + - name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml new file mode 100644 index 000000000..66bcbbd61 --- /dev/null +++ b/docker-compose-dev.yml @@ -0,0 +1,200 @@ +version: '3' + +services: + nats: + container_name: nats + entrypoint: '/nats-server -c /nats-server.conf -DV' # Corrected the path to nats-server.conf + image: nats + ports: + - '4222:4222' + - '6222:6222' + - '8222:8222' + # volumes: + # - ./nats-server.conf:/nats-server.conf # Mount the config file + redis: + image: redis:6.2-alpine + restart: always + ports: + - '6379:6379' + command: redis-server --save 20 1 --loglevel warning + volumes: + - cache:/data + api-gateway: + depends_on: + - nats # Use depends_on instead of needs + - redis + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.api-gateway + ports: + - '5000:5000' + env_file: + - ./.env + user: + depends_on: + - nats # Use depends_on instead of needs + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.user + env_file: + - ./.env + utility: + depends_on: + - nats # Use depends_on instead of needs + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.utility + env_file: + - ./.env + connection: + depends_on: + - nats # Use depends_on instead of needs + - api-gateway + - utility + - user + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.connection + env_file: + - ./.env + issuance: + depends_on: + - nats # Use depends_on instead of needs + - redis + - api-gateway + - user + - connection + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.issuance + env_file: + - ./.env + ledger: + depends_on: + - nats # Use depends_on instead of needs + - api-gateway + - user + - connection + - issuance + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.ledger + env_file: + - ./.env + organization: + depends_on: + - nats # Use depends_on instead of needs + - api-gateway + - user + - connection + - issuance + - ledger + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.organization + env_file: + - ./.env + verification: + depends_on: + - nats # Use depends_on instead of needs + - api-gateway + - user + - connection + - issuance + - ledger + - organization + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.verification + env_file: + - ./.env + agent-provisioning: + depends_on: + - nats # Use depends_on instead of needs + - api-gateway + - user + - connection + - issuance + - ledger + - organization + - verification + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.agent-provisioning + args: + - ROOT_PATH=$PWD/apps/agent-provisioning/AFJ/agent-config + env_file: + - ./.env + environment: + - ROOT_PATH=$PWD/apps/agent-provisioning/AFJ/agent-config + volumes: + - $PWD/apps/agent-provisioning/AFJ/agent-config:/app/agent-provisioning/AFJ/agent-config + - /var/run/docker.sock:/var/run/docker.sock + - /app/agent-provisioning/AFJ/token:/app/agent-provisioning/AFJ/token + - $PWD/agent.env:/app/agent.env + agent-service: + depends_on: + - nats # Use depends_on instead of needs + - api-gateway + - user + - connection + - issuance + - ledger + - organization + - verification + - agent-provisioning + command: sh -c 'until (docker logs platform-agent-provisioning-1 | grep "Agent-Provisioning-Service Microservice is listening to NATS"); do sleep 1; done && node dist/apps/agent-service/main.js' + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.agent-service + env_file: + - ./.env + volumes: + - /var/run/docker.sock:/var/run/docker.sock + volumes_from: + - agent-provisioning + cloud-wallet: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.cloud-wallet + env_file: + - ./.env + geolocation: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.geolocation + env_file: + - ./.env + notification: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.notification + env_file: + - ./.env + webhook: + depends_on: + - nats + - api-gateway + build: + context: ./ # Adjust the context path as needed + dockerfile: Dockerfiles/Dockerfile.webhook + env_file: + - ./.env + + + + +volumes: + cache: + driver: local \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 425e64cd5..7b5f9f172 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,9 +23,7 @@ services: depends_on: - nats # Use depends_on instead of needs - redis - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.api-gateway + image: ghcr.io/credebl/api-gateway:latest ports: - '5000:5000' env_file: @@ -34,18 +32,14 @@ services: depends_on: - nats # Use depends_on instead of needs - api-gateway - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.user + image: ghcr.io/credebl/user:latest env_file: - ./.env utility: depends_on: - nats # Use depends_on instead of needs - api-gateway - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.utility + image: ghcr.io/credebl/utility:latest env_file: - ./.env connection: @@ -54,9 +48,7 @@ services: - api-gateway - utility - user - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.connection + image: ghcr.io/credebl/connection:latest env_file: - ./.env issuance: @@ -65,9 +57,7 @@ services: - api-gateway - user - connection - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.issuance + image: ghcr.io/credebl/issuance:latest env_file: - ./.env ledger: @@ -77,9 +67,7 @@ services: - user - connection - issuance - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.ledger + image: ghcr.io/credebl/ledger:latest env_file: - ./.env organization: @@ -90,9 +78,7 @@ services: - connection - issuance - ledger - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.organization + image: ghcr.io/credebl/organization:latest env_file: - ./.env verification: @@ -104,9 +90,7 @@ services: - issuance - ledger - organization - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.verification + image: ghcr.io/credebl/verification:latest env_file: - ./.env agent-provisioning: @@ -119,11 +103,9 @@ services: - ledger - organization - verification - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.agent-provisioning - args: - - ROOT_PATH=$PWD/apps/agent-provisioning/AFJ/agent-config + image: ghcr.io/credebl/agent-provisioning:latest + # args: + # - ROOT_PATH=$PWD/apps/agent-provisioning/AFJ/agent-config env_file: - ./.env environment: @@ -145,9 +127,7 @@ services: - verification - agent-provisioning command: sh -c 'until (docker logs platform-agent-provisioning-1 | grep "Agent-Provisioning-Service Microservice is listening to NATS"); do sleep 1; done && node dist/apps/agent-service/main.js' - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.agent-service + image: ghcr.io/credebl/agent-service:latest env_file: - ./.env volumes: @@ -166,16 +146,60 @@ services: - verification - agent-provisioning - agent-service - build: - context: ./ # Adjust the context path as needed - dockerfile: Dockerfiles/Dockerfile.cloud-wallet + image: ghcr.io/credebl/cloud-wallet:latest + env_file: + - ./.env + geolocation: + depends_on: + - nats + - api-gateway + - user + - connection + - issuance + - ledger + - organization + - verification + - agent-provisioning + - agent-service + - cloud-wallet + image: ghcr.io/credebl/geolocation:latest + env_file: + - ./.env + notification: + depends_on: + - nats + - api-gateway + - user + - connection + - issuance + - ledger + - organization + - verification + - agent-provisioning + - agent-service + - cloud-wallet + - geolocation + image: ghcr.io/credebl/notification:latest + env_file: + - ./.env + webhook: + depends_on: + - nats + - api-gateway + - user + - connection + - issuance + - ledger + - organization + - verification + - agent-provisioning + - agent-service + - cloud-wallet + - geolocation + - notification + image: ghcr.io/credebl/webhook:latest env_file: - ./.env - - - - - volumes: cache: From f699e5652ed92a1664527940568d276deb08fa72 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Wed, 16 Apr 2025 11:34:44 +0530 Subject: [PATCH 08/15] Create FEATURE-REQUEST.md (#1181) * Create FEATURE-REQUEST.md Create FEATURE-REQUEST.md Signed-off-by: Krishna Waske * Update bug_report.md Update bug_report.md Signed-off-by: Krishna Waske * Update FEATURE-REQUEST.md change links Signed-off-by: Krishna Waske * Update bug_report.md Signed-off-by: Krishna Waske --------- Signed-off-by: Krishna Waske --- .github/ISSUE_TEMPLATE/FEATURE-REQUEST.md | 44 +++++++++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 69 ++++++++++++++++------- 2 files changed, 92 insertions(+), 21 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/FEATURE-REQUEST.md diff --git a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md new file mode 100644 index 000000000..bb511c8f2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md @@ -0,0 +1,44 @@ +## โœ… Preliminary Checks + +- [ ] I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) to avoid duplicates. +- [ ] I'm willing to create a PR for this feature. (if applicable). + +--- + +## ๐Ÿงฉ Problem Statement + +_Is your feature request related to a problem? Please describe it clearly._ + +> Ex: I'm always frustrated when [...] + +--- + +## ๐Ÿ’ก Proposed Solution + +_A clear and concise description of what you want to happen._ + +> Ex: It would be great if [...] + +--- + +## ๐Ÿ”„ Alternatives Considered + +_Have you considered any alternative solutions or features?_ + +> Ex: I also thought about [...], but [...] + +--- + +## ๐Ÿ“Ž Additional Context + +_Add any other context, references, mockups, or screenshots here._ + +--- + +## โœ… Acceptance Criteria + +_List specific tasks or outcomes that define when this request is complete._ + +- A new endpoint `/v1/...` is added +- Docs updated +- Tests written and passing diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 08cd90e3e..726cdd0da 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,31 +1,58 @@ +## ๐Ÿงพ Preliminary Checks + +- [ ] I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) for duplicates. +- [ ] I'm willing to create a PR fixing this issue. (if applicable). + +--- + +## ๐Ÿž Bug Description + +_A clear and concise description of what the bug is._ + +When I try to [...], I get this unexpected behavior [...] + +--- + +## ๐Ÿงช Steps to Reproduce + +_Provide clear steps to reproduce the bug._ + +1. Go to '...' +2. Click on '...' +3. Scroll down to '...' +4. See error + --- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' + +## โœ… Expected Behavior + +_What did you expect to happen?_ --- -**Prerequisites** +## โŒ Actual Behavior -**Steps to Reproduce** +_What actually happened instead?_ -**Current behavior** +--- + +## ๐Ÿ“Œ Affected Version/Commit -**Expected behavior** +_Version number, branch name, or commit hash where the bug occurs._ -**Environment** +--- + +## ๐Ÿ’ป Environment + +_Where did the issue occur?_ + +- [ ] Local development +- [ ] Production +- [ ] CI/CD +- [ ] Other + +--- -**Desktop** - - OS: - - Browser: - - Browser Version: - - CREDEBL Version: - -**Smartphone** - - Device: - - OS: - - ADEYA version: +## ๐Ÿงพ Relevant Logs, Screenshots, or Stack Traces -**Screenshots or Screen recording** +_Paste any error messages or screenshots that can help diagnose the issue._ From 9890cddc56e26f500051045da32658381eed2b89 Mon Sep 17 00:00:00 2001 From: Manit Singh <79140607+NucleonGodX@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:54:23 +0530 Subject: [PATCH 09/15] fix readme typo (#1170) fix readme typo Signed-off-by: NucleonGodX --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index efebe8b60..71336eb02 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD= Date: Fri, 25 Apr 2025 09:54:52 +0300 Subject: [PATCH 10/15] fix: Update GET proof record endpoint to return 404 for non-existing records (#1190) Signed-off-by: Amr Mubarak --- apps/verification/src/verification.service.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/apps/verification/src/verification.service.ts b/apps/verification/src/verification.service.ts index 2c37aaad2..3d2c9a74b 100644 --- a/apps/verification/src/verification.service.ts +++ b/apps/verification/src/verification.service.ts @@ -187,17 +187,13 @@ export class VerificationService { return getProofPresentationById?.response; } catch (error) { this.logger.error(`[getProofPresentationById] - error in get proof presentation by proofId : ${JSON.stringify(error)}`); - const errorStack = error?.response?.error?.reason; + const errorMessage = error?.response?.error?.reason || error?.message; - if (errorStack) { - throw new RpcException({ - message: ResponseMessages.verification.error.proofNotFound, - statusCode: error?.response?.status, - error: errorStack - }); - } else { - throw new RpcException(error.response ? error.response : error); + if (errorMessage?.includes('not found')) { + throw new NotFoundException(errorMessage); } + + throw new RpcException(error.response ? error.response : error); } } From 91e5052be83d7b31d14646f25a9f7dfaf9623cee Mon Sep 17 00:00:00 2001 From: Sahil Kamble Date: Tue, 29 Apr 2025 16:30:35 +0530 Subject: [PATCH 11/15] chore: removed unwanted values (#1212) Signed-off-by: Sahil Kamble --- .env.demo | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.env.demo b/.env.demo index dcb223caf..f9130b987 100644 --- a/.env.demo +++ b/.env.demo @@ -86,22 +86,22 @@ DEEPLINK_DOMAIN='https://link.credebl.id?url=' ENABLE_CORS_IP_LIST=http://localhost:3000, http://localhost:3001, http://localhost:5000,http://localhost:8085,https://verify.credebl.id,https://verifyed.credebl.id,https://verify-api.credebl.id,https://qa.credebl.id,https://dev.credebl.id,https://credebl.id -USER_NKEY_SEED=SUAILBO6CYQF4RPIZYCVCFRIOMJ7BW33PFZDFEZKOHV65MN3W37FFJA3JY -API_GATEWAY_NKEY_SEED=SUAI7SDZAHS24I7JWOB77BK6EFE3ZS3NCF5FW22PMWCXGE56OBPYHK5734 -ORGANIZATION_NKEY_SEED=SUABORS4UFEV2OAWNEXB7JA76XNOF7A6YJAFOGRZTWOEGCXER36P2NP7JQ -AGENT_PROVISIONING_NKEY_SEED=SUAIUEPEC5D4KMTLK45UOPZ45JQ5QUMMIIJY2UT37RMQE6GENBTJTT2MSQ -AGENT_SERVICE_NKEY_SEED=SUABOFFEQNQY7YR4BIZDJENJ5T24CCDYOYTVHBKQLEWTZUTPTL3EQ3IZ3U -VERIFICATION_NKEY_SEED=SUAOTKYQMN6RGVWLZII22A4EFURAT65H4PGU3G5QXKM427HZ3JKIQZ7KU4 -LEDGER_NKEY_SEED=SUABKZWIZCMUROUKCSHL774UOLKFQZR2UPQXII5FCGXHF25GFQX2XLIPLI -ISSUANCE_NKEY_SEED=SUAG7GEESSHO2ZF4J2IUKB6QPF4ENTLO7MLXZSSF67MEETTFZWFGJNDYVU -CONNECTION_NKEY_SEED=SUALLWKCDN2KBB4YTZUNUUFP7ZNSI4PBXVK7X5FPNX6LQ3DCHFGYX4JPLQ -ECOSYSTEM_NKEY_SEED=SUAGUAGZZLT2LYEA3SRWFXCJL32MXR5GCBAZNYJLLIUH4O76GDEGQAYM74 -CREDENTAILDEFINITION_NKEY_SEED=SUAAYNLVKEP2E4JPCJ7OYSQ6OFCDBQ3GCTOPARBXBNP64JFESDWH7N3FQA -SCHEMA_NKEY_SEED=SUAESXIRPE4PBJR26T44XPPIAONQ3YJTN45VSTRNZUW77GAF5RBP3SEBFA -UTILITIES_NKEY_SEED=SUAHLF3PYEGNN3J2LZHHT6LOQ4GQ2CPGATEO66XRXLCEE6QYSM26TKCNUM -CLOUD_WALLET_NKEY_SEED=SUAJ3VT7IFZXVE7SSTX3JFE6F2U6DYDROW6VTCCGFVVB6D7O6C7OWJWTPM -GEOLOCATION_NKEY_SEED=SUAA3YQLMQPKEK224OVFGENQ3VRYD57LNPJFMGDULOO57CUYOQLAA7KBJU -NOTIFICATION_NKEY_SEED=SUAF5V6RN6HHOLBJX6UV7443PBNT7NSAJ6YCUOW7LTZQ77PXXAMH25AHPI +USER_NKEY_SEED= +API_GATEWAY_NKEY_SEED= +ORGANIZATION_NKEY_SEED= +AGENT_PROVISIONING_NKEY_SEED= +AGENT_SERVICE_NKEY_SEED= +VERIFICATION_NKEY_SEED= +LEDGER_NKEY_SEED= +ISSUANCE_NKEY_SEED= +CONNECTION_NKEY_SEED= +ECOSYSTEM_NKEY_SEED= +CREDENTAILDEFINITION_NKEY_SEED= +SCHEMA_NKEY_SEED= +UTILITIES_NKEY_SEED= +CLOUD_WALLET_NKEY_SEED= +GEOLOCATION_NKEY_SEED= +NOTIFICATION_NKEY_SEED= KEYCLOAK_DOMAIN=http://localhost:8080/ KEYCLOAK_ADMIN_URL=http://localhost:8080 @@ -144,5 +144,5 @@ APP=api #Schema-file-server APP_PORT=4000 -JWT_TOKEN_SECRET=c2e48ca31ac2a0b9af47f3a9f5a0809a858c296948c1326eb746bb7bc945a9d5 +JWT_TOKEN_SECRET= ISSUER=Credebl \ No newline at end of file From 698b74e5532909d73ec569e405bf9eec74df57b7 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Tue, 29 Apr 2025 18:46:35 +0530 Subject: [PATCH 12/15] fix: qa conflict fixes (#1214) * chore: Platform version upgrade (#1100) * chore: platform version upgrade Signed-off-by: pranalidhanavade * fix: docker file for cloud wallet Signed-off-by: pranalidhanavade --------- Signed-off-by: pranalidhanavade Signed-off-by: Krishna Waske * Add OpenSSL installation support for Docker image Signed-off-by: sahil.kamble@ayanworks.com Signed-off-by: Krishna Waske * Add OpenSSL installation support for Docker image Signed-off-by: sahil.kamble@ayanworks.com Signed-off-by: Krishna Waske * Add OpenSSL installation support for Docker image Signed-off-by: sahil.kamble@ayanworks.com Signed-off-by: Krishna Waske * fix: Changes in NATS interceptor for error handling (#1103) * fix: changes in nats intercepor for error handling Signed-off-by: pranalidhanavade * fix: Error handling for send proof request with identical attributes when one attribute uses predicates and the other does not Signed-off-by: pranalidhanavade * fix: Resolve comments on PR Signed-off-by: pranalidhanavade * fix: added comments in service Signed-off-by: pranalidhanavade * fix: added comments in service Signed-off-by: pranalidhanavade --------- Signed-off-by: pranalidhanavade Signed-off-by: Krishna Waske * error handling in NATS interceptor (#1106) Signed-off-by: pranalidhanavade Signed-off-by: Krishna Waske * fix: exception handling for common handler (#1108) * fix: exception handling Signed-off-by: pranalidhanavade * refactor: NATS interceptor Signed-off-by: pranalidhanavade * refactor: exception handler component changes Signed-off-by: pranalidhanavade --------- Signed-off-by: pranalidhanavade Signed-off-by: Krishna Waske * feat: add array data type in schema payload (#1110) * fix:added array data type in schema payload Signed-off-by: pallavicoder * fix:added nested attributes in schema paylaod Signed-off-by: pallavicoder * feat: add array data type while creating schema Signed-off-by: bhavanakarwade * replace hardcoded value with dynamic Signed-off-by: bhavanakarwade * fix: removed commented code Signed-off-by: bhavanakarwade --------- Signed-off-by: pallavicoder Signed-off-by: bhavanakarwade Co-authored-by: bhavanakarwade Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * fix: added search on schema name for credentials list (#1111) * fix:added array data type in schema payload Signed-off-by: pallavicoder * fix:added nested attributes in schema paylaod Signed-off-by: pallavicoder * feat: add array data type while creating schema Signed-off-by: bhavanakarwade * replace hardcoded value with dynamic Signed-off-by: bhavanakarwade * fix: removed commented code Signed-off-by: bhavanakarwade * fix: added search on schema name Signed-off-by: bhavanakarwade * fix: made api property optional Signed-off-by: bhavanakarwade * handled conditions for empty array Signed-off-by: bhavanakarwade --------- Signed-off-by: pallavicoder Signed-off-by: bhavanakarwade Co-authored-by: pallavicoder Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * chore: added parentThreadId in webhook dto (#1112) * fix:added array data type in schema payload Signed-off-by: pallavicoder * fix:added nested attributes in schema paylaod Signed-off-by: pallavicoder * feat: add array data type while creating schema Signed-off-by: bhavanakarwade * replace hardcoded value with dynamic Signed-off-by: bhavanakarwade * fix: removed commented code Signed-off-by: bhavanakarwade * fix: added search on schema name Signed-off-by: bhavanakarwade * fix: made api property optional Signed-off-by: bhavanakarwade * handled conditions for empty array Signed-off-by: bhavanakarwade * chore: added loggers Signed-off-by: bhavanakarwade * chore: added loggers for issuance and verification Signed-off-by: bhavanakarwade * chore: added parentthreadid in webhook dto Signed-off-by: bhavanakarwade * fix: remove unnecessary loggers Signed-off-by: bhavanakarwade * fix: remove unnecessary loggers Signed-off-by: bhavanakarwade --------- Signed-off-by: pallavicoder Signed-off-by: bhavanakarwade Co-authored-by: pallavicoder Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * fix: changes schema endpoint (#1114) Signed-off-by: Tipu_Singh Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * feat: added purpose property in send proof request (#1113) Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * refactor:modification on API summary and description (#1116) Signed-off-by: Tipu_Singh Signed-off-by: Krishna Waske * chore: added orgdid in get all orgs response Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * refactor: improve response for oob verification via email (#1118) Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * refactor: swagger documentation changes for auth, schema, ledger, credential-definition, agent and user controllers. (#1117) * swagger documentation changes for auth, schema and user controllers Signed-off-by: pranalidhanavade * swagger documentation changes for auth, schema and user controller Signed-off-by: pranalidhanavade * refactor: API descrption Signed-off-by: pranalidhanavade * refactor: swagger API documentation for agent controller Signed-off-by: pranalidhanavade * fix: API trim validation Signed-off-by: pranalidhanavade * fix: Removed extra description related to pagination from API documentation Signed-off-by: pranalidhanavade * fix: changes in email example Signed-off-by: pranalidhanavade * fix: changes in API documentation Signed-off-by: pranalidhanavade --------- Signed-off-by: pranalidhanavade Signed-off-by: Krishna Waske * fix: removed unnecessary code Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * chore: added orgdid in get all orgs response (#1119) Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * fix: added API params validations (#1124) * fix: added API params validations Signed-off-by: pranalidhanavade * fix: removed unneccessary roles from role gaurd Signed-off-by: pranalidhanavade --------- Signed-off-by: pranalidhanavade Signed-off-by: Krishna Waske * fix: added api param validations (#1121) * fix: added api param validations Signed-off-by: bhavanakarwade * fix: removed unnecessary validations Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * refactor:Conditions to get issued credential list for OOB issuance (#1125) Signed-off-by: pranalidhanavade Signed-off-by: Krishna Waske * fix: parameter validations issues (#1126) * fix: added api param validations Signed-off-by: bhavanakarwade * fix: removed unnecessary validations Signed-off-by: bhavanakarwade * fix:resolved validations issue Signed-off-by: bhavanakarwade * added comment on function for understanding Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * added compass.yml file Signed-off-by: pranalidhanavade Signed-off-by: Krishna Waske * feat: update schema details and add alias in schema table (#1129) * API for update schema details Signed-off-by: pallavighule * refactored query Signed-off-by: pallavighule * chore: added alias in response Signed-off-by: bhavanakarwade --------- Signed-off-by: pallavighule Signed-off-by: bhavanakarwade Co-authored-by: bhavanakarwade Signed-off-by: Krishna Waske * chore: remove yarn.lock and package-lock.json files (#1133) Signed-off-by: Sai Ranjit Tummalapalli Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * fix: platform agent set up issue (#1136) Signed-off-by: bhavanakarwade Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * fix: Parameter validations (#1138) * fix: added api param validations Signed-off-by: bhavanakarwade * fix: removed unnecessary validations Signed-off-by: bhavanakarwade * fix:resolved validations issue Signed-off-by: bhavanakarwade * added comment on function for understanding Signed-off-by: bhavanakarwade * fix: resolve orgid validations Signed-off-by: bhavanakarwade * fix: added response message Signed-off-by: bhavanakarwade * fix: added space in response messages Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * added tenant id in get org info (#1139) Signed-off-by: pallavighule Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * fix/added-yml-file-to-push-docker-images (#1142) * fix: removed prisma commands in build stage Signed-off-by: sahil.kamble@ayanworks.com * feat: create yml file for all services Signed-off-by: sahil.kamble@ayanworks.com * Updated Dockerfiles Signed-off-by: sahil.kamble@ayanworks.com * Updated yml to push docker images Signed-off-by: sahil.kamble@ayanworks.com * updated yml files Signed-off-by: sahil.kamble@ayanworks.com --------- Signed-off-by: sahil.kamble@ayanworks.com Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * fix/push docker image (#1154) * fix: used single yml file using matrix instead of multiple files Signed-off-by: sahil.kamble@ayanworks.com * fix: renamed yml file to cicd.yml Signed-off-by: sahil.kamble@ayanworks.com * fix: renamed yml file Signed-off-by: sahil.kamble@ayanworks.com * fix: renamed yml file Signed-off-by: sahil.kamble@ayanworks.com * chore: removed id-token and attestations Signed-off-by: sahil.kamble@ayanworks.com --------- Signed-off-by: sahil.kamble@ayanworks.com Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * chore: add aws module into monorepo (#1135) * chore: add aws into monorepo Signed-off-by: Sai Ranjit Tummalapalli * chore: update tsconfig Signed-off-by: Sai Ranjit Tummalapalli * refactor:tsconfig.build.json file Signed-off-by: Tipu_Singh * refactor: remove redundant .nvmrc file Signed-off-by: Sai Ranjit Tummalapalli --------- Signed-off-by: Sai Ranjit Tummalapalli Signed-off-by: Tipu_Singh Co-authored-by: Tipu_Singh Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * chore: remove unused modules (#1163) Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * refactor: remove image-service from libs (#1164) Signed-off-by: Sai Ranjit Tummalapalli Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * refactor: merge nats-interceptor and responses lib into common (#1165) * refactor: merge nats-interceptor into common Signed-off-by: Sai Ranjit Tummalapalli * refactor: merge repsonses lib into common Signed-off-by: Sai Ranjit Tummalapalli * refactor: create common function to handle errors Signed-off-by: Sai Ranjit Tummalapalli * chore: add todo Signed-off-by: Sai Ranjit Tummalapalli * fix: remove missed image service Signed-off-by: Sai Ranjit Tummalapalli * fix: create separate function to handle common error Signed-off-by: Sai Ranjit Tummalapalli * chore: add comment for the purpose of the functions Signed-off-by: Sai Ranjit Tummalapalli * chore: update function comments Signed-off-by: Sai Ranjit Tummalapalli --------- Signed-off-by: Sai Ranjit Tummalapalli Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * refactor: create common package in libs (#1167) * refactor: merge nats-interceptor into common Signed-off-by: Sai Ranjit Tummalapalli * refactor: merge repsonses lib into common Signed-off-by: Sai Ranjit Tummalapalli * refactor: create common function to handle errors Signed-off-by: Sai Ranjit Tummalapalli * chore: add todo Signed-off-by: Sai Ranjit Tummalapalli * refactor: create common package in libs Signed-off-by: Sai Ranjit Tummalapalli * fix: remove missed image service Signed-off-by: Sai Ranjit Tummalapalli * refactor: common service Signed-off-by: Sai Ranjit Tummalapalli --------- Signed-off-by: Sai Ranjit Tummalapalli Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * feat: Support nested attributes while creating schema (#1166) * wip: support nested attributes while creating schema Signed-off-by: bhavanakarwade * wip: aligned issuance functionality with nested attributes structure Signed-off-by: bhavanakarwade * refactor: modify csv to json function Signed-off-by: bhavanakarwade * fix: formatting changes Signed-off-by: bhavanakarwade * fix: resolved sonar cloud issue Signed-off-by: bhavanakarwade * fix: security hotspot issue Signed-off-by: bhavanakarwade * feat: added schema builder function Signed-off-by: bhavanakarwade * fix: resolved issue Signed-off-by: bhavanakarwade * refactor: modify extract attributes function Signed-off-by: bhavanakarwade * fix: destructured objects Signed-off-by: bhavanakarwade * feat: added description property Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * refactor: schema data type validations (#1174) * wip: support nested attributes while creating schema Signed-off-by: bhavanakarwade * wip: aligned issuance functionality with nested attributes structure Signed-off-by: bhavanakarwade * refactor: modify csv to json function Signed-off-by: bhavanakarwade * fix: formatting changes Signed-off-by: bhavanakarwade * fix: resolved sonar cloud issue Signed-off-by: bhavanakarwade * fix: security hotspot issue Signed-off-by: bhavanakarwade * feat: added schema builder function Signed-off-by: bhavanakarwade * fix: resolved issue Signed-off-by: bhavanakarwade * refactor: modify extract attributes function Signed-off-by: bhavanakarwade * fix: destructured objects Signed-off-by: bhavanakarwade * feat: added description property Signed-off-by: bhavanakarwade * fix: added validations for schema type Signed-off-by: bhavanakarwade * formatted enum file Signed-off-by: bhavanakarwade * chore: added enum for indy schema data type Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * refactor: update organization API to support updation of country, state and city (#1180) * refactor: update organization API to support updation of country, state and city Signed-off-by: pranalidhanavade * resolved sonarlint issues Signed-off-by: pranalidhanavade * resolved sonarlint issues Signed-off-by: pranalidhanavade --------- Signed-off-by: pranalidhanavade Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * refactor: error handling for download csv file (#1182) * wip: support nested attributes while creating schema Signed-off-by: bhavanakarwade * wip: aligned issuance functionality with nested attributes structure Signed-off-by: bhavanakarwade * refactor: modify csv to json function Signed-off-by: bhavanakarwade * fix: formatting changes Signed-off-by: bhavanakarwade * fix: resolved sonar cloud issue Signed-off-by: bhavanakarwade * fix: security hotspot issue Signed-off-by: bhavanakarwade * feat: added schema builder function Signed-off-by: bhavanakarwade * fix: resolved issue Signed-off-by: bhavanakarwade * refactor: modify extract attributes function Signed-off-by: bhavanakarwade * fix: destructured objects Signed-off-by: bhavanakarwade * feat: added description property Signed-off-by: bhavanakarwade * fix: added validations for schema type Signed-off-by: bhavanakarwade * formatted enum file Signed-off-by: bhavanakarwade * chore: added enum for indy schema data type Signed-off-by: bhavanakarwade * chore: refactor validations Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * feat: implemented get verified presentation counts by issuer id (#1184) Signed-off-by: bhavanakarwade Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * fix: local setup issues (#1155) * Update start_agent.sh Signed-off-by: Krishna Waske * Update .env.demo fix: correct script for local build Signed-off-by: Krishna Waske --------- Signed-off-by: Krishna Waske Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * fix: issues related nested attributes in issuance process (#1194) * fix: issues related nested attributes in issuance process Signed-off-by: bhavanakarwade * fix: added statuscode Signed-off-by: bhavanakarwade * fix: required field validation for request id field Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * chore: update .env.demo file (#1198) Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * feat: Validations for organization and template ledgerId in all issuance methods (#1200) * fix: ledgerId validations in issuance process Signed-off-by: bhavanakarwade * fix: added validations for not found exception Signed-off-by: bhavanakarwade * chore: added comment Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade Signed-off-by: Krishna Waske * feat: added seed dockerfile (#1203) * feat: added seed dockerfile Signed-off-by: Sahil Kamble * feat: updated seed dockerfile Signed-off-by: Sahil Kamble --------- Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * Update nats server and redis configurations (#1206) * Update nats-server.conf Signed-off-by: Krishna Waske * Create docker-compose.nats.yml Signed-off-by: Krishna Waske * Create docker-compose.redis.yml Signed-off-by: Krishna Waske --------- Signed-off-by: Krishna Waske * Update .env.demo (#1205) * Update .env.demo Signed-off-by: Krishna Waske * Update .env.demo Signed-off-by: Krishna Waske --------- Signed-off-by: Krishna Waske * feat/update-docker-compose (#1209) * feat: add schema and seed service to docker-compose Signed-off-by: Sahil Kamble * feat: add docker-compose-dev.yml Signed-off-by: Sahil Kamble --------- Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * chore: removed unwanted values (#1212) Signed-off-by: Sahil Kamble Signed-off-by: Krishna Waske * feat: created yml file for tag v2.0.0 Signed-off-by: sahil.kamble@ayanworks.com Signed-off-by: Krishna Waske * fix: added organization service in yml file Signed-off-by: sahil.kamble@ayanworks.com Signed-off-by: Krishna Waske * feat: create yml file to push docker images Signed-off-by: sahil.kamble@ayanworks.com Signed-off-by: Krishna Waske * Create FEATURE-REQUEST.md (#1181) * Create FEATURE-REQUEST.md Create FEATURE-REQUEST.md Signed-off-by: Krishna Waske * Update bug_report.md Update bug_report.md Signed-off-by: Krishna Waske * Update FEATURE-REQUEST.md change links Signed-off-by: Krishna Waske * Update bug_report.md Signed-off-by: Krishna Waske --------- Signed-off-by: Krishna Waske * fix readme typo (#1170) fix readme typo Signed-off-by: NucleonGodX Signed-off-by: Krishna Waske * fix: Update GET proof record endpoint to return 404 for non-existing records (#1190) Signed-off-by: Amr Mubarak Signed-off-by: Krishna Waske --------- Signed-off-by: pranalidhanavade Signed-off-by: Krishna Waske Signed-off-by: sahil.kamble@ayanworks.com Signed-off-by: pallavicoder Signed-off-by: bhavanakarwade Signed-off-by: Tipu_Singh Signed-off-by: pallavighule Signed-off-by: Sai Ranjit Tummalapalli Signed-off-by: Sahil Kamble Signed-off-by: NucleonGodX Signed-off-by: Amr Mubarak Co-authored-by: pranalidhanavade Co-authored-by: sahil.kamble@ayanworks.com Co-authored-by: pallavighule <61926403+pallavighule@users.noreply.github.com> Co-authored-by: bhavanakarwade Co-authored-by: pallavicoder Co-authored-by: Tipu_Singh Co-authored-by: Sai Ranjit Tummalapalli Co-authored-by: Manit Singh <79140607+NucleonGodX@users.noreply.github.com> Co-authored-by: Amr Mubarak <138404703+amrrdev@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/FEATURE-REQUEST.md | 44 ++++++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 69 +++++++++++++------ README.md | 4 +- apps/verification/src/verification.service.ts | 18 ++--- 4 files changed, 100 insertions(+), 35 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/FEATURE-REQUEST.md diff --git a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md new file mode 100644 index 000000000..bb511c8f2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md @@ -0,0 +1,44 @@ +## โœ… Preliminary Checks + +- [ ] I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) to avoid duplicates. +- [ ] I'm willing to create a PR for this feature. (if applicable). + +--- + +## ๐Ÿงฉ Problem Statement + +_Is your feature request related to a problem? Please describe it clearly._ + +> Ex: I'm always frustrated when [...] + +--- + +## ๐Ÿ’ก Proposed Solution + +_A clear and concise description of what you want to happen._ + +> Ex: It would be great if [...] + +--- + +## ๐Ÿ”„ Alternatives Considered + +_Have you considered any alternative solutions or features?_ + +> Ex: I also thought about [...], but [...] + +--- + +## ๐Ÿ“Ž Additional Context + +_Add any other context, references, mockups, or screenshots here._ + +--- + +## โœ… Acceptance Criteria + +_List specific tasks or outcomes that define when this request is complete._ + +- A new endpoint `/v1/...` is added +- Docs updated +- Tests written and passing diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 08cd90e3e..726cdd0da 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,31 +1,58 @@ +## ๐Ÿงพ Preliminary Checks + +- [ ] I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) for duplicates. +- [ ] I'm willing to create a PR fixing this issue. (if applicable). + +--- + +## ๐Ÿž Bug Description + +_A clear and concise description of what the bug is._ + +When I try to [...], I get this unexpected behavior [...] + +--- + +## ๐Ÿงช Steps to Reproduce + +_Provide clear steps to reproduce the bug._ + +1. Go to '...' +2. Click on '...' +3. Scroll down to '...' +4. See error + --- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' + +## โœ… Expected Behavior + +_What did you expect to happen?_ --- -**Prerequisites** +## โŒ Actual Behavior -**Steps to Reproduce** +_What actually happened instead?_ -**Current behavior** +--- + +## ๐Ÿ“Œ Affected Version/Commit -**Expected behavior** +_Version number, branch name, or commit hash where the bug occurs._ -**Environment** +--- + +## ๐Ÿ’ป Environment + +_Where did the issue occur?_ + +- [ ] Local development +- [ ] Production +- [ ] CI/CD +- [ ] Other + +--- -**Desktop** - - OS: - - Browser: - - Browser Version: - - CREDEBL Version: - -**Smartphone** - - Device: - - OS: - - ADEYA version: +## ๐Ÿงพ Relevant Logs, Screenshots, or Stack Traces -**Screenshots or Screen recording** +_Paste any error messages or screenshots that can help diagnose the issue._ diff --git a/README.md b/README.md index efebe8b60..71336eb02 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD= Date: Tue, 13 May 2025 15:33:36 +0530 Subject: [PATCH 13/15] Update and rename FEATURE-REQUEST.md to FEATURE-REQUEST.yml (#1241) * Update and rename FEATURE-REQUEST.md to FEATURE-REQUEST.yml update template from .md to .yml Signed-off-by: Krishna Waske * Update FEATURE-REQUEST.yml Signed-off-by: Krishna Waske * Update and rename bug_report.md to bug_report.yml Signed-off-by: Krishna Waske * Update FEATURE-REQUEST.yml Signed-off-by: Krishna Waske * Update bug_report.yml Signed-off-by: Krishna Waske * Update bug_report.yml Signed-off-by: Krishna Waske * Update bug_report.yml Signed-off-by: Krishna Waske * Update bug_report.yml Signed-off-by: Krishna Waske * Update FEATURE-REQUEST.yml Signed-off-by: Krishna Waske --------- Signed-off-by: Krishna Waske --- .github/ISSUE_TEMPLATE/FEATURE-REQUEST.md | 44 -------------- .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml | 57 +++++++++++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 58 ------------------ .github/ISSUE_TEMPLATE/bug_report.yml | 71 ++++++++++++++++++++++ 4 files changed, 128 insertions(+), 102 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/FEATURE-REQUEST.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md deleted file mode 100644 index bb511c8f2..000000000 --- a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md +++ /dev/null @@ -1,44 +0,0 @@ -## โœ… Preliminary Checks - -- [ ] I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) to avoid duplicates. -- [ ] I'm willing to create a PR for this feature. (if applicable). - ---- - -## ๐Ÿงฉ Problem Statement - -_Is your feature request related to a problem? Please describe it clearly._ - -> Ex: I'm always frustrated when [...] - ---- - -## ๐Ÿ’ก Proposed Solution - -_A clear and concise description of what you want to happen._ - -> Ex: It would be great if [...] - ---- - -## ๐Ÿ”„ Alternatives Considered - -_Have you considered any alternative solutions or features?_ - -> Ex: I also thought about [...], but [...] - ---- - -## ๐Ÿ“Ž Additional Context - -_Add any other context, references, mockups, or screenshots here._ - ---- - -## โœ… Acceptance Criteria - -_List specific tasks or outcomes that define when this request is complete._ - -- A new endpoint `/v1/...` is added -- Docs updated -- Tests written and passing diff --git a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml new file mode 100644 index 000000000..da89002ce --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml @@ -0,0 +1,57 @@ +name: "๐Ÿš€ Feature Request" +description: Suggest an idea or enhancement for this project +labels: [enhancement] +title: "feat: " +body: + - type: checkboxes + id: agreement + attributes: + label: Preliminary Checks + options: + - label: "I've read the [contibution guide](https://docs.credebl.id/docs/contribute/how-to-contribute) and agree to it" + required: true + - label: "I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) to avoid duplicates." + required: true + - label: "I'm willing to create a PR for this feature. (if applicable)." + - type: markdown + attributes: + value: | + ## ๐Ÿงฉ Problem Statement + + _Is your feature request related to a problem? Please describe it clearly._ + + > Ex: I'm always frustrated when [...] + + --- + + ## ๐Ÿ’ก Proposed Solution + + _A clear and concise description of what you want to happen._ + + > Ex: It would be great if [...] + + --- + + ## ๐Ÿ”„ Alternatives Considered + + _Have you considered any alternative solutions or features?_ + + > Ex: I also thought about [...], but [...] + + --- + + ## ๐Ÿ“Ž Additional Context + + _Add any other context, references, mockups, or screenshots here._ + + --- + + ## โœ… Acceptance Criteria + + _List specific tasks or outcomes that define when this request is complete._ + + - A new endpoint `/v1/...` is added + - Docs updated + - Tests written and passing + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 726cdd0da..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,58 +0,0 @@ -## ๐Ÿงพ Preliminary Checks - -- [ ] I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) for duplicates. -- [ ] I'm willing to create a PR fixing this issue. (if applicable). - ---- - -## ๐Ÿž Bug Description - -_A clear and concise description of what the bug is._ - -When I try to [...], I get this unexpected behavior [...] - ---- - -## ๐Ÿงช Steps to Reproduce - -_Provide clear steps to reproduce the bug._ - -1. Go to '...' -2. Click on '...' -3. Scroll down to '...' -4. See error - ---- - -## โœ… Expected Behavior - -_What did you expect to happen?_ - ---- - -## โŒ Actual Behavior - -_What actually happened instead?_ - ---- - -## ๐Ÿ“Œ Affected Version/Commit - -_Version number, branch name, or commit hash where the bug occurs._ - ---- - -## ๐Ÿ’ป Environment - -_Where did the issue occur?_ - -- [ ] Local development -- [ ] Production -- [ ] CI/CD -- [ ] Other - ---- - -## ๐Ÿงพ Relevant Logs, Screenshots, or Stack Traces - -_Paste any error messages or screenshots that can help diagnose the issue._ diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..3a946e71a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,71 @@ +name: "๐Ÿ› Bug Report" +description: Report a bug or unexpected behavior in the project +labels: [bug] +title: "fix: " +body: + - type: checkboxes + id: agreement + attributes: + label: Preliminary Checks + options: + - label: I have read the contributions guide [contibution guide](https://docs.credebl.id/docs/contribute/how-to-contribute) and agree to it + required: true + - label: I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) to avoid duplicates. + required: true + - label: "I'm willing to create a PR for this feature. (if applicable)." + - type: markdown + attributes: + value: | + ## ๐Ÿž Bug Description + + _A clear and concise description of what the bug is._ + + When I try to [...], I get this unexpected behavior [...] + + --- + + ## ๐Ÿงช Steps to Reproduce + + _Provide clear steps to reproduce the bug._ + + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + + --- + + ## โœ… Expected Behavior + + _What did you expect to happen?_ + + --- + + ## โŒ Actual Behavior + + _What actually happened instead?_ + + --- + + ## ๐Ÿ“Œ Affected Version/Commit + + _Version number, branch name, or commit hash where the bug occurs._ + + --- + + ## ๐Ÿ’ป Environment + + _Where did the issue occur?_ + + - [ ] Local development + - [ ] Production + - [ ] CI/CD + - [ ] Other + + --- + + ## ๐Ÿงพ Relevant Logs, Screenshots, or Stack Traces + + _Paste any error messages or screenshots that can help diagnose the issue._ + validations: + required: false From 29ebbdc15c465c931bafeebc01e0d37ec3a0313b Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Tue, 13 May 2025 19:51:03 +0530 Subject: [PATCH 14/15] update template content (#1246) * Update FEATURE-REQUEST.yml with note Signed-off-by: Krishna Waske * Update bug_report.yml Signed-off-by: Krishna Waske * Update bug_report.yml Signed-off-by: Krishna Waske * Update triage Signed-off-by: Krishna Waske --------- Signed-off-by: Krishna Waske --- .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml | 94 ++++++++++-------- .github/ISSUE_TEMPLATE/bug_report.yml | 107 ++++++++++++--------- 2 files changed, 118 insertions(+), 83 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml index da89002ce..4a95540b9 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml @@ -1,57 +1,73 @@ -name: "๐Ÿš€ Feature Request" -description: Suggest an idea or enhancement for this project -labels: [enhancement] +name: "\U0001F680 Feature Request - new" title: "feat: " +description: Suggest an idea or enhancement for CREDEBL platform +labels: [enhancement, triage] body: + - type: markdown + attributes: + value: | + ## Reporting a feature request/enhancement to CREDEBL + + Thank you for taking time to create a feature request for CREDEBL, your contribution will help + make the product better for everyone. + + Make sure your issue has a generous description that will help others understand and fix it at earliest. + - type: checkboxes - id: agreement + id: preliminary-checks attributes: - label: Preliminary Checks + label: "โœ… Preliminary Checks" + description: "Please confirm the following before submitting." options: - label: "I've read the [contibution guide](https://docs.credebl.id/docs/contribute/how-to-contribute) and agree to it" required: true - label: "I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) to avoid duplicates." required: true - label: "I'm willing to create a PR for this feature. (if applicable)." - - type: markdown - attributes: - value: | - ## ๐Ÿงฉ Problem Statement - - _Is your feature request related to a problem? Please describe it clearly._ - - > Ex: I'm always frustrated when [...] - - --- - - ## ๐Ÿ’ก Proposed Solution - - _A clear and concise description of what you want to happen._ - - > Ex: It would be great if [...] - - --- - - ## ๐Ÿ”„ Alternatives Considered - _Have you considered any alternative solutions or features?_ - - > Ex: I also thought about [...], but [...] - - --- - - ## ๐Ÿ“Ž Additional Context - - _Add any other context, references, mockups, or screenshots here._ + - type: textarea + id: problem-statement + attributes: + label: "๐Ÿงฉ Problem Statement" + description: "Is your feature request related to a problem? Please describe it clearly." + placeholder: "Ex: I'm always frustrated when [...]" + validations: + required: true - --- + - type: textarea + id: proposed-solution + attributes: + label: "๐Ÿ’ก Proposed Solution" + description: "A clear and concise description of what you want to happen." + placeholder: "Ex: It would be great if [...]" + validations: + required: true - ## โœ… Acceptance Criteria + - type: textarea + id: alternatives-considered + attributes: + label: "๐Ÿ”„ Alternatives Considered" + description: "Have you considered any alternative solutions or features?" + placeholder: "Ex: I also thought about [...], but [...]" + validations: + required: false - _List specific tasks or outcomes that define when this request is complete._ + - type: textarea + id: additional-context + attributes: + label: "๐Ÿ“Ž Additional Context" + description: "Add any other context, references, mockups, or screenshots here." + validations: + required: false - - A new endpoint `/v1/...` is added - - Docs updated + - type: textarea + id: acceptance-criteria + attributes: + label: "โœ… Acceptance Criteria" + description: "List specific tasks or outcomes that define when this request is complete." + placeholder: | + - A new endpoint `/v1/...` is added + - Docs updated - Tests written and passing validations: required: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3a946e71a..a9f326c77 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -3,6 +3,15 @@ description: Report a bug or unexpected behavior in the project labels: [bug] title: "fix: " body: + - type: markdown + attributes: + value: | + ## Reporting a bug on CREDEBL + + Thank you for taking time to report the bug on CREDEBL, your contribution will help + make the product better for everyone. + + Make sure your issue has a generous description that will help others understand and fix it at earliest. - type: checkboxes id: agreement attributes: @@ -13,59 +22,69 @@ body: - label: I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) to avoid duplicates. required: true - label: "I'm willing to create a PR for this feature. (if applicable)." - - type: markdown + - type: textarea + id: steps-to-reproduce attributes: - value: | - ## ๐Ÿž Bug Description - - _A clear and concise description of what the bug is._ - - When I try to [...], I get this unexpected behavior [...] - - --- - - ## ๐Ÿงช Steps to Reproduce - - _Provide clear steps to reproduce the bug._ - + label: "๐Ÿงช Steps to Reproduce" + description: "Provide clear steps to reproduce the bug." + placeholder: | 1. Go to '...' 2. Click on '...' 3. Scroll down to '...' 4. See error + validations: + required: true - --- - - ## โœ… Expected Behavior - - _What did you expect to happen?_ - - --- - - ## โŒ Actual Behavior - - _What actually happened instead?_ - - --- - - ## ๐Ÿ“Œ Affected Version/Commit - - _Version number, branch name, or commit hash where the bug occurs._ - - --- - - ## ๐Ÿ’ป Environment - - _Where did the issue occur?_ + - type: textarea + id: expected-behavior + attributes: + label: "โœ… Expected Behavior" + description: "What did you expect to happen?" + placeholder: | + Ex: After clicking 'Submit', I expected a confirmation modal to appear. + validations: + required: true - - [ ] Local development - - [ ] Production - - [ ] CI/CD - - [ ] Other + - type: textarea + id: current-behavior + attributes: + label: "โŒ Current Behavior" + description: "What is currently happening instead?" + placeholder: | + Ex: The page crashed with a 500 error when clicking 'Submit'. + validations: + required: true - --- + - type: input + id: affected-version + attributes: + label: "๐Ÿ“Œ Affected Version/Commit" + description: "Version number, branch name, or commit hash where the bug occurs." + placeholder: "e.g., v1.2.3, main, 4f3e2d1" + validations: + required: false - ## ๐Ÿงพ Relevant Logs, Screenshots, or Stack Traces + - type: checkboxes + id: environment + attributes: + label: "๐Ÿ’ป Environment" + description: "Where did the issue occur?" + options: + - label: "Local development" + - label: "Production" + - label: "CI/CD" + - label: "Other" - _Paste any error messages or screenshots that can help diagnose the issue._ + - type: textarea + id: logs-and-screenshots + attributes: + label: "๐Ÿงพ Relevant Logs, Screenshots, or Stack Traces" + description: "Paste any error messages or screenshots that can help diagnose the issue." + placeholder: | + Please include: + - Error logs + - Screenshots + - Console output + - Stack traces validations: required: false From 4bc21742aa6f917e14c83a132d224736c11e2083 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Sat, 14 Jun 2025 12:27:34 +0530 Subject: [PATCH 15/15] fix: template Signed-off-by: Krishna Waske --- .github/ISSUE_TEMPLATE/FEATURE-REQUEST.md | 44 ----------- .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml | 73 ++++++++++++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 58 -------------- .github/ISSUE_TEMPLATE/bug_report.yml | 90 ++++++++++++++++++++++ 4 files changed, 163 insertions(+), 102 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/FEATURE-REQUEST.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md deleted file mode 100644 index bb511c8f2..000000000 --- a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.md +++ /dev/null @@ -1,44 +0,0 @@ -## โœ… Preliminary Checks - -- [ ] I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) to avoid duplicates. -- [ ] I'm willing to create a PR for this feature. (if applicable). - ---- - -## ๐Ÿงฉ Problem Statement - -_Is your feature request related to a problem? Please describe it clearly._ - -> Ex: I'm always frustrated when [...] - ---- - -## ๐Ÿ’ก Proposed Solution - -_A clear and concise description of what you want to happen._ - -> Ex: It would be great if [...] - ---- - -## ๐Ÿ”„ Alternatives Considered - -_Have you considered any alternative solutions or features?_ - -> Ex: I also thought about [...], but [...] - ---- - -## ๐Ÿ“Ž Additional Context - -_Add any other context, references, mockups, or screenshots here._ - ---- - -## โœ… Acceptance Criteria - -_List specific tasks or outcomes that define when this request is complete._ - -- A new endpoint `/v1/...` is added -- Docs updated -- Tests written and passing diff --git a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml new file mode 100644 index 000000000..4a95540b9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml @@ -0,0 +1,73 @@ +name: "\U0001F680 Feature Request - new" +title: "feat: " +description: Suggest an idea or enhancement for CREDEBL platform +labels: [enhancement, triage] +body: + - type: markdown + attributes: + value: | + ## Reporting a feature request/enhancement to CREDEBL + + Thank you for taking time to create a feature request for CREDEBL, your contribution will help + make the product better for everyone. + + Make sure your issue has a generous description that will help others understand and fix it at earliest. + + - type: checkboxes + id: preliminary-checks + attributes: + label: "โœ… Preliminary Checks" + description: "Please confirm the following before submitting." + options: + - label: "I've read the [contibution guide](https://docs.credebl.id/docs/contribute/how-to-contribute) and agree to it" + required: true + - label: "I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) to avoid duplicates." + required: true + - label: "I'm willing to create a PR for this feature. (if applicable)." + + - type: textarea + id: problem-statement + attributes: + label: "๐Ÿงฉ Problem Statement" + description: "Is your feature request related to a problem? Please describe it clearly." + placeholder: "Ex: I'm always frustrated when [...]" + validations: + required: true + + - type: textarea + id: proposed-solution + attributes: + label: "๐Ÿ’ก Proposed Solution" + description: "A clear and concise description of what you want to happen." + placeholder: "Ex: It would be great if [...]" + validations: + required: true + + - type: textarea + id: alternatives-considered + attributes: + label: "๐Ÿ”„ Alternatives Considered" + description: "Have you considered any alternative solutions or features?" + placeholder: "Ex: I also thought about [...], but [...]" + validations: + required: false + + - type: textarea + id: additional-context + attributes: + label: "๐Ÿ“Ž Additional Context" + description: "Add any other context, references, mockups, or screenshots here." + validations: + required: false + + - type: textarea + id: acceptance-criteria + attributes: + label: "โœ… Acceptance Criteria" + description: "List specific tasks or outcomes that define when this request is complete." + placeholder: | + - A new endpoint `/v1/...` is added + - Docs updated + - Tests written and passing + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 726cdd0da..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,58 +0,0 @@ -## ๐Ÿงพ Preliminary Checks - -- [ ] I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) for duplicates. -- [ ] I'm willing to create a PR fixing this issue. (if applicable). - ---- - -## ๐Ÿž Bug Description - -_A clear and concise description of what the bug is._ - -When I try to [...], I get this unexpected behavior [...] - ---- - -## ๐Ÿงช Steps to Reproduce - -_Provide clear steps to reproduce the bug._ - -1. Go to '...' -2. Click on '...' -3. Scroll down to '...' -4. See error - ---- - -## โœ… Expected Behavior - -_What did you expect to happen?_ - ---- - -## โŒ Actual Behavior - -_What actually happened instead?_ - ---- - -## ๐Ÿ“Œ Affected Version/Commit - -_Version number, branch name, or commit hash where the bug occurs._ - ---- - -## ๐Ÿ’ป Environment - -_Where did the issue occur?_ - -- [ ] Local development -- [ ] Production -- [ ] CI/CD -- [ ] Other - ---- - -## ๐Ÿงพ Relevant Logs, Screenshots, or Stack Traces - -_Paste any error messages or screenshots that can help diagnose the issue._ diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..a9f326c77 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,90 @@ +name: "๐Ÿ› Bug Report" +description: Report a bug or unexpected behavior in the project +labels: [bug] +title: "fix: " +body: + - type: markdown + attributes: + value: | + ## Reporting a bug on CREDEBL + + Thank you for taking time to report the bug on CREDEBL, your contribution will help + make the product better for everyone. + + Make sure your issue has a generous description that will help others understand and fix it at earliest. + - type: checkboxes + id: agreement + attributes: + label: Preliminary Checks + options: + - label: I have read the contributions guide [contibution guide](https://docs.credebl.id/docs/contribute/how-to-contribute) and agree to it + required: true + - label: I have searched [existing issues](https://github.com/credebl/platform/issues) and [pull requests](https://github.com/credebl/platform/pulls) to avoid duplicates. + required: true + - label: "I'm willing to create a PR for this feature. (if applicable)." + - type: textarea + id: steps-to-reproduce + attributes: + label: "๐Ÿงช Steps to Reproduce" + description: "Provide clear steps to reproduce the bug." + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: "โœ… Expected Behavior" + description: "What did you expect to happen?" + placeholder: | + Ex: After clicking 'Submit', I expected a confirmation modal to appear. + validations: + required: true + + - type: textarea + id: current-behavior + attributes: + label: "โŒ Current Behavior" + description: "What is currently happening instead?" + placeholder: | + Ex: The page crashed with a 500 error when clicking 'Submit'. + validations: + required: true + + - type: input + id: affected-version + attributes: + label: "๐Ÿ“Œ Affected Version/Commit" + description: "Version number, branch name, or commit hash where the bug occurs." + placeholder: "e.g., v1.2.3, main, 4f3e2d1" + validations: + required: false + + - type: checkboxes + id: environment + attributes: + label: "๐Ÿ’ป Environment" + description: "Where did the issue occur?" + options: + - label: "Local development" + - label: "Production" + - label: "CI/CD" + - label: "Other" + + - type: textarea + id: logs-and-screenshots + attributes: + label: "๐Ÿงพ Relevant Logs, Screenshots, or Stack Traces" + description: "Paste any error messages or screenshots that can help diagnose the issue." + placeholder: | + Please include: + - Error logs + - Screenshots + - Console output + - Stack traces + validations: + required: false