Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

feat: custom svg icons

dextmorgn8fea6ebdd563
diff --git a/flowsint-api/app/scanners/orchestrator.py b/flowsint-api/app/scanners/orchestrator.py
index 81274cb8..98fed027 100644
--- a/flowsint-api/app/scanners/orchestrator.py
+++ b/flowsint-api/app/scanners/orchestrator.py
@@ -7,8 +7,6 @@ from app.scanners.base import Scanner
from app.scanners.registry import ScannerRegistry
from app.types.transform import FlowBranch, FlowStep
from app.core.logger import Logger
-from app.tasks.event import emit_event_task
-from app.core.enums import EventLevel
import asyncio
import json
diff --git a/flowsint-api/app/scanners/registry.py b/flowsint-api/app/scanners/registry.py
index 0cc23cea..5c0ac685 100644
--- a/flowsint-api/app/scanners/registry.py
+++ b/flowsint-api/app/scanners/registry.py
@@ -18,6 +18,7 @@ from app.scanners.crypto.wallet_to_transactions import WalletAddressToTransactio
from app.scanners.crypto.wallet_to_nfts import WalletAddressToNFTs
from app.scanners.domains.to_website import DomainToWebsiteScanner
from app.scanners.websites.to_crawler import WebsiteToCrawler
+from app.scanners.websites.to_domain import WebsiteToDomainScanner
class ScannerRegistry:
_scanners: Dict[str, Type[Scanner]] = {}
@@ -85,4 +86,5 @@ ScannerRegistry.register(DomainToAsnScanner)
ScannerRegistry.register(WalletAddressToTransactions)
ScannerRegistry.register(WalletAddressToNFTs)
ScannerRegistry.register(DomainToWebsiteScanner)
-ScannerRegistry.register(WebsiteToCrawler)
\ No newline at end of file
+ScannerRegistry.register(WebsiteToCrawler)
+ScannerRegistry.register(WebsiteToDomainScanner)
\ No newline at end of file
diff --git a/flowsint-api/app/scanners/websites/to_crawler.py b/flowsint-api/app/scanners/websites/to_crawler.py
index 73ae65af..a39ec997 100644
--- a/flowsint-api/app/scanners/websites/to_crawler.py
+++ b/flowsint-api/app/scanners/websites/to_crawler.py
@@ -55,6 +55,45 @@ def remove_dup_individual(individuals):
return unique_individuals
+def get_email_from_mailto(html):
+ """Extract emails from mailto links in HTML content."""
+ try:
+ emails = []
+
+ # First, try to extract mailto patterns from the entire content (works for any format)
+ mailto_pattern = r'mailto:([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,})'
+ mailto_matches = re.findall(mailto_pattern, html, re.IGNORECASE)
+ for email in mailto_matches:
+ email_clean = email.strip()
+ if len(email_clean) <= 100:
+ emails.append(email_clean)
+
+ # If it looks like HTML, also try to parse it with BeautifulSoup for more structured extraction
+ if '<' in html and '>' in html:
+ try:
+ soup = BeautifulSoup(html, 'lxml')
+ # Find all anchor tags with mailto href
+ mailto_links = soup.find_all('a', href=re.compile(r'^mailto:', re.IGNORECASE))
+
+ for link in mailto_links:
+ href = link.get('href', '')
+ # Extract email from mailto:[email protected]
+ email_match = re.search(r'^mailto:([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,})', href, re.IGNORECASE)
+ if email_match:
+ email = email_match.group(1).strip()
+ if len(email) <= 100:
+ emails.append(email)
+ except Exception:
+ # If BeautifulSoup parsing fails, we already have the regex results
+ pass
+
+ # Remove duplicates while preserving order
+ return remove_dup_email(emails)
+
+ except Exception:
+ return []
+
+
def get_email(html):
"""Extract emails from HTML content."""
try:
@@ -325,8 +364,11 @@ class WebsiteToCrawler(Scanner):
soup = BeautifulSoup(html_content, 'lxml', from_encoding=response.encoding)
visible_text = soup.get_text(separator=' ')
- # Extract emails, phones, and individuals from this page
- page_emails = get_email(visible_text)
+ # Extract emails from both HTML content (for mailto links) and visible text (for regular patterns)
+ page_emails_from_text = get_email(visible_text)
+ page_emails_from_mailto = get_email_from_mailto(html_content)
+ page_emails = remove_dup_email(page_emails_from_text + page_emails_from_mailto)
+
page_phones = get_phone(visible_text)
# page_individuals = get_individuals(visible_text)
diff --git a/flowsint-api/app/scanners/websites/to_domain.py b/flowsint-api/app/scanners/websites/to_domain.py
new file mode 100644
index 00000000..24cdd685
--- /dev/null
+++ b/flowsint-api/app/scanners/websites/to_domain.py
@@ -0,0 +1,142 @@
+from typing import List, Dict, Any, TypeAlias, Union
+from urllib.parse import urlparse
+from app.utils import resolve_type
+from app.scanners.base import Scanner
+from app.types.website import Website
+from app.types.domain import Domain
+from pydantic import TypeAdapter
+from app.core.logger import Logger
+
+InputType: TypeAlias = List[Website]
+OutputType: TypeAlias = List[Domain]
+
+
+class WebsiteToDomainScanner(Scanner):
+ """From website to domain."""
+
+ @classmethod
+ def name(cls) -> str:
+ return "to_domain"
+
+ @classmethod
+ def category(cls) -> str:
+ return "Website"
+
+ @classmethod
+ def key(cls) -> str:
+ return "website"
+
+ @classmethod
+ def input_schema(cls) -> Dict[str, Any]:
+ adapter = TypeAdapter(InputType)
+ schema = adapter.json_schema()
+ # Find the Website type in $defs
+ website_def = schema["$defs"].get("Website")
+ if not website_def:
+ raise ValueError("Website type not found in schema")
+ return {
+ "type": "Website",
+ "properties": [
+ {"name": prop, "type": resolve_type(info, schema)}
+ for prop, info in website_def["properties"].items()
+ ]
+ }
+
+
+ @classmethod
+ def output_schema(cls) -> Dict[str, Any]:
+ adapter = TypeAdapter(OutputType)
+ schema = adapter.json_schema()
+ # Find the Domain type in $defs
+ domain_def = schema["$defs"].get("Domain")
+ if not domain_def:
+ raise ValueError("Domain type not found in schema")
+ return {
+ "type": "Domain",
+ "properties": [
+ {"name": prop, "type": resolve_type(info, schema)}
+ for prop, info in domain_def["properties"].items()
+ ]
+ }
+
+ def preprocess(self, data: Union[List[str], List[dict], InputType]) -> InputType:
+ cleaned: InputType = []
+ for item in data:
+ website_obj = None
+ if isinstance(item, str):
+ # If it's a string, treat it as a URL
+ website_obj = Website(url=item)
+ elif isinstance(item, dict) and "url" in item:
+ website_obj = Website(**item)
+ elif isinstance(item, Website):
+ website_obj = item
+ if website_obj:
+ cleaned.append(website_obj)
+ return cleaned
+
+ def __extract_domain_from_url(self, url: str) -> str:
+ """Extract domain from URL."""
+ try:
+ parsed = urlparse(str(url))
+ domain = parsed.netloc
+ # Remove port if present
+ if ':' in domain:
+ domain = domain.split(':')[0]
+ return domain
+ except Exception:
+ return ""
+
+ def scan(self, data: InputType) -> OutputType:
+ """Extract domain from website."""
+ results: OutputType = []
+ for website in data:
+ try:
+ # Extract domain from the website URL
+ domain_name = self.__extract_domain_from_url(website.url)
+ if domain_name:
+ domain = Domain(domain=domain_name)
+ results.append(domain)
+ except Exception as e:
+ print(f"Error processing website {website.url}: {e}")
+ continue
+
+ return results
+
+ def postprocess(self, results: OutputType, original_input: InputType) -> OutputType:
+ for i, domain in enumerate(results):
+ website = original_input[i] if i < len(original_input) else None
+
+ query = """
+ MERGE (d:domain {domain: $domain})
+ SET d.sketch_id = $sketch_id,
+ d.label = $domain,
+ d.type = "domain"
+ """
+ if website:
+ query += """
+ MERGE (w:website {url: $url})
+ SET w.sketch_id = $sketch_id,
+ w.label = $label,
+ w.type = "website"
+ MERGE (w)-[:HAS_DOMAIN {sketch_id: $sketch_id}]->(d)
+ """
+
+ if self.neo4j_conn:
+ params = {
+ "domain": domain.domain,
+ "sketch_id": self.sketch_id,
+ }
+ if website:
+ params.update({
+ "url": str(website.url),
+ "label": str(website.url),
+ })
+ self.neo4j_conn.query(query, params)
+
+ website_url = str(website.url) if website else "unknown"
+ payload: Dict = {
+ "message": f"{website_url} -> {domain.domain}"
+ }
+ Logger.graph_append(self.sketch_id, payload)
+
+ return results
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/index.html b/flowsint-app/src/renderer/index.html
index 153b424e..c41e6577 100644
--- a/flowsint-app/src/renderer/index.html
+++ b/flowsint-app/src/renderer/index.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html lang="en" theme="dark">
<head>
- <script
+ <!-- <script
crossOrigin="anonymous"
src="//unpkg.com/react-scan/dist/auto.global.js"
>
- </script>
+ </script> -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/flowsint-app/src/renderer/public/icons/location.svg b/flowsint-app/src/renderer/public/icons/location.svg
new file mode 100644
index 00000000..9bcb7cbc
--- /dev/null
+++ b/flowsint-app/src/renderer/public/icons/location.svg
@@ -0,0 +1 @@
+<?xml version="1.0" ?><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title/><g id="location"><path fill="#EAAFAF" d="M12,2C8.13,2,5,5.13,5,9c0,5.25,7,13,7,13s7-7.75,7-13C19,5.13,15.87,2,12,2z M12,11.5c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5S13.38,11.5,12,11.5z"/></g></svg>
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/public/icons/vehicle.svg b/flowsint-app/src/renderer/public/icons/vehicle.svg
new file mode 100644
index 00000000..b04c7576
--- /dev/null
+++ b/flowsint-app/src/renderer/public/icons/vehicle.svg
@@ -0,0 +1 @@
+<?xml version="1.0" ?><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title/><g id="vehicle"><path fill="#8B5CF6" d="M18.92,6.01C18.72,5.42,18.16,5,17.5,5h-11C5.84,5,5.28,5.42,5.08,6.01L3,12v8c0,0.55,0.45,1,1,1h1c0.55,0,1-0.45,1-1v-1h12v1c0,0.55,0.45,1,1,1h1c0.55,0,1-0.45,1-1v-8L18.92,6.01z M6.5,16C5.67,16,5,15.33,5,14.5S5.67,13,6.5,13S8,13.67,8,14.5S7.33,16,6.5,16z M17.5,16c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5S18.33,16,17.5,16z M5,11l1.5-4.5h11L19,11H5z"/></g></svg>
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsx b/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsx
index 273b57b7..bff31e9d 100644
--- a/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsx
+++ b/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsx
@@ -263,17 +263,17 @@ export const AnalysisEditor = ({
</Button>
</div>
</PopoverTrigger>
- <PopoverContent className="w-[200px] p-0" align="start">
- <div className="flex flex-col">
+ <PopoverContent className="w-[200px] truncate text-ellipsis p-0" align="start">
+ <div className="flex flex-col truncate text-ellipsis">
{analyses.map((analysisItem) => (
<Button
key={analysisItem.id}
variant="ghost"
- className="justify-start px-2 py-1.5 h-auto"
+ className="justify-start px-2 py-1.5 h-auto truncate text-ellipsis"
onClick={() => onAnalysisSelect?.(analysisItem.id)}
>
- <div className="flex flex-col items-start">
- <span className="font-medium">{analysisItem.title || "Untitled"}</span>
+ <div className="flex flex-col items-start truncate text-ellipsis">
+ <span className="font-medium truncate text-ellipsis">{analysisItem.title || "Untitled"}</span>
<span className="text-xs text-muted-foreground">
{analysisItem.id === currentAnalysisId ? "Current" : "Switch to this analysis"}
</span>
diff --git a/flowsint-app/src/renderer/src/components/graphs/draggable-item.tsx b/flowsint-app/src/renderer/src/components/graphs/draggable-item.tsx
index 8ea36c03..91e382af 100644
--- a/flowsint-app/src/renderer/src/components/graphs/draggable-item.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/draggable-item.tsx
@@ -1,16 +1,15 @@
"use client"
-import type { LucideIcon } from "lucide-react"
-import { GripVertical } from "lucide-react"
import { memo, useState } from "react"
import { IconContainer } from "@/components/icon-container"
import { useGraphStore } from "@/stores/graph-store"
import { cn } from "@/lib/utils"
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"
+import { useNodesDisplaySettings } from "@/stores/node-display-settings"
interface DraggableItemProps {
label: string
- icon: LucideIcon
+ icon: string
type: string
color?: string
disabled?: boolean
@@ -29,6 +28,8 @@ export const DraggableItem = memo(function DraggableItem({
}: DraggableItemProps) {
const handleOpenFormModal = useGraphStore((s) => s.handleOpenFormModal)
const [isDragging, setIsDragging] = useState(false)
+ const colors = useNodesDisplaySettings((s) => s.colors)
+ const colorStr = colors[icon as string] || color
const handleDragStart = (e: React.DragEvent<HTMLButtonElement>) => {
const itemData = JSON.stringify({ label, type, color, description, itemKey })
@@ -62,10 +63,10 @@ export const DraggableItem = memo(function DraggableItem({
"cursor-grab": !disabled,
}
)}
- style={{ borderLeftColor: color }}
+ style={{ borderLeftColor: colorStr }}
>
<div className="flex justify-center items-center bg-background w-full text-left h-20 border rounded-lg">
- <IconContainer size={18} icon={icon} color={color} type={type} />
+ <IconContainer size={22} icon={icon} color={colorStr} type={type} />
</div>
<div className="space-y-1 truncate flex-1">
<h3 className="text-xs font-normal opacity-60 truncate">{label}</h3>
diff --git a/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx b/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx
index 3ad4ac2f..9fae0f28 100644
--- a/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx
@@ -118,14 +118,22 @@ const GraphPanel = ({ graphData, isLoading, isRefetching }: GraphPanelProps) =>
</div>
</div>
}>
- {nodes?.length > 500 ? (
+ {/* {nodes?.length > 500 ? (
+ <Graph />
+ ) : nodes?.length > 500 ? (
view === "force3d" ? <GraphReactForce3D /> : <GraphReactForce />
) : (
view === "force3d" ? <GraphReactForce3D /> :
view === "force" ? <GraphReactForce /> :
<WallEditor isRefetching={isRefetching} isLoading={loading} />
- )}
+ )} */}
{/* <Graph /> */}
+ {nodes?.length > 500 ? (
+ <Graph />
+ ) : (
+ view === "force" ? <GraphReactForce /> :
+ <WallEditor isRefetching={isRefetching} isLoading={loading} />
+ )}
</Suspense>
{/* <Graph /> */}
{/* <GraphSigma /> */}
diff --git a/flowsint-app/src/renderer/src/components/graphs/new-actions.tsx b/flowsint-app/src/renderer/src/components/graphs/new-actions.tsx
index 2e5eba1a..9f1b4940 100644
--- a/flowsint-app/src/renderer/src/components/graphs/new-actions.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/new-actions.tsx
@@ -17,6 +17,7 @@ import { useGraphStore } from "@/stores/graph-store"
import { DialogTrigger } from "@radix-ui/react-dialog"
import { sketchService } from "@/api/sketch-service"
import { useParams } from "@tanstack/react-router"
+import { useIcon } from "@/hooks/use-icon"
interface ActionDialogProps {
children: React.ReactNode
@@ -152,7 +153,7 @@ interface ActionCardProps {
}
function ActionCard({ item, onSelect }: ActionCardProps) {
- const Icon = item.icon
+ const IconComponent = useIcon(item.icon)
return (
<Card
@@ -168,7 +169,7 @@ function ActionCard({ item, onSelect }: ActionCardProps) {
className="w-8 h-8 rounded-full flex items-center justify-center mb-3 mt-2"
style={{ backgroundColor: item.color ? `${item.color}20` : "var(--primary-20)" }}
>
- <Icon style={{ color: item.color }} className={cn("h-6 w-6 opacity-60", item.color ? "" : "text-primary")} />
+ <IconComponent style={{ color: item.color }} className={cn("h-6 w-6 opacity-60", item.color ? "" : "text-primary")} />
</div>
<div className="font-medium text-sm">{item.label}</div>
<div className="text-sm mt-2 opacity-60">{item.fields.map((n) => n.name).join(", ")}</div>
diff --git a/flowsint-app/src/renderer/src/components/graphs/new-sketch.tsx b/flowsint-app/src/renderer/src/components/graphs/new-sketch.tsx
index 638bc51b..feaf26a8 100644
--- a/flowsint-app/src/renderer/src/components/graphs/new-sketch.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/new-sketch.tsx
@@ -61,12 +61,12 @@ export default function NewSketch({
const result = await sketchService.create(JSON.stringify(payload))
if (result.id) {
+ setOpen(false)
toast.success("New sketch created.")
router.navigate({
to: `/dashboard/investigations/${investigationId}/graph/${result.id}`,
})
reset()
- setOpen(false)
} else {
toast.error(result.error || "Failed to create sketch.")
}
diff --git a/flowsint-app/src/renderer/src/components/graphs/toolbar.tsx b/flowsint-app/src/renderer/src/components/graphs/toolbar.tsx
index f68f79e2..d440d857 100644
--- a/flowsint-app/src/renderer/src/components/graphs/toolbar.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/toolbar.tsx
@@ -103,24 +103,30 @@ export const Toolbar = memo(function Toolbar({ isLoading }: { isLoading: boolean
const isMoreThanZero = selectedNodes.length > 0
const isTwo = selectedNodes.length == 2
const isGraphOnly = nodesLength > 500
+ const isCosmoOnly = nodesLength > 3000
const handleForceLayout = useCallback(() => {
setView("force")
}, [setView])
- const handleForce3DLayout = useCallback(() => {
- setView("force3d")
- }, [setView])
+ // const handleForce3DLayout = useCallback(() => {
+ // setView("force3d")
+ // }, [setView])
+
+ const handleDagreLayoutTB = useCallback(() => {
+ setView("hierarchy")
+ onLayout && onLayout("dagre-tb")
+ }, [onLayout, setView])
- const handleDagreLayout = useCallback(() => {
+ const handleDagreLayoutLR = useCallback(() => {
setView("hierarchy")
- onLayout && onLayout("dagre")
+ onLayout && onLayout("dagre-lr")
}, [onLayout, setView])
const { isMac } = useKeyboardShortcut({
key: "y",
ctrlOrCmd: true,
- callback: handleDagreLayout
+ callback: handleDagreLayoutTB
})
return (
@@ -156,21 +162,30 @@ export const Toolbar = memo(function Toolbar({ isLoading }: { isLoading: boolean
onClick={zoomToFit}
/>
<ToolbarButton
- icon={<GitFork className="h-4 w-4 opacity-70" />}
+ icon={<GitFork className="h-4 w-4 opacity-70 rotate-180" />}
tooltip={isGraphOnly ? "Graph is too large to render in hierarchy layout" : `Hierarchy (${isMac ? '⌘' : 'ctrl'}+Y)`}
- onClick={handleDagreLayout}
+ onClick={handleDagreLayoutTB}
+ disabled={isGraphOnly}
+ />
+ <ToolbarButton
+ icon={<GitFork className="h-4 w-4 opacity-70 rotate-90" />}
+ tooltip={isGraphOnly ? "Graph is too large to render in hierarchy layout" : `Hierarchy (${isMac ? '⌘' : 'ctrl'}+Y)`}
+ onClick={handleDagreLayoutLR}
disabled={isGraphOnly}
/>
<ToolbarButton
icon={<Waypoints className="h-4 w-4 opacity-70" />}
tooltip={"Graph"}
onClick={handleForceLayout}
+ disabled={isCosmoOnly}
/>
- <ToolbarButton
+
+ {/* <ToolbarButton
icon={<Rotate3D className="h-4 w-4 opacity-70" />}
tooltip={"3D Graph"}
onClick={handleForce3DLayout}
- />
+ disabled={isCosmoOnly}
+ /> */}
{/* <ToolbarButton onClick={toggleSettings} icon={<Settings className="h-4 w-4 opacity-70" />} tooltip="Settings" /> */}
<ToolbarButton
onClick={handleRefresh}
diff --git a/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx b/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx
index b0c02cd7..ca3ef5fe 100644
--- a/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx
@@ -60,6 +60,18 @@ export const CustomNode = memo(({ data, selected, id }: NodeProps) => {
id="bottom"
className="opacity-0"
/>
+ <Handle
+ type="source"
+ position={Position.Left}
+ id="left"
+ className="opacity-0"
+ />
+ <Handle
+ type="target"
+ position={Position.Right}
+ id="right"
+ className="opacity-0"
+ />
<div style={{ width: size, height: size, borderColor: (selected || isCurrent(id)) ? "#f97316" : color }} className="!rounded-full gap-0 flex items-center justify-center border-2 border-primary/70 p-1 overflow-hidden">
<img
src={iconUrl}
diff --git a/flowsint-app/src/renderer/src/components/graphs/wall/wall.tsx b/flowsint-app/src/renderer/src/components/graphs/wall/wall.tsx
index ffaa57a3..305e1ef0 100644
--- a/flowsint-app/src/renderer/src/components/graphs/wall/wall.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/wall/wall.tsx
@@ -162,16 +162,22 @@ const Wall = memo(({ theme, edges }: { theme: ColorMode, edges: GraphEdge[] }) =
setMenu(null)
}, [setCurrentNode, clearSelectedNodes, setMenu])
- const onLayout = useCallback((type: "dagre" | "force") => {
+ const onLayout = useCallback((type: "dagre-tb" | "dagre-lr" | "force") => {
// Wait for nodes to be measured before running layout
setTimeout(() => {
let layouted: any;
- if (type === "dagre") {
+ if (type === "dagre-tb") {
layouted = getDagreLayoutedElements(
nodes,
edges,
{ direction: "TB" }
);
+ } else if (type === "dagre-lr") {
+ layouted = getDagreLayoutedElements(
+ nodes,
+ edges,
+ { direction: "LR" }
+ );
} else {
layouted = getForceLayoutedElements(
nodes,
@@ -195,7 +201,7 @@ const Wall = memo(({ theme, edges }: { theme: ColorMode, edges: GraphEdge[] }) =
// Run dagre layout on first render
useEffect(() => {
if (reactFlowInstance && nodes.length) {
- onLayout("dagre")
+ onLayout("dagre-tb")
}
}, [reactFlowInstance, nodes.length])
diff --git a/flowsint-app/src/renderer/src/components/icon-container.tsx b/flowsint-app/src/renderer/src/components/icon-container.tsx
index 5299b096..8216c73a 100644
--- a/flowsint-app/src/renderer/src/components/icon-container.tsx
+++ b/flowsint-app/src/renderer/src/components/icon-container.tsx
@@ -1,6 +1,7 @@
import { useNodesDisplaySettings } from "@/stores/node-display-settings"
import type { LucideIcon } from "lucide-react"
import { useMemo } from "react"
+import { useIcon } from "@/hooks/use-icon"
// Helper function to convert hex to rgba
const hexToRgba = (hex: string, alpha: number) => {
@@ -12,16 +13,37 @@ const hexToRgba = (hex: string, alpha: number) => {
interface IconContainerProps {
type: string
- icon: LucideIcon
+ icon: LucideIcon | string
size?: number
color?: string
}
-export function IconContainer({ type, color, icon: Icon, size = 12 }: IconContainerProps) {
+export function IconContainer({ type, color, icon, size = 12 }: IconContainerProps) {
const containerSize = size + 16 // Make container slightly larger than icon
const col = color ? color : useNodesDisplaySettings((state) => state.colors[type as keyof typeof state.colors] || "#000000")
const bgColor = useMemo(() => hexToRgba(col, 0.3), [color])
+ // Handle string-based SVG icons
+ if (typeof icon === 'string') {
+ const IconComponent = useIcon(icon)
+ return (
+ <div>
+ <div
+ style={{
+ border: `${size / 8}px solid ${bgColor}`,
+ width: `${containerSize}px`,
+ height: `${containerSize}px`,
+ }}
+ className="flex bg-card items-center justify-center rounded-full"
+ >
+ <IconComponent size={size} className="text-foreground" />
+ </div>
+ </div>
+ )
+ }
+
+ // Handle LucideIcon components (for backward compatibility)
+ const Icon = icon as LucideIcon
return (
<div>
<div
diff --git a/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx b/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx
index 9e8b2fbe..1284f245 100644
--- a/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx
+++ b/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx
@@ -56,7 +56,7 @@ export const SketchListItem = ({ sketch, investigationId, refetch }: { sketch: S
"flex items-center gap-2 px-3 py-2",
isActive ? "bg-muted" : "hover:bg-muted/50"
)}>
- <Waypoints className="h-4 w-4 text-primary" />
+ <Waypoints className="h-4 w-4 text-primary opacity-70" strokeWidth={1.5} />
<span className="flex-1 text-sm truncate">{sketch.title}</span>
<DropdownMenu>
<DropdownMenuTrigger asChild>
diff --git a/flowsint-app/src/renderer/src/components/investigations/new-investigation.tsx b/flowsint-app/src/renderer/src/components/investigations/new-investigation.tsx
index 39fc4ec4..e681fb6b 100644
--- a/flowsint-app/src/renderer/src/components/investigations/new-investigation.tsx
+++ b/flowsint-app/src/renderer/src/components/investigations/new-investigation.tsx
@@ -64,11 +64,10 @@ export default function NewInvestigation({ children, noDropDown }: NewInvestigat
const onSubmit = async (data: InvestigationFormData) => {
try {
const result = await investigationService.create(JSON.stringify(data))
- console.log(result)
if (result.id) {
+ handleClose()
toast.success("New investigation created.")
router.navigate({ to: `/dashboard/investigations/${result.id}` })
- handleClose()
} else {
toast.error(result.error || "Failed to create investigation")
}
diff --git a/flowsint-app/src/renderer/src/components/layout/investigation-selector.tsx b/flowsint-app/src/renderer/src/components/layout/investigation-selector.tsx
index 338b3d67..c9d3e57c 100644
--- a/flowsint-app/src/renderer/src/components/layout/investigation-selector.tsx
+++ b/flowsint-app/src/renderer/src/components/layout/investigation-selector.tsx
@@ -88,21 +88,19 @@ export default function InvestigationSelector() {
<span className="text-left truncate">{investigation.name}</span>
</Button>
))}
-
- {/* Separator and Create New Investigation */}
- <Separator className="my-0.5" />
- <div className="py-0.5">
- <NewInvestigation noDropDown={true}>
- <Button
- variant="ghost"
- size="sm"
- className="w-full justify-start gap-2 h-auto py-1.5 px-2 rounded-none hover:bg-accent text-muted-foreground hover:text-foreground text-sm"
- >
- <Plus className="w-4 h-4" />
- <span className="text-left truncate">Create new investigation</span>
- </Button>
- </NewInvestigation>
- </div>
+ </div>
+ <Separator className="my-0.5" />
+ <div className="py-0.5">
+ <NewInvestigation noDropDown={true}>
+ <Button
+ variant="ghost"
+ size="sm"
+ className="w-full justify-start gap-2 h-auto py-1.5 px-2 rounded-none hover:bg-accent text-muted-foreground hover:text-foreground text-sm"
+ >
+ <Plus className="w-4 h-4" />
+ <span className="text-left truncate">Create new investigation</span>
+ </Button>
+ </NewInvestigation>
</div>
</PopoverContent>
</Popover>}
diff --git a/flowsint-app/src/renderer/src/components/layout/log-panel.tsx b/flowsint-app/src/renderer/src/components/layout/log-panel.tsx
index 7a09b589..df7eb5c8 100644
--- a/flowsint-app/src/renderer/src/components/layout/log-panel.tsx
+++ b/flowsint-app/src/renderer/src/components/layout/log-panel.tsx
@@ -24,7 +24,7 @@ import { CopyButton } from "../copy"
import { EventLevel } from "@/types"
import { cn } from "@/lib/utils"
import { Button } from "../ui/button"
-import { type Event } from "@/types"
+import { useEvents } from "@/hooks/use-events"
const logLevelConfig = {
[EventLevel.INFO]: {
@@ -100,11 +100,13 @@ const defaultConfig = {
emoji: "📝",
}
-export function LogPanel({ logs, refetch }: { logs: Event[], refetch: () => void }) {
+export function LogPanel() {
const { id: sketch_id } = useParams({ strict: false })
const { confirm } = useConfirm()
const bottomRef = useRef<HTMLDivElement | null>(null)
const scrollAreaRef = useRef<HTMLDivElement>(null)
+ const { logs, refetch } = useEvents(sketch_id as string)
+
useEffect(() => {
if (bottomRef.current) {
@@ -137,7 +139,7 @@ export function LogPanel({ logs, refetch }: { logs: Event[], refetch: () => void
return (
<div className="h-full bg-background overflow-hidden flex flex-col relative">
<ScrollArea className="flex-1 h-full" ref={scrollAreaRef}>
- <div className="font-mono text-sm h-full">
+ <div className="text-sm h-full">
{logs.length === 0 ? (
<div className="text-center text-gray-500 h-full py-8">
<Terminal className="w-8 h-8 mx-auto mb-2 opacity-50" />
diff --git a/flowsint-app/src/renderer/src/components/layout/root.layout.tsx b/flowsint-app/src/renderer/src/components/layout/root.layout.tsx
index 916374a5..592e15cf 100644
--- a/flowsint-app/src/renderer/src/components/layout/root.layout.tsx
+++ b/flowsint-app/src/renderer/src/components/layout/root.layout.tsx
@@ -28,7 +28,6 @@ export default function RootLayout({ children }: LayoutProps) {
const closeChat = useLayoutStore(s => s.closeChat)
const openChat = useLayoutStore(s => s.openChat)
const { investigationId, type, id } = useParams({ strict: false })
- const { logs, refetch } = useEvents(id as string)
// Set up keyboard shortcut for chat panel
@@ -131,11 +130,11 @@ export default function RootLayout({ children }: LayoutProps) {
id="console"
order={5}
defaultSize={30}
- minSize={20}
+ minSize={10}
maxSize={50}
>
<div className="h-full overflow-hidden">
- <LogPanel logs={logs} refetch={refetch} />
+ <LogPanel />
</div>
</ResizablePanel>
</>
diff --git a/flowsint-app/src/renderer/src/hooks/use-chat.ts b/flowsint-app/src/renderer/src/hooks/use-chat.ts
index 437e749e..bbb67341 100644
--- a/flowsint-app/src/renderer/src/hooks/use-chat.ts
+++ b/flowsint-app/src/renderer/src/hooks/use-chat.ts
@@ -100,7 +100,7 @@ export const useChat = ({ onContentUpdate, onSuccess, editor }: UseChatOptions)
}
const content = typeof currentContent === 'string' ? currentContent : JSON.stringify(currentContent)
const nodeLabel = selectedNodes.map(node => node.data.label).join(", ")
- const context = selectedNodes ? `entities:${nodeLabel}\n\nContext:\n${content}` : content
+ const context = selectedNodes ? `${nodeLabel}\n\nContext:\n${content}` : content
const fullPrompt = `${customPrompt}\n\nContext:\n${context}`
setPromptOpen(false)
setCustomPrompt("")
diff --git a/flowsint-app/src/renderer/src/hooks/use-events.ts b/flowsint-app/src/renderer/src/hooks/use-events.ts
index a1f3db05..345faa0c 100644
--- a/flowsint-app/src/renderer/src/hooks/use-events.ts
+++ b/flowsint-app/src/renderer/src/hooks/use-events.ts
@@ -32,7 +32,6 @@ export function useEvents(sketch_id: string | undefined) {
try {
const raw = JSON.parse(e.data) as any
const event = JSON.parse(raw.data) as Event
- console.log("event", event.type)
if (event.type === EventLevel.COMPLETED) {
refetchGraph()
// const nodes = event.payload.nodes as GraphNode[]
diff --git a/flowsint-app/src/renderer/src/hooks/use-icon.tsx b/flowsint-app/src/renderer/src/hooks/use-icon.tsx
index 20ca1716..e78c8e05 100644
--- a/flowsint-app/src/renderer/src/hooks/use-icon.tsx
+++ b/flowsint-app/src/renderer/src/hooks/use-icon.tsx
@@ -5,6 +5,7 @@ export type IconType = string;
interface IconProps {
className?: string;
size?: number;
+ style?: React.CSSProperties;
}
const getIconPath = (type: string): string => {
@@ -20,9 +21,9 @@ export const useIcon = (type: IconType) => {
const iconPath = useMemo(() => getIconPath(type), [type]);
// Memoize the component itself
- return useCallback(({ className, size = 24 }: IconProps): JSX.Element => {
+ return useCallback(({ className, size = 24, style }: IconProps): JSX.Element => {
if (!iconPath) {
- return <div className={className} style={{ width: size, height: size }} />;
+ return <div className={className} style={{ width: size, height: size, ...style }} />;
}
return (
@@ -31,6 +32,7 @@ export const useIcon = (type: IconType) => {
className={className}
width={size}
height={size}
+ style={style}
alt={`${type} icon`}
/>
);
diff --git a/flowsint-app/src/renderer/src/hooks/use-platform-icons.tsx b/flowsint-app/src/renderer/src/hooks/use-platform-icons.tsx
index ee8f25dd..1c9af9b3 100644
--- a/flowsint-app/src/renderer/src/hooks/use-platform-icons.tsx
+++ b/flowsint-app/src/renderer/src/hooks/use-platform-icons.tsx
@@ -1,15 +1,17 @@
import { type JSX, useMemo } from "react";
import { actionItems, type ActionItem } from "@/lib/action-items"
+import { useIcon } from "@/hooks/use-icon"
export const usePlatformIcons = () => {
return useMemo(() => {
- const socials = actionItems.find((item) => item.type === "social")?.children
+ const socials = actionItems.find((item) => item.type === "Socials")?.children
if (!socials)
return {};
return socials.reduce((acc: Record<string, { icon: JSX.Element, color: string }>, item: ActionItem) => {
const platform = item.key.split("_")[2];
+ const IconComponent = useIcon(item.icon);
acc[platform] = {
- icon: <item.icon style={{ color: item.color }} />,
+ icon: <IconComponent style={{ color: item.color }} />,
color: item.color ?? "lightgray",
};
return acc;
diff --git a/flowsint-app/src/renderer/src/lib/action-items.ts b/flowsint-app/src/renderer/src/lib/action-items.ts
index ec90bfc2..55d385b6 100644
--- a/flowsint-app/src/renderer/src/lib/action-items.ts
+++ b/flowsint-app/src/renderer/src/lib/action-items.ts
@@ -1,32 +1,3 @@
-import {
- AtSign,
- Bike,
- Bitcoin,
- Building2,
- Car,
- Facebook,
- Ghost,
- Github,
- Globe,
- Instagram,
- Linkedin,
- Locate,
- MapPin,
- MessageCircle,
- MessageSquare,
- Phone,
- Plane,
- Sailboat,
- Send,
- Twitch,
- Twitter,
- User,
- UserCheckIcon,
- Video,
- type LucideIcon,
-} from "lucide-react"
-
-
export type FieldType = "text" | "date" | "email" | "number" | "select" | "textarea" | "hidden" | "tel" | "url" | "metadata"
export interface SelectOption {
@@ -48,7 +19,7 @@ export interface ActionItem {
type: string
table: string
key: string
- icon: LucideIcon
+ icon: string
label: string
color?: string
fields: FormField[]
@@ -74,7 +45,7 @@ export const actionItems: ActionItem[] = [
type: "person",
table: "",
key: "person",
- icon: User,
+ icon: "individual",
label: "Person",
label_key: "name",
fields: [],
@@ -85,7 +56,7 @@ export const actionItems: ActionItem[] = [
table: "individuals",
key: "individual",
label_key: "first_name",
- icon: User,
+ icon: "individual",
label: "Individual",
fields: [{ name: "first_name", label: "Firstname", type: "text", required: true },
{ name: "last_name", label: "Lastname", type: "text", required: true },
@@ -110,7 +81,7 @@ export const actionItems: ActionItem[] = [
type: "Username",
table: "usernames",
key: "username",
- icon: UserCheckIcon,
+ icon: "username",
label: "Username",
label_key: "username",
fields: [{ name: "username", label: "Username", type: "text", required: true }],
@@ -123,7 +94,7 @@ export const actionItems: ActionItem[] = [
type: "organization",
table: "",
key: "organization_category",
- icon: Building2,
+ icon: "organization",
label: "Organization",
label_key: "name",
fields: [],
@@ -133,7 +104,7 @@ export const actionItems: ActionItem[] = [
type: "Organization",
table: "organizations",
key: "organization",
- icon: Building2,
+ icon: "organization",
label: "Organization",
label_key: "name",
fields: [
@@ -163,7 +134,7 @@ export const actionItems: ActionItem[] = [
type: "contact",
table: "",
key: "contact",
- icon: Phone,
+ icon: "phone",
label: "Contact",
label_key: "value",
fields: [],
@@ -174,7 +145,7 @@ export const actionItems: ActionItem[] = [
table: "phones",
key: "phone",
label_key: "number",
- icon: Phone,
+ icon: "phone",
label: "Phone number",
fields: [{ name: "number", label: "Phone number", type: "tel", required: true },
{
@@ -193,7 +164,7 @@ export const actionItems: ActionItem[] = [
type: "Email",
table: "emails",
key: "email",
- icon: AtSign,
+ icon: "email",
label_key: "email",
label: "Email address",
fields: [{ name: "email", label: "Email", type: "email", required: true }],
@@ -206,7 +177,7 @@ export const actionItems: ActionItem[] = [
type: "digital",
table: "",
key: "digital",
- icon: Globe,
+ icon: "website",
label: "Digital",
label_key: "value",
fields: [],
@@ -217,7 +188,7 @@ export const actionItems: ActionItem[] = [
table: "websites",
key: "website",
label_key: "url",
- icon: Globe,
+ icon: "website",
label: "Website",
fields: [
{ name: "url", label: "URL", type: "url", required: true },
@@ -232,7 +203,7 @@ export const actionItems: ActionItem[] = [
type: "Domain",
table: "domains",
key: "domain",
- icon: Locate,
+ icon: "domain",
label_key: "domain",
label: "Domain",
fields: [{ name: "domain", label: "Domain", type: "text", required: true }],
@@ -244,7 +215,7 @@ export const actionItems: ActionItem[] = [
table: "subdomains",
key: "subdomain",
label_key: "subomain",
- icon: Locate,
+ icon: "subdomain",
label: "Subdomain",
fields: [{ name: "subomain", label: "subdomain", type: "text", required: true }, { name: "root", label: "root domain", type: "text", required: true }],
size: "h-5 w-5",
@@ -254,7 +225,7 @@ export const actionItems: ActionItem[] = [
type: "Ip",
table: "ips",
key: "ip",
- icon: Locate,
+ icon: "ip",
label: "IP address",
label_key: "address",
fields: [{ name: "address", label: "IP address", type: "text", required: true }],
@@ -267,7 +238,7 @@ export const actionItems: ActionItem[] = [
type: "finance",
table: "",
key: "finance",
- icon: Bitcoin,
+ icon: "cryptowallet",
label: "Finance",
label_key: "value",
fields: [],
@@ -278,7 +249,7 @@ export const actionItems: ActionItem[] = [
table: "wallets",
key: "wallet",
label_key: "wallet",
- icon: Bitcoin,
+ icon: "cryptowallet",
label: "Crypto wallet",
fields: [
{ name: "wallet", label: "Wallet", type: "text", required: true },
@@ -302,18 +273,18 @@ export const actionItems: ActionItem[] = [
type: "location",
table: "",
key: "location",
- icon: MapPin,
+ icon: "location",
label: "Location",
label_key: "address",
fields: [],
children: [
{
id: 3,
- type: "PhysicalAddress",
+ type: "Location",
table: "addresses",
label_key: "address",
key: "address",
- icon: MapPin,
+ icon: "location",
label: "Physical address",
fields: [
{ name: "address", label: "Address", type: "text", required: true },
@@ -333,7 +304,7 @@ export const actionItems: ActionItem[] = [
size: "h-5 w-5",
table: "",
key: "social_profile",
- icon: Send,
+ icon: "social_profile",
label: "Social account",
label_key: "username",
fields: [],
@@ -344,7 +315,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_facebook",
label_key: "username",
- icon: Facebook,
+ icon: "social_profile",
color: "#1d4ed8",
label: "Facebook",
fields: [
@@ -360,7 +331,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_instagram",
label_key: "username",
- icon: Instagram,
+ icon: "social_profile",
color: "#db2777",
label: "Instagram",
fields: [
@@ -376,7 +347,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_telegram",
label_key: "username",
- icon: Send,
+ icon: "social_profile",
color: "#0369a1",
label: "Telegram",
fields: [
@@ -392,7 +363,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_signal",
label_key: "username",
- icon: MessageCircle,
+ icon: "social_profile",
color: "#3B45FC",
label: "Signal",
fields: [
@@ -409,7 +380,7 @@ export const actionItems: ActionItem[] = [
key: "social_profiles_snapchat",
label_key: "username",
color: "#FEFC00",
- icon: Ghost,
+ icon: "social_profile",
label: "Snapchat",
fields: [
{ name: "profile_url", label: "Profile URL", type: "url", required: true },
@@ -424,7 +395,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_github",
label_key: "username",
- icon: Github,
+ icon: "social_profile",
label: "Github",
fields: [
{ name: "profile_url", label: "Profile URL", type: "url", required: false },
@@ -439,7 +410,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_coco",
label_key: "username",
- icon: Send,
+ icon: "social_profile",
label: "Coco",
fields: [
{ name: "profile_url", label: "Profile URL", type: "url", required: true },
@@ -457,7 +428,7 @@ export const actionItems: ActionItem[] = [
key: "social_profiles_linkedin",
label_key: "username",
color: "#116AC9",
- icon: Linkedin,
+ icon: "social_profile",
label: "LinkedIn",
fields: [
{ name: "profile_url", label: "Profile URL", type: "url", required: true },
@@ -472,7 +443,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_twitter",
label_key: "username",
- icon: Twitter,
+ icon: "social_profile",
label: "Twitter",
fields: [
{ name: "profile_url", label: "Profile URL", type: "url", required: true },
@@ -487,7 +458,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_tiktok",
label_key: "username",
- icon: Video,
+ icon: "social_profile",
label: "TikTok",
fields: [
{ name: "profile_url", label: "Profile URL", type: "url", required: true },
@@ -502,7 +473,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_reddit",
label_key: "username",
- icon: MessageSquare,
+ icon: "social_profile",
color: "#FF4B13",
label: "Reddit",
fields: [
@@ -518,7 +489,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_discord",
label_key: "username",
- icon: MessageCircle,
+ icon: "social_profile",
color: "#525FEE",
label: "Discord",
fields: [
@@ -534,7 +505,7 @@ export const actionItems: ActionItem[] = [
table: "social_profiles",
key: "social_profiles_twitch",
label_key: "username",
- icon: Twitch,
+ icon: "social_profile",
color: "#A96FFF",
label: "Twitch",
fields: [
@@ -550,7 +521,7 @@ export const actionItems: ActionItem[] = [
id: 14,
type: "vehicle",
table: "",
- icon: Car,
+ icon: "vehicle",
label: "Vehicle",
label_key: "plate",
key: "vehicle",
@@ -561,7 +532,7 @@ export const actionItems: ActionItem[] = [
type: "Vehicle",
table: "vehicles",
key: "vehicles_car",
- icon: Car,
+ icon: "vehicle",
label: "Car",
label_key: "plate",
fields: [
@@ -579,7 +550,7 @@ export const actionItems: ActionItem[] = [
table: "vehicles",
key: "vehicles_motorcycle",
label_key: "plate",
- icon: Bike,
+ icon: "vehicle",
label: "Motorcycle",
fields: [
{ name: "plate", label: "License plate", type: "text", required: true },
@@ -596,7 +567,7 @@ export const actionItems: ActionItem[] = [
table: "vehicles",
key: "vehicles_boat",
label_key: "plate",
- icon: Sailboat,
+ icon: "vehicle",
label: "Boat",
fields: [
{ name: "plate", label: "Registration number", type: "text", required: true },
@@ -612,7 +583,7 @@ export const actionItems: ActionItem[] = [
type: "Vehicle",
table: "vehicles",
key: "vehicles_aircraft",
- icon: Plane,
+ icon: "vehicle",
label_key: "plate",
label: "Aircraft",
fields: [
diff --git a/flowsint-app/src/renderer/src/lib/utils.ts b/flowsint-app/src/renderer/src/lib/utils.ts
index 64662648..0ba3078a 100644
--- a/flowsint-app/src/renderer/src/lib/utils.ts
+++ b/flowsint-app/src/renderer/src/lib/utils.ts
@@ -213,6 +213,8 @@ export const getDagreLayoutedElements = (nodes: Node[],
nodes.forEach((node) =>
g.setNode(node.id, {
...node,
+ targetPosition: options.direction === "LR" ? 'left' : 'top',
+ sourcePosition: options.direction === "LR" ? 'right' : 'bottom',
width: node.measured?.width ?? 0,
height: node.measured?.height ?? 0,
}),
diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx
index 5fbae7f0..329ff7ba 100644
--- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx
+++ b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.$investigationId.index.tsx
@@ -209,7 +209,7 @@ function InvestigationPage() {
<Card className="hover:shadow-md transition-shadow">
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">Total Sketches</CardTitle>
- <Waypoints className="h-4 w-4 text-muted-foreground" />
+ <Waypoints className="h-4 w-4 text-muted-foreground opacity-70" strokeWidth={1.5} />
</CardHeader>
<CardContent>
<div className="text-2xl font-bold">{investigation.sketches?.length || 0}</div>
@@ -221,7 +221,7 @@ function InvestigationPage() {
<Card className="hover:shadow-md transition-shadow">
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">Total Analyses</CardTitle>
- <FileTextIcon className="h-4 w-4 text-muted-foreground" />
+ <FileTextIcon className="h-4 w-4 text-muted-foreground opacity-70" strokeWidth={1.5} />
</CardHeader>
<CardContent>
{isLoadingAnalyses ? (
@@ -289,7 +289,7 @@ function InvestigationPage() {
{!hasSketches ? (
<div className="flex flex-col items-center justify-center text-center gap-4 p-8 border border-dashed rounded-xl">
- <Waypoints className="w-10 h-10 text-muted-foreground" />
+ <Waypoints className="w-10 h-10 text-muted-foreground opacity-70" strokeWidth={1.5} />
<div className="space-y-1 max-w-md">
<h3 className="text-lg font-semibold text-foreground">
No sketches yet
@@ -323,7 +323,7 @@ function InvestigationPage() {
>
<div className="space-y-2">
<div className="flex items-center gap-2 text-sm font-medium text-foreground">
- <Waypoints className="w-4 h-4 text-muted-foreground" />
+ <Waypoints className="w-4 h-4 text-muted-foreground opacity-70" strokeWidth={1.5} />
<span className="truncate text-ellipsis">{sketch.title}</span>
<Badge variant="outline" className="text-[10px] py-0.5 px-1 ml-auto">SKETCH</Badge>
</div>
@@ -378,7 +378,7 @@ function InvestigationPage() {
</div>
) : !hasAnalyses ? (
<div className="flex flex-col items-center justify-center text-center gap-4 p-8 border border-dashed rounded-xl">
- <FileTextIcon className="w-10 h-10 opacity-60" />
+ <FileTextIcon className="w-10 h-10 opacity-70" strokeWidth={1.5} />
<div className="space-y-1 max-w-md">
<h3 className="text-lg font-semibold text-foreground">
No analyses yet
@@ -406,7 +406,7 @@ function InvestigationPage() {
>
<div className="space-y-2">
<div className="flex items-center gap-2 text-sm font-medium text-foreground">
- <FileTextIcon className="w-4 h-4 text-muted-foreground" />
+ <FileTextIcon className="w-4 h-4 text-muted-foreground opacity-70" strokeWidth={1.5} />
<span className="truncate text-ellipsis">{analysis.title || 'Untitled Analysis'}</span>
<Badge variant="outline" className="text-[10px] py-0.5 px-1 ml-auto">ANALYSIS</Badge>
</div>
@@ -433,7 +433,7 @@ function InvestigationPage() {
<Card className="hover:shadow-md transition-all cursor-pointer">
<CardHeader className="flex flex-row items-center gap-3 pb-2">
<div className="bg-muted rounded-lg p-2">
- <FileText className="w-5 h-5 text-muted-foreground" />
+ <FileText className="w-5 h-5 text-muted-foreground opacity-70" strokeWidth={1.5} />
</div>
<CardTitle className="text-lg">Export Investigation</CardTitle>
</CardHeader>
diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.index.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.index.tsx
index 08ed7f2e..00ac22e9 100644
--- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.index.tsx
+++ b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.index.tsx
@@ -48,7 +48,7 @@ function InvestigationPage() {
<Card className="hover:shadow-md transition-shadow">
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">Total Investigations</CardTitle>
- <Waypoints className="h-4 w-4 text-muted-foreground" />
+ <Waypoints className="h-4 w-4 text-muted-foreground opacity-70" strokeWidth={1.5} />
</CardHeader>
<CardContent>
<div className="text-2xl font-bold">12</div>
diff --git a/flowsint-app/src/renderer/src/stores/graph-store.ts b/flowsint-app/src/renderer/src/stores/graph-store.ts
index 1081d921..4099a3ce 100644
--- a/flowsint-app/src/renderer/src/stores/graph-store.ts
+++ b/flowsint-app/src/renderer/src/stores/graph-store.ts
@@ -15,6 +15,8 @@ import { type ActionItem, findActionItemByKey } from "@/lib/action-items"
export type GraphNode = Node<NodeData> & {
collapsed?: boolean;
hidden?: boolean;
+ targetPosition?: "left" | "right" | "top" | "bottom";
+ sourcePosition?: "left" | "right" | "top" | "bottom";
}
export type GraphEdge = Edge<EdgeData>
diff --git a/flowsint-app/src/renderer/src/stores/node-display-settings.ts b/flowsint-app/src/renderer/src/stores/node-display-settings.ts
index 58d46ee5..03278e6e 100644
--- a/flowsint-app/src/renderer/src/stores/node-display-settings.ts
+++ b/flowsint-app/src/renderer/src/stores/node-display-settings.ts
@@ -5,7 +5,7 @@ import { persist } from "zustand/middleware"
export type ItemType =
| "individual"
| "phone"
- | "address"
+ | "location"
| "email"
| "ip"
| "social_profile"
@@ -36,7 +36,7 @@ export type ItemType =
export const ITEM_TYPES: ItemType[] = [
"individual",
"phone",
- "address",
+ "location",
"email",
"ip",
"social_profile",
@@ -68,7 +68,7 @@ export const ITEM_TYPES: ItemType[] = [
const DEFAULT_COLORS: Record<ItemType, string> = {
individual: "#A9CCF4", // Notion medium blue
phone: "#A0D7CF", // Notion soft teal
- address: "#A4BFD5", // Notion dusty blue
+ location: "#EAAFAF", // Notion dusty blue
email: "#C4B9ED", // Notion lavender
ip: "#F0C19E", // Notion pale orange
social_profile: "#B8AFE6", // Notion muted purple
@@ -101,7 +101,7 @@ const DEFAULT_COLORS: Record<ItemType, string> = {
const DEFAULT_ICONS: Record<ItemType, string> = {
individual: "👤",
phone: "📞",
- address: "🏠",
+ location: "🏠",
email: "✉️",
ip: "🌐",
social_profile: "📱",
@@ -133,7 +133,7 @@ const DEFAULT_ICONS: Record<ItemType, string> = {
const DEFAULT_SIZES: Record<ItemType, number> = {
individual: 10,
phone: 8,
- address: 7,
+ location: 7,
email: 7,
ip: 7,
social_profile: 7,
diff --git a/flowsint-app/src/renderer/src/styles.css b/flowsint-app/src/renderer/src/styles.css
index 698a4831..db9dac23 100644
--- a/flowsint-app/src/renderer/src/styles.css
+++ b/flowsint-app/src/renderer/src/styles.css
@@ -658,4 +658,152 @@ html {
.tiptap pre .hljs-strong {
font-weight: 700;
+}
+
+
+:root {
+ --background: oklch(0.9821 0 0);
+ --foreground: oklch(0.2435 0 0);
+ --card: oklch(0.9911 0 0);
+ --card-foreground: oklch(0.2435 0 0);
+ --popover: oklch(0.9911 0 0);
+ --popover-foreground: oklch(0.2435 0 0);
+ --primary: oklch(0.4341 0.0392 41.9938);
+ --primary-foreground: oklch(1.0000 0 0);
+ --secondary: oklch(0.9200 0.0651 74.3695);
+ --secondary-foreground: oklch(0.3499 0.0685 40.8288);
+ --muted: oklch(0.9521 0 0);
+ --muted-foreground: oklch(0.5032 0 0);
+ --accent: oklch(0.9310 0 0);
+ --accent-foreground: oklch(0.2435 0 0);
+ --destructive: oklch(0.6271 0.1936 33.3390);
+ --destructive-foreground: oklch(1.0000 0 0);
+ --border: oklch(0.8822 0 0);
+ --input: oklch(0.8822 0 0);
+ --ring: oklch(0.4341 0.0392 41.9938);
+ --chart-1: oklch(0.4341 0.0392 41.9938);
+ --chart-2: oklch(0.9200 0.0651 74.3695);
+ --chart-3: oklch(0.9310 0 0);
+ --chart-4: oklch(0.9367 0.0523 75.5009);
+ --chart-5: oklch(0.4338 0.0437 41.6746);
+ --sidebar: oklch(0.9881 0 0);
+ --sidebar-foreground: oklch(0.2645 0 0);
+ --sidebar-primary: oklch(0.3250 0 0);
+ --sidebar-primary-foreground: oklch(0.9881 0 0);
+ --sidebar-accent: oklch(0.9761 0 0);
+ --sidebar-accent-foreground: oklch(0.3250 0 0);
+ --sidebar-border: oklch(0.9401 0 0);
+ --sidebar-ring: oklch(0.7731 0 0);
+ --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
+ --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
+ --radius: 0.5rem;
+ --shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
+ --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
+ --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
+ --shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
+ --shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
+ --shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
+ --shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
+ --shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
+}
+
+.dark {
+ --background: oklch(0.1776 0 0);
+ --foreground: oklch(0.9491 0 0);
+ --card: oklch(0.2134 0 0);
+ --card-foreground: oklch(0.9491 0 0);
+ --popover: oklch(0.2134 0 0);
+ --popover-foreground: oklch(0.9491 0 0);
+ --primary: oklch(0.9247 0.0524 66.1732);
+ --primary-foreground: oklch(0.2029 0.0240 200.1962);
+ --secondary: oklch(0.3163 0.0190 63.6992);
+ --secondary-foreground: oklch(0.9247 0.0524 66.1732);
+ --muted: oklch(0.2520 0 0);
+ --muted-foreground: oklch(0.7699 0 0);
+ --accent: oklch(0.2850 0 0);
+ --accent-foreground: oklch(0.9491 0 0);
+ --destructive: oklch(0.6271 0.1936 33.3390);
+ --destructive-foreground: oklch(1.0000 0 0);
+ --border: oklch(0.2351 0.0115 91.7467);
+ --input: oklch(0.4017 0 0);
+ --ring: oklch(0.9247 0.0524 66.1732);
+ --chart-1: oklch(0.9247 0.0524 66.1732);
+ --chart-2: oklch(0.3163 0.0190 63.6992);
+ --chart-3: oklch(0.2850 0 0);
+ --chart-4: oklch(0.3481 0.0219 67.0001);
+ --chart-5: oklch(0.9245 0.0533 67.0855);
+ --sidebar: oklch(0.2103 0.0059 285.8852);
+ --sidebar-foreground: oklch(0.9674 0.0013 286.3752);
+ --sidebar-primary: oklch(0.4882 0.2172 264.3763);
+ --sidebar-primary-foreground: oklch(1.0000 0 0);
+ --sidebar-accent: oklch(0.2739 0.0055 286.0326);
+ --sidebar-accent-foreground: oklch(0.9674 0.0013 286.3752);
+ --sidebar-border: oklch(0.2739 0.0055 286.0326);
+ --sidebar-ring: oklch(0.8711 0.0055 286.2860);
+ --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
+ --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
+ --radius: 0.5rem;
+ --shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
+ --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
+ --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
+ --shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
+ --shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
+ --shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
+ --shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
+ --shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
+}
+
+@theme inline {
+ --color-background: var(--background);
+ --color-foreground: var(--foreground);
+ --color-card: var(--card);
+ --color-card-foreground: var(--card-foreground);
+ --color-popover: var(--popover);
+ --color-popover-foreground: var(--popover-foreground);
+ --color-primary: var(--primary);
+ --color-primary-foreground: var(--primary-foreground);
+ --color-secondary: var(--secondary);
+ --color-secondary-foreground: var(--secondary-foreground);
+ --color-muted: var(--muted);
+ --color-muted-foreground: var(--muted-foreground);
+ --color-accent: var(--accent);
+ --color-accent-foreground: var(--accent-foreground);
+ --color-destructive: var(--destructive);
+ --color-destructive-foreground: var(--destructive-foreground);
+ --color-border: var(--border);
+ --color-input: var(--input);
+ --color-ring: var(--ring);
+ --color-chart-1: var(--chart-1);
+ --color-chart-2: var(--chart-2);
+ --color-chart-3: var(--chart-3);
+ --color-chart-4: var(--chart-4);
+ --color-chart-5: var(--chart-5);
+ --color-sidebar: var(--sidebar);
+ --color-sidebar-foreground: var(--sidebar-foreground);
+ --color-sidebar-primary: var(--sidebar-primary);
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
+ --color-sidebar-accent: var(--sidebar-accent);
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
+ --color-sidebar-border: var(--sidebar-border);
+ --color-sidebar-ring: var(--sidebar-ring);
+
+ --font-sans: var(--font-sans);
+ --font-mono: var(--font-mono);
+ --font-serif: var(--font-serif);
+
+ --radius-sm: calc(var(--radius) - 4px);
+ --radius-md: calc(var(--radius) - 2px);
+ --radius-lg: var(--radius);
+ --radius-xl: calc(var(--radius) + 4px);
+
+ --shadow-2xs: var(--shadow-2xs);
+ --shadow-xs: var(--shadow-xs);
+ --shadow-sm: var(--shadow-sm);
+ --shadow: var(--shadow);
+ --shadow-md: var(--shadow-md);
+ --shadow-lg: var(--shadow-lg);
+ --shadow-xl: var(--shadow-xl);
+ --shadow-2xl: var(--shadow-2xl);
}
\ No newline at end of file