diff --git a/.env.demo b/.env.demo index f9130b987..369af85d3 100644 --- a/.env.demo +++ b/.env.demo @@ -29,7 +29,7 @@ NATS_URL=nats://your-ip:4222 REDIS_HOST=your-ip REDIS_PORT=6379 -SENDGRID_API_KEY= +SENDGRID_API_KEY= WALLET_STORAGE_HOST=your-ip WALLET_STORAGE_PORT=5432 @@ -76,7 +76,7 @@ AWS_ORG_LOGO_BUCKET_NAME= # Required (As connecting to org requires Shortened url) AWS_S3_STOREOBJECT_ACCESS_KEY= AWS_S3_STOREOBJECT_SECRET_KEY= -AWS_S3_STOREOBJECT_REGION= +AWS_S3_STOREOBJECT_REGION= AWS_S3_STOREOBJECT_BUCKET= # Please refere AWS to determine your bucket url @@ -84,7 +84,7 @@ AWS_S3_STOREOBJECT_BUCKET= SHORTENED_URL_DOMAIN='https://AWS_S3_STOREOBJECT_REGION.amazonaws.com/AWS_S3_STOREOBJECT_BUCKET' 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 +ENABLE_CORS_IP_LIST=http://localhost:3000,http://localhost:3001,http://localhost:5000,http://localhost:8085 USER_NKEY_SEED= API_GATEWAY_NKEY_SEED= 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 08cd90e3e..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Prerequisites** - -**Steps to Reproduce** - -**Current behavior** - -**Expected behavior** - -**Environment** - -**Desktop** - - OS: - - Browser: - - Browser Version: - - CREDEBL Version: - -**Smartphone** - - Device: - - OS: - - ADEYA version: - -**Screenshots or Screen recording** 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 diff --git a/Dockerfiles/Dockerfile.cloud-wallet b/Dockerfiles/Dockerfile.cloud-wallet index a9d6d95af..db7e31f1e 100644 --- a/Dockerfiles/Dockerfile.cloud-wallet +++ b/Dockerfiles/Dockerfile.cloud-wallet @@ -1,10 +1,9 @@ # Stage 1: Build the application -FROM node:18-slim as build +FROM node:18-alpine AS build # Install OpenSSL +RUN apk add --no-cache openssl RUN npm install -g pnpm -RUN apt-get update -y -RUN apt-get --no-install-recommends install -y openssl # Set the working directory WORKDIR /app @@ -25,10 +24,10 @@ RUN cd libs/prisma-service && npx prisma generate RUN pnpm run build cloud-wallet # Stage 2: Create the final image -FROM node:18-slim +FROM node:18-alpine + +RUN apk add --no-cache openssl -RUN apt-get update -y -RUN apt-get --no-install-recommends install -y openssl # Set the working directory WORKDIR /app # RUN npm install -g pnpm diff --git a/Dockerfiles/Dockerfile.seed b/Dockerfiles/Dockerfile.seed index f4c51da87..b7c6611b7 100644 --- a/Dockerfiles/Dockerfile.seed +++ b/Dockerfiles/Dockerfile.seed @@ -1,16 +1,18 @@ -FROM node:18 as build +FROM node:18-alpine # Install pnpm RUN npm install -g pnpm -# Install PostgreSQL client (use apt for Debian-based images) -RUN apt-get update && apt-get install -y postgresql-client +RUN apk add --no-cache postgresql-client openssl # Set working directory WORKDIR /app COPY . . +RUN chmod +x /app/libs/prisma-service/prisma/scripts/geo_location_data_import.sh +RUN chmod +x /app/libs/prisma-service/prisma/scripts/update_client_credential_data.sh +ENV PUPPETEER_SKIP_DOWNLOAD=true RUN pnpm i --ignore-scripts # Run Prisma commands diff --git a/Dockerfiles/Dockerfile.user b/Dockerfiles/Dockerfile.user index 41bc20ddc..8969f6e77 100644 --- a/Dockerfiles/Dockerfile.user +++ b/Dockerfiles/Dockerfile.user @@ -1,32 +1,20 @@ # Stage 1: Build the application -FROM node:18-slim as build - - +FROM node:18-alpine AS build +# Install OpenSSL +RUN apk add --no-cache openssl RUN npm install -g pnpm -# We don't need the standalone Chromium -ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true -ENV PUPPETEER_SKIP_DOWNLOAD true - -# Install Google Chrome Stable and fonts -# Note: this installs the necessary libs to make the browser work with Puppeteer. -RUN apt-get update && apt-get install openssl gnupg wget -y && \ - wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ - sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ - apt-get update && \ - apt-get install google-chrome-stable -y --no-install-recommends && \ - rm -rf /var/lib/apt/lists/* - -# RUN apk update && apk list --all-versions chromium # Set the working directory WORKDIR /app # Copy package.json and package-lock.json COPY package.json ./ +ENV PUPPETEER_SKIP_DOWNLOAD=true + # Install dependencies -RUN pnpm install +RUN pnpm i --ignore-scripts # Copy the rest of the application code COPY . . @@ -37,24 +25,11 @@ RUN cd libs/prisma-service && npx prisma generate RUN pnpm run build user # Stage 2: Create the final image -FROM node:18-slim - -# We don't need the standalone Chromium -ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true -ENV PUPPETEER_SKIP_DOWNLOAD true - -# Install Google Chrome Stable and fonts -# Note: this installs the necessary libs to make the browser work with Puppeteer. -RUN apt-get update && apt-get install openssl gnupg wget -y && \ - wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ - sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ - apt-get update && \ - apt-get install google-chrome-stable -y --no-install-recommends && \ - rm -rf /var/lib/apt/lists/* +FROM node:18-alpine +RUN apk add --no-cache openssl # Set the working directory WORKDIR /app -RUN npm install -g pnpm # Copy the compiled code from the build stage COPY --from=build /app/dist/apps/user/ ./dist/apps/user/ diff --git a/Dockerfiles/Dockerfile.utility b/Dockerfiles/Dockerfile.utility index ad96df022..a39aef3b8 100644 --- a/Dockerfiles/Dockerfile.utility +++ b/Dockerfiles/Dockerfile.utility @@ -1,10 +1,9 @@ # Stage 1: Build the application -FROM node:18-slim as build +FROM node:18-alpine AS build +# Install OpenSSL +RUN apk add --no-cache openssl RUN npm install -g pnpm - -RUN apt-get update -y -RUN apt-get --no-install-recommends install -y openssl # Set the working directory WORKDIR /app @@ -25,10 +24,9 @@ RUN cd libs/prisma-service && npx prisma generate RUN pnpm run build utility # Stage 2: Create the final image -FROM node:18-slim +FROM node:18-alpine -RUN apt-get update -y -RUN apt-get --no-install-recommends install -y openssl +RUN apk add --no-cache openssl # Set the working directory WORKDIR /app # RUN npm install -g pnpm 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=