Skip to content

Implement the Settings page in the Svelte Web UI #3

Closed
@mufeedvh

Description

@mufeedvh

In the main UI, the Settings page is not implemented yet. Here's how to implement it:

API

Set Settings

Endpoint: /api/set-settings
Method: POST
JSON Request Body:

{
  "STORAGE": {
    "SQLITE_DB": "db/devika.db",
    "SCREENSHOTS_DIR": "screenshots",
    "PDFS_DIR": "pdfs",
    "PROJECTS_DIR": "projects",
    "LOGS_DIR": "logs",
    "REPOS_DIR": "repos"
  },
  "API_KEYS": {
    "BING": "<YOUR_BING_API_KEY>",
    "CLAUDE": "<YOUR_CLAUDE_API_KEY>",
    "NETLIFY": "<YOUR_NETLIFY_API_KEY>",
    "OPENAI": "<YOUR_OPENAI_API_KEY>"
  },
  "API_ENDPOINTS": {
    "BING": "https://api.bing.microsoft.com/v7.0/search"
  }
}

Get Settings

Endpoint: /api/get-settings
Method: GET

{
  "STORAGE": {
    "SQLITE_DB": "db/devika.db",
    "SCREENSHOTS_DIR": "screenshots",
    "PDFS_DIR": "pdfs",
    "PROJECTS_DIR": "projects",
    "LOGS_DIR": "logs",
    "REPOS_DIR": "repos"
  },
  "API_KEYS": {
    "BING": "<YOUR_BING_API_KEY>",
    "CLAUDE": "<YOUR_CLAUDE_API_KEY>",
    "NETLIFY": "<YOUR_NETLIFY_API_KEY>",
    "OPENAI": "<YOUR_OPENAI_API_KEY>"
  },
  "API_ENDPOINTS": {
    "BING": "https://api.bing.microsoft.com/v7.0/search"
  }
}

UI

Add the required form widgets for each of these configuration values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions