From ab9969ab44ddd11cbabf02dd428f5490fb6ca325 Mon Sep 17 00:00:00 2001
From: kartik
Date: Sun, 12 Jul 2026 17:00:00 +0530
Subject: [PATCH 1/3] remove recent history
---
frontend/components/app-sidebar.tsx | 32 -----------------------------
1 file changed, 32 deletions(-)
diff --git a/frontend/components/app-sidebar.tsx b/frontend/components/app-sidebar.tsx
index 6822339..fcfe291 100644
--- a/frontend/components/app-sidebar.tsx
+++ b/frontend/components/app-sidebar.tsx
@@ -3,7 +3,6 @@
import { useEffect, useState } from "react";
import {
Search,
- History,
Sparkles,
FlaskConical,
LogOut,
@@ -33,14 +32,6 @@ import {
useSidebar,
} from "@/components/ui/sidebar";
-const historyItems = [
- "Calcium Biomodel Comparison",
- "Protein Details on Tutorial Models",
- "Biomodels authored by ModelBrick",
- "Count of Rule-based models",
- "VCML File Analysis of Calcium Models",
-];
-
interface BudgetInfo {
spend: number;
max_budget: number | null;
@@ -300,29 +291,6 @@ export function AppSidebar() {
-
- {!isCollapsed && (
- <>
-
-
-
-
- Recent History
-
-
-
- {historyItems.map((item, index) => (
-
-
- {item}
-
-
- ))}
-
-
-
- >
- )}
From a57b8f23de021bc56da129e9900f3b1525a1f900 Mon Sep 17 00:00:00 2001
From: kartik
Date: Sun, 12 Jul 2026 17:05:00 +0530
Subject: [PATCH 2/3] remove admin dashboard
---
frontend/app/admin/knowledge-base/page.tsx | 6 -
frontend/app/admin/page.tsx | 529 ---------------------
frontend/app/admin/settings/page.tsx | 9 -
frontend/components/app-sidebar.tsx | 14 -
4 files changed, 558 deletions(-)
delete mode 100644 frontend/app/admin/page.tsx
diff --git a/frontend/app/admin/knowledge-base/page.tsx b/frontend/app/admin/knowledge-base/page.tsx
index 10e2f72..5bbb7bd 100644
--- a/frontend/app/admin/knowledge-base/page.tsx
+++ b/frontend/app/admin/knowledge-base/page.tsx
@@ -210,12 +210,6 @@ export default function KnowledgeBasePage() {
>
Upload File
- window.open("/admin", "_blank")}
- className="inline-flex items-center gap-2 px-4 py-2 rounded border border-blue-600 text-blue-700 bg-white font-semibold shadow-sm transition-colors hover:bg-blue-50"
- >
- Back to Dashboard
-
diff --git a/frontend/app/admin/page.tsx b/frontend/app/admin/page.tsx
deleted file mode 100644
index 1f84add..0000000
--- a/frontend/app/admin/page.tsx
+++ /dev/null
@@ -1,529 +0,0 @@
-"use client";
-
-import { useEffect, useState } from "react";
-import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
-import { Button } from "@/components/ui/button";
-import { Badge } from "@/components/ui/badge";
-import { Input } from "@/components/ui/input";
-import {
- Users,
- MessageSquare,
- FileText,
- Shield,
- Settings,
- Trash2,
- Save,
- X,
-} from "lucide-react";
-
-interface User {
- id: string;
- name: string;
- email: string;
- role: "admin" | "user" | "moderator";
- status: "active" | "inactive" | "suspended";
- joinDate: string;
- lastActive: string;
- conversationsCount: number;
- filesCount: number;
- usedToken: number;
- monthlyTokenLimit: number;
-}
-
-interface DashboardStats {
- totalUsers: number;
- totalConversations: number;
- totalFiles: number;
- newUsersThisMonth: number;
- conversationsThisMonth: number;
- todaysConversations: number;
-}
-
-export default function AdminDashboard() {
- const [stats, setStats] = useState({
- totalUsers: 0,
- totalConversations: 0,
- totalFiles: 0,
- newUsersThisMonth: 0,
- conversationsThisMonth: 0,
- todaysConversations: 0,
- });
- const [users, setUsers] = useState([]);
- const [loading, setLoading] = useState(true);
- const [error, setError] = useState("");
- const [editingTokenLimit, setEditingTokenLimit] = useState(null);
- const [tempTokenLimit, setTempTokenLimit] = useState("");
-
- useEffect(() => {
- // Mock data - replace with actual API calls
- const fetchDashboardData = async () => {
- try {
- setLoading(true);
- // Simulate API delay
- await new Promise((resolve) => setTimeout(resolve, 1000));
-
- // Mock stats data
- setStats({
- totalUsers: 1247,
- totalConversations: 5678,
- totalFiles: 234,
- newUsersThisMonth: 45,
- conversationsThisMonth: 1234,
- todaysConversations: 156,
- });
-
- // Mock users data
- setUsers([
- {
- id: "1",
- name: "Michael Blinov",
- email: "michael.blinov@uchc.edu",
- role: "admin",
- status: "active",
- joinDate: "2024-01-15",
- lastActive: "2024-12-19T10:30:00Z",
- conversationsCount: 45,
- filesCount: 12,
- usedToken: 1200,
- monthlyTokenLimit: 10000,
- },
- {
- id: "2",
- name: "Jim Schaff",
- email: "jim.schaff@uchc.edu",
- role: "admin",
- status: "active",
- joinDate: "2024-02-20",
- lastActive: "2024-12-19T09:15:00Z",
- conversationsCount: 67,
- filesCount: 18,
- usedToken: 800,
- monthlyTokenLimit: 8000,
- },
- {
- id: "3",
- name: "Zeke",
- email: "zeke@uchc.edu",
- role: "admin",
- status: "active",
- joinDate: "2024-03-10",
- lastActive: "2024-12-18T16:45:00Z",
- conversationsCount: 34,
- filesCount: 8,
- usedToken: 500,
- monthlyTokenLimit: 5000,
- },
- {
- id: "4",
- name: "Kacem",
- email: "kacem.mathlouthi@insat.ucar.tn",
- role: "user",
- status: "active",
- joinDate: "2024-01-05",
- lastActive: "2024-12-10T14:20:00Z",
- conversationsCount: 23,
- filesCount: 5,
- usedToken: 300,
- monthlyTokenLimit: 3000,
- },
- {
- id: "5",
- name: "Sarah Chen",
- email: "sarah.chen@uchc.edu",
- role: "user",
- status: "active",
- joinDate: "2024-04-12",
- lastActive: "2024-12-15T11:30:00Z",
- conversationsCount: 15,
- filesCount: 3,
- usedToken: 200,
- monthlyTokenLimit: 2000,
- },
- {
- id: "6",
- name: "David Rodriguez",
- email: "david.rodriguez@uchc.edu",
- role: "user",
- status: "active",
- joinDate: "2024-05-08",
- lastActive: "2024-12-18T13:45:00Z",
- conversationsCount: 28,
- filesCount: 7,
- usedToken: 100,
- monthlyTokenLimit: 1000,
- },
- {
- id: "7",
- name: "Emily Watson",
- email: "emily.watson@uchc.edu",
- role: "user",
- status: "active",
- joinDate: "2024-06-15",
- lastActive: "2024-12-19T08:30:00Z",
- conversationsCount: 12,
- filesCount: 2,
- usedToken: 4500,
- monthlyTokenLimit: 500,
- },
- ]);
- } catch (err) {
- setError("Failed to load dashboard data");
- } finally {
- setLoading(false);
- }
- };
-
- fetchDashboardData();
- }, []);
-
- const getStatusBadge = (status: string) => {
- switch (status) {
- case "active":
- return (
-
- Active
-
- );
- case "inactive":
- return (
-
- Inactive
-
- );
- case "suspended":
- return (
-
- Suspended
-
- );
- default:
- return (
-
- {status}
-
- );
- }
- };
-
- const getRoleBadge = (role: string) => {
- switch (role) {
- case "admin":
- return (
-
- Admin
-
- );
- case "moderator":
- return (
-
- Moderator
-
- );
- case "user":
- return (
-
- User
-
- );
- default:
- return (
-
- {role}
-
- );
- }
- };
-
- const handleEditTokenLimit = (userId: string, currentLimit: number) => {
- setEditingTokenLimit(userId);
- setTempTokenLimit(currentLimit.toString());
- };
-
- const handleSaveTokenLimit = (userId: string) => {
- const newLimit = parseInt(tempTokenLimit);
- if (!isNaN(newLimit) && newLimit >= 0) {
- setUsers(users.map(user =>
- user.id === userId
- ? { ...user, monthlyTokenLimit: newLimit }
- : user
- ));
- }
- setEditingTokenLimit(null);
- setTempTokenLimit("");
- };
-
- const handleCancelEdit = () => {
- setEditingTokenLimit(null);
- setTempTokenLimit("");
- };
-
- const formatTokenCount = (count: number) => {
- if (count >= 1000000) {
- return `${(count / 1000000).toFixed(1)}M`;
- } else if (count >= 1000) {
- return `${(count / 1000).toFixed(1)}K`;
- }
- return count.toString();
- };
-
- if (loading)
- return Loading admin dashboard...
;
- if (error) return {error}
;
-
- return (
-
-
- {/* Header */}
-
-
-
-
-
- Admin Dashboard
-
-
- Manage users, conversations, and system resources
-
-
-
- window.open("/admin/knowledge-base", "_blank")}
- className="inline-flex items-center gap-2 px-4 py-2 rounded border border-green-600 text-green-700 bg-white font-semibold shadow-sm transition-colors hover:bg-green-50"
- >
- Knowledge Base
-
- window.open("/admin/settings", "_blank")}
- className="inline-flex items-center gap-2 px-4 py-2 rounded border border-blue-600 text-blue-700 bg-white font-semibold shadow-sm transition-colors hover:bg-blue-50"
- >
- Settings
-
-
-
-
-
- {/* Stats Cards */}
-
-
-
-
-
- Total Users
-
-
-
-
- {stats.totalUsers.toLocaleString()}
-
-
-
- +{stats.newUsersThisMonth}
- {" "}
- this month
-
-
-
-
-
-
-
-
- Total Conversations
-
-
-
-
- {stats.totalConversations.toLocaleString()}
-
-
-
- +{stats.conversationsThisMonth}
- {" "}
- this month
-
-
-
-
-
-
-
-
- Total Files
-
-
-
-
- {stats.totalFiles.toLocaleString()}
-
-
- +12 this week
-
-
-
-
-
-
-
-
- Today's Conversations
-
-
-
-
- {stats.todaysConversations.toLocaleString()}
-
-
- +12% from yesterday
-
-
-
-
-
- {/* Users Table */}
-
-
-
-
-
- User Management
-
-
-
-
-
-
-
-
-
- User
-
-
- Role
-
-
- Conversations
-
-
- Used Token
-
-
- Monthly Token Limit
-
-
- Date Joined
-
-
- Actions
-
-
-
-
- {users.map((user) => (
-
-
-
-
-
-
- {user.name
- .split(" ")
- .map((n) => n[0])
- .join("")}
-
-
-
-
-
- {user.name}
-
-
- {user.email}
-
-
-
-
-
- {getRoleBadge(user.role)}
-
-
- {user.conversationsCount}
-
-
-
-
{formatTokenCount(user.usedToken)}
-
-
-
-
- {editingTokenLimit === user.id ? (
-
- setTempTokenLimit(e.target.value)}
- className="w-20 h-8 text-sm"
- min="0"
- />
- handleSaveTokenLimit(user.id)}
- >
-
-
-
-
-
-
- ) : (
-
- {formatTokenCount(user.monthlyTokenLimit)}
- handleEditTokenLimit(user.id, user.monthlyTokenLimit)}
- title="Edit Token Limit"
- >
-
-
-
- )}
-
-
- {new Date(user.joinDate).toLocaleDateString()}
-
-
-
-
-
-
-
-
-
- ))}
-
-
-
-
-
-
-
- );
-}
diff --git a/frontend/app/admin/settings/page.tsx b/frontend/app/admin/settings/page.tsx
index 28fa6c7..9ee80f9 100644
--- a/frontend/app/admin/settings/page.tsx
+++ b/frontend/app/admin/settings/page.tsx
@@ -9,7 +9,6 @@ import {
Settings,
Shield,
Save,
- ArrowLeft,
CheckCircle,
AlertCircle,
Server,
@@ -131,14 +130,6 @@ export default function AdminSettingsPage() {
Configure LLM settings and preferences
-
-
window.open("/admin", "_blank")}
- className="inline-flex items-center gap-2 px-4 py-2 rounded border border-blue-600 text-blue-700 bg-white font-semibold shadow-sm transition-colors hover:bg-blue-50"
- >
- Back to Dashboard
-
-
diff --git a/frontend/components/app-sidebar.tsx b/frontend/components/app-sidebar.tsx
index fcfe291..40950d3 100644
--- a/frontend/components/app-sidebar.tsx
+++ b/frontend/components/app-sidebar.tsx
@@ -6,7 +6,6 @@ import {
Sparkles,
FlaskConical,
LogOut,
- Shield,
FolderOpen,
Settings,
} from "lucide-react";
@@ -259,19 +258,6 @@ export function AppSidebar() {
)}
-
-
-
-
- {!isCollapsed && Admin Dashboard }
-
-
-
Date: Sun, 12 Jul 2026 17:09:00 +0530
Subject: [PATCH 3/3] remove Configuration
---
frontend/app/admin/settings/page.tsx | 447 ---------------------------
frontend/components/app-sidebar.tsx | 30 --
2 files changed, 477 deletions(-)
delete mode 100644 frontend/app/admin/settings/page.tsx
diff --git a/frontend/app/admin/settings/page.tsx b/frontend/app/admin/settings/page.tsx
deleted file mode 100644
index 9ee80f9..0000000
--- a/frontend/app/admin/settings/page.tsx
+++ /dev/null
@@ -1,447 +0,0 @@
-"use client";
-
-import { useEffect, useState } from "react";
-import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
-import {
- Settings,
- Shield,
- Save,
- CheckCircle,
- AlertCircle,
- Server,
- Monitor,
- Copy,
- ExternalLink,
-} from "lucide-react";
-
-interface SystemSettings {
- modelProvider: string;
- modelName: string;
- apiKey: string;
- apiRateLimit: number;
-}
-
-interface LocalSettings {
- baseUrl: string;
- modelName: string;
- apiKey: string;
- port: number;
-}
-
-export default function AdminSettingsPage() {
- const [activeTab, setActiveTab] = useState("hosted");
- const [settings, setSettings] = useState({
- modelProvider: "Azure OpenAI",
- modelName: "gpt-4o-mini",
- apiKey: "sk-proj-1234567890",
- apiRateLimit: 1000000,
- });
- const [localSettings, setLocalSettings] = useState({
- baseUrl: "http://localhost:11434",
- modelName: "llama2",
- apiKey: "",
- port: 11434,
- });
- const [loading, setLoading] = useState(true);
- const [saving, setSaving] = useState(false);
- const [error, setError] = useState("");
- const [success, setSuccess] = useState("");
-
- useEffect(() => {
- // Mock data - replace with actual API calls
- const fetchSettings = async () => {
- try {
- setLoading(true);
- // Simulate API delay
- await new Promise((resolve) => setTimeout(resolve, 1000));
- // Settings are already initialized with default values
- } catch (err) {
- setError("Failed to load settings");
- } finally {
- setLoading(false);
- }
- };
-
- fetchSettings();
- }, []);
-
- const handleSaveSettings = async () => {
- setSaving(true);
- setError("");
- setSuccess("");
-
- try {
- // Simulate API call
- await new Promise((resolve) => setTimeout(resolve, 1500));
- setSuccess("Settings saved successfully!");
- } catch (err) {
- setError("Failed to save settings");
- } finally {
- setSaving(false);
- }
- };
-
- const handleSaveLocalSettings = async () => {
- setSaving(true);
- setError("");
- setSuccess("");
-
- try {
- // Simulate API call
- await new Promise((resolve) => setTimeout(resolve, 1500));
- setSuccess("Local settings saved successfully!");
- } catch (err) {
- setError("Failed to save local settings");
- } finally {
- setSaving(false);
- }
- };
-
- const handleInputChange = (field: keyof SystemSettings, value: any) => {
- setSettings((prev) => ({ ...prev, [field]: value }));
- };
-
- const handleLocalInputChange = (field: keyof LocalSettings, value: any) => {
- setLocalSettings((prev) => ({ ...prev, [field]: value }));
- };
-
- const copyToClipboard = (text: string) => {
- navigator.clipboard.writeText(text);
- };
-
- if (loading)
- return Loading settings...
;
-
- return (
-
-
- {/* Header */}
-
-
-
-
-
- Admin Settings
-
-
- Configure LLM settings and preferences
-
-
-
-
-
- {/* Success/Error Messages */}
- {success && (
-
-
- {success}
-
- )}
- {error && (
-
- )}
-
- {/* Tabs */}
-
-
-
-
- Hosted Settings
-
-
-
- Local Settings
-
-
-
- {/* Hosted Settings Tab */}
-
-
-
-
-
- Hosted LLM Settings
-
-
-
-
-
- Model Provider
-
-
- handleInputChange("modelProvider", e.target.value)
- }
- className="w-full"
- />
-
-
-
-
- Model Name
-
-
- handleInputChange("modelName", e.target.value)
- }
- className="w-full"
- />
-
-
-
-
- API Key
-
-
- handleInputChange("apiKey", e.target.value)
- }
- className="w-full"
- placeholder="Enter your API key"
- />
-
-
-
-
- Monthly Token Limit
-
-
- handleInputChange("apiRateLimit", parseInt(e.target.value))
- }
- className="w-full"
- placeholder="e.g., 1000000 for 1M tokens"
- />
-
- This applies to all users. To set a specific limit for a certain user, go to the admin dashboard and set it manually there.
-
-
-
-
-
- {" "}
- {saving ? "Saving..." : "Save Hosted Settings"}
-
-
-
-
-
-
- {/* Local Settings Tab */}
-
-
- {/* Setup Guide */}
-
-
-
-
- Local Setup Guide
-
-
-
-
-
-
-
-
-
-
- This is a guide to setup this platform locally on your machine and use your own LLM for unlimited usage.
- Follow the steps below to get started with your local deployment.
-
-
- For more details, check https://github.com/KacemMathlouthi/VCell-GSoC
-
-
-
-
-
-
-
Step 1: Clone the Repository
-
-
- git clone https://github.com/KacemMathlouthi/VCell-GSoC.git
-
- copyToClipboard("git clone https://github.com/KacemMathlouthi/VCell-GSoC.git")}
- size="sm"
- variant="outline"
- >
-
-
-
-
-
-
-
Step 2: Configure Environment Variables
-
Configure the .env files following the .env.example in both frontend and backend folders
-
-
-{`# Frontend .env
-cp frontend/.env.example frontend/.env
-# Backend .env
-cp backend/.env.example backend/.env`}
-
-
copyToClipboard("cp frontend/.env.example frontend/.env && cp backend/.env.example backend/.env")}
- size="sm"
- variant="outline"
- >
-
-
-
-
-
-
-
Step 3: Start the Application
-
-
- docker compose up --build -d
-
- copyToClipboard("docker compose up --build -d")}
- size="sm"
- variant="outline"
- >
-
-
-
-
-
-
-
Step 4: Access the Application
-
Once running, access this page at:
-
-
- http://localhost:3000/admin/settings
-
- window.open("http://localhost:3000/admin/settings", "_blank")}
- size="sm"
- variant="outline"
- >
-
-
-
-
-
-
-
- {/* Local Settings Form */}
-
-
-
-
- Local LLM Configuration
-
-
-
-
-
- Base URL
-
-
- handleLocalInputChange("baseUrl", e.target.value)
- }
- className="w-full"
- placeholder="http://localhost:11434"
- />
-
- URL of your local LLM server (e.g., Ollama, LM Studio)
-
-
-
-
-
- Model Name
-
-
- handleLocalInputChange("modelName", e.target.value)
- }
- className="w-full"
- placeholder="llama2"
- />
-
- Name of the model you have loaded locally
-
-
-
-
-
- API Key (Optional)
-
-
- handleLocalInputChange("apiKey", e.target.value)
- }
- className="w-full"
- placeholder="Leave empty if no authentication required"
- />
-
- API key if your local server requires authentication
-
-
-
-
-
- Port
-
-
- handleLocalInputChange("port", parseInt(e.target.value))
- }
- className="w-full"
- placeholder="11434"
- />
-
- Port number of your local LLM server
-
-
-
-
-
- {" "}
- {saving ? "Saving..." : "Save Local Settings"}
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/frontend/components/app-sidebar.tsx b/frontend/components/app-sidebar.tsx
index 40950d3..f664e09 100644
--- a/frontend/components/app-sidebar.tsx
+++ b/frontend/components/app-sidebar.tsx
@@ -7,7 +7,6 @@ import {
FlaskConical,
LogOut,
FolderOpen,
- Settings,
} from "lucide-react";
import Link from "next/link";
import { usePathname } from "next/navigation";
@@ -218,35 +217,6 @@ export function AppSidebar() {
- {/* Configuration Section */}
-
- {!isCollapsed && (
-
- Configuration
-
- )}
-
-
-
-
-
-
- {!isCollapsed && Settings }
-
-
-
-
-
-
-
{/* Admin Section */}