Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaskList #6

Open
67 tasks
KDwevedi opened this issue Dec 1, 2024 · 0 comments
Open
67 tasks

TaskList #6

KDwevedi opened this issue Dec 1, 2024 · 0 comments

Comments

@KDwevedi
Copy link
Collaborator

KDwevedi commented Dec 1, 2024

Task List

Database Implementation

  • Design and Setup:

    • Design the schema for mapping templates to verified templates.
    • Implement a minimal database setup for the small dataset.
  • CRUD Operations:

    • Implement database operations for template, schema, and certificate.

/schema APIs

  • GET /schema/?{schemaId}:
    • Query all schemas if schemaId is not provided.
    • Query a specific schema by schemaId if provided.
    • Tests:
      • Retrieve all schemas successfully.
      • Retrieve a specific schema by ID.
      • Handle invalid schemaId gracefully.

/template APIs

  • GET /template:

    • Fetch a template by ID or schemaID.
    • Tests:
      • Retrieve a template by ID.
      • Retrieve templates by schemaID.
      • Handle cases where no templates match the criteria.
  • POST /template:

    • Add a new template with metadata and HTML content.
    • Tests:
      • Successfully create a new template.
      • Validate metadata and HTML content.
      • Handle duplicate template creation gracefully.
  • DELETE /template:

    • Delete a template by ID.
    • Tests:
      • Successfully delete a template.
      • Handle cases where the template ID does not exist.
  • PUT /template:

    • Update metadata and HTML content for a template.
    • Tests:
      • Successfully update a template.
      • Handle invalid template IDs or input.

/certificate APIs

  • GET /certificate:

    • Fetch certificates by certID, templateID, or schemaID.
    • Tests:
      • Retrieve certificates by certID, templateID, or schemaID.
      • Handle cases where no certificates match the criteria.
  • PATCH /certificate:

    • Update the status of a certificate (enable or disable).
    • Tests:
      • Successfully update a certificate's status.
      • Handle invalid certificate IDs or statuses.
  • POST /certificate:

    • Render and save a certificate using templateId, returning a link for sharing.
    • Tests:
      • Successfully render and save a certificate.
      • Validate templateId and optional puppeteerConfig.
      • Handle cases where rendering or saving fails.
  • POST /certificate/preview:

    • Render a certificate PDF without saving it.
    • Tests:
      • Successfully render a certificate preview.
      • Validate templateId and optional puppeteerConfig.
      • Handle cases where rendering fails.
  • DELETE /certificate:

    • Delete a certificate record and its saved PDF file.
    • Tests:
      • Successfully delete a certificate.
      • Handle cases where the certificate ID does not exist.

/rcw/verify/{credentialID} API

  • GET /rcw/verify/{credentialID}:
    • Render the certificate in a verified format as an HTML page.
    • Tests:
      • Successfully render a verified certificate by credentialID.
      • Handle cases where the credentialID is invalid.
      • Verify legacy compatibility for historical certificates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant