/** * WorthDoing.ai * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai * File: src/app/page.tsx * Description: Discover page — launch an investigation; top-ranked opportunities and recent activity. */ import Link from "next/link"; import { desc, eq } from "drizzle-orm"; import { db } from "@/lib/db/client"; import { investigations, opportunities } from "@/lib/db/schema"; import { ObjectiveForm } from "@/components/wd/ObjectiveForm"; import { OpportunityCard } from "@/components/wd/OpportunityCard"; import { InvestigationStatusBadge } from "@/components/wd/badges"; export const dynamic = "force-dynamic"; export default async function DiscoverPage() { const [topOpportunities, recent] = await Promise.all([ db .select({ id: opportunities.id, title: opportunities.title, summary: opportunities.summary, worthScore: opportunities.worthScore, evidenceConfidence: opportunities.evidenceConfidence, objective: investigations.objective, reportMd: opportunities.reportMd, }) .from(opportunities) .innerJoin(investigations, eq(investigations.id, opportunities.investigationId)) .orderBy(desc(opportunities.worthScore)) .limit(6), db .select({ id: investigations.id, objective: investigations.objective, status: investigations.status, createdAt: investigations.createdAt, }) .from(investigations) .orderBy(desc(investigations.createdAt)) .limit(5), ]); return (
autonomous opportunity intelligence
Give the agent a domain. It searches, reads, forms falsifiable hypotheses, hunts for counterevidence, and ranks what survives — every conclusion traced to real sources.