nicholas-gcc / querybot-for-auth0

Auth0 queries with natural human language
0 stars 0 forks source link

MVP Architectural Design and Design Specs #4

Open nicholas-gcc opened 2 weeks ago

nicholas-gcc commented 2 weeks ago
nicholas-gcc commented 2 weeks ago

QueryBot for Auth0 - Functional Specification

1. Overview

2. Use Cases

3. Requirements

Functional Requirements

  1. NLP Parsing

    • The system should interpret human-readable prompts and determine the appropriate Auth0 Management API request.
    • Examples: Detect variations in phrasing such as "Get user details for…" or "Show info about user…"
  2. Slack Bot Integration

    • The system should integrate seamlessly with Slack and respond to user queries, specifically in Slack Direct Messages
    • The system should be able to handle, receive and listen for Slack events (in particular, messages and slash commands)
  3. Authorization with Auth0

    • The bot should securely authorize itself with an Auth0 Machine-to-Machine application with permissions to the Management API to retrieve the appropriate access tokens
    • Auth0 access tokens should be refreshed automatically before expiry.
  4. Execute Management API Requests

    • Depending on the parsed user request, the bot should execute the appropriate Management API call and return structured data.
  5. Error Handling

    • Handle situations like insufficient permissions, invalid inputs, or API errors, and provide informative messages to users.

Non-Functional Requirements

  1. Performance

    • Queries should be parsed and responded to within an acceptable time frame (e.g., <5 seconds, for a start).
  2. Security

    • API tokens must be managed securely, ensuring they are refreshed regularly and not exposed in logs.
    • Communication between Slack, DialogFlow, and Auth0 should use secure channels.
  3. Maintainability

    • The NLP models should be easily updatable to improve understanding of user prompts over time.
    • Code should be modular to accommodate changes, such as adding new Management API request types.
  4. Usability

    • The system should provide simple and clear error messages and help instructions to non-technical users.
    • Responses should be easy to understand, avoiding technical jargon wherever possible.

6. Timeline & Priority

6. Additional Notes