+ {/* Header */}
+
+
+
Network Matching
+
+ AI-powered suggestions for connecting your clients
+
+
+
+
+ {/* Stats */}
+ {stats && (
+
+
+
+
+ Clients
+
+
{stats.totalClients}
+
+
+
+
+ Matches Found
+
+
{stats.totalMatches}
+
+
+
+
+ Avg Score
+
+
{stats.avgScore}%
+
+
+
+
+ Top Connector
+
+
+ {stats.topConnectors[0]?.name || '—'}
+
+
+
+ )}
+
+ {/* Top Connectors */}
+ {stats && stats.topConnectors.length > 0 && (
+
+
Most Connected Clients
+
+ {stats.topConnectors.map((c) => (
+
+
+ {c.name.split(' ').map(n => n[0]).join('')}
+
+
{c.name}
+
{c.matchCount} matches
+
+ ))}
+
+
+ )}
+
+ {/* Filters */}
+
+
+
+ Filter:
+
+
+ {categories.map(cat => {
+ const config = categoryConfig[cat]!;
+ const count = matches.filter(m => m.category === cat).length;
+ if (count === 0) return null;
+ return (
+
+ );
+ })}
+
+
+
+
+
+
+ {/* Match Cards */}
+ {filtered.length === 0 ? (
+
+
+
No matches found
+
+ {matches.length === 0
+ ? 'Add more clients with detailed profiles (interests, industry, location) to find connections.'
+ : 'Try adjusting the filter or minimum score.'}
+
+ {matches.length === 0 && (
+
+ Add Clients
+
+ )}
+
+ ) : (
+
+ {filtered.map((match) => (
+
+ ))}
+
+ )}
+
+ );
+}
diff --git a/src/types/index.ts b/src/types/index.ts
index 1c93740..ca25a6f 100644
--- a/src/types/index.ts
+++ b/src/types/index.ts
@@ -112,6 +112,25 @@ export interface EmailGenerate {
provider?: 'anthropic' | 'openai';
}
+export interface NetworkMatch {
+ clientA: { id: string; name: string };
+ clientB: { id: string; name: string };
+ score: number;
+ reasons: string[];
+ introSuggestion: string;
+ category: 'industry' | 'interests' | 'location' | 'business' | 'social';
+}
+
+export interface NetworkStats {
+ totalClients: number;
+ totalMatches: number;
+ avgScore: number;
+ industries: [string, number][];
+ locations: [string, number][];
+ categories: Record