diff --git a/core/templates/core/settings.html b/core/templates/core/settings.html
new file mode 100644
index 0000000..7cbf739
--- /dev/null
+++ b/core/templates/core/settings.html
@@ -0,0 +1,11 @@
+{% extends 'base.html' %}
+{% load static %}
+
+{% block title %}Settings{% endblock %}
+
+{% block content %}
+
+
Settings
+
This is the settings page.
+
+{% endblock %}
diff --git a/core/urls.py b/core/urls.py
index 8e0d0ae..353e531 100644
--- a/core/urls.py
+++ b/core/urls.py
@@ -1,7 +1,9 @@
from django.urls import path
-from .views import index
+from .views import index, search, settings
urlpatterns = [
path("", index, name="index"),
+ path("search", search, name="search"),
+ path("settings", settings, name="settings"),
]
diff --git a/core/views.py b/core/views.py
index e523447..8ca9cf8 100644
--- a/core/views.py
+++ b/core/views.py
@@ -1,8 +1,49 @@
-from django.shortcuts import render
-
+from django.shortcuts import render, redirect
+from ai.local_ai_api import LocalAIApi
+import json
def index(request):
context = {
"project_name": "ComplianceShield",
}
return render(request, "core/index.html", context)
+
+def search(request):
+ if request.method == "POST":
+ query = request.POST.get("query", "")
+ if query:
+ response = LocalAIApi.create_response(
+ {
+ "input": [
+ {"role": "system", "content": "You are a helpful assistant."},
+ {"role": "user", "content": query},
+ ],
+ },
+ {
+ "poll_interval": 5, # seconds
+ "poll_timeout": 300, # seconds
+ },
+ )
+
+ if response.get("success"):
+ text = LocalAIApi.extract_text(response)
+ if not text:
+ decoded = LocalAIApi.decode_json_from_response(response)
+ text = json.dumps(decoded, ensure_ascii=False) if decoded else str(response.get("data", ""))
+ search_results = text
+ else:
+ search_results = "Error: Could not get a response from the AI."
+
+ context = {
+ "project_name": "ComplianceShield",
+ "search_results": search_results,
+ }
+ return render(request, "core/index.html", context)
+
+ return redirect("index")
+
+def settings(request):
+ context = {
+ "project_name": "ComplianceShield",
+ }
+ return render(request, "core/settings.html", context)
diff --git a/static/css/custom.css b/static/css/custom.css
index 10f05e3..f803382 100644
--- a/static/css/custom.css
+++ b/static/css/custom.css
@@ -51,4 +51,8 @@
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 18px 48px rgba(11,11,12,.10); }
- .drawer.hidden { display:none; }
\ No newline at end of file
+ .drawer.hidden { display:none; }
+
+ .search-bar {
+ border: 1px solid #000 !important;
+ }
\ No newline at end of file
diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css
index 10f05e3..f803382 100644
--- a/staticfiles/css/custom.css
+++ b/staticfiles/css/custom.css
@@ -51,4 +51,8 @@
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 18px 48px rgba(11,11,12,.10); }
- .drawer.hidden { display:none; }
\ No newline at end of file
+ .drawer.hidden { display:none; }
+
+ .search-bar {
+ border: 1px solid #000 !important;
+ }
\ No newline at end of file
diff --git a/staticfiles/pasted-20260102-044444-abfd6e7e.png b/staticfiles/pasted-20260102-044444-abfd6e7e.png
new file mode 100644
index 0000000..2e6b3fd
Binary files /dev/null and b/staticfiles/pasted-20260102-044444-abfd6e7e.png differ
diff --git a/staticfiles/pasted-20260103-013028-c48a4f62.png b/staticfiles/pasted-20260103-013028-c48a4f62.png
new file mode 100644
index 0000000..5df2796
Binary files /dev/null and b/staticfiles/pasted-20260103-013028-c48a4f62.png differ
diff --git a/staticfiles/pasted-20260103-014310-373c563f.png b/staticfiles/pasted-20260103-014310-373c563f.png
new file mode 100644
index 0000000..e181c6a
Binary files /dev/null and b/staticfiles/pasted-20260103-014310-373c563f.png differ
diff --git a/staticfiles/pasted-20260103-020327-3917de79.png b/staticfiles/pasted-20260103-020327-3917de79.png
new file mode 100644
index 0000000..ba787c8
Binary files /dev/null and b/staticfiles/pasted-20260103-020327-3917de79.png differ