Skip to content

Multi-Agent investigation platform. Orchestrates LLMs to correlate evidence, detect inconsistencies, and generate deduction boards.

Notifications You must be signed in to change notification settings

Kuxha/crimeboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CrimeBoard πŸ”

Upload evidence. AI agents auto-build a floating laser evidence board with suspect ranking. One click generates a courtroom-ready Case File PDF.

Built with DigitalOcean: Gradientβ„’ AI Platform, Functions, Spaces, Managed PostgreSQL, App Platform

CrimeBoard


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        USER BROWSER                                  β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚   β”‚   Next.js on DO App Platform                                 β”‚   β”‚
β”‚   β”‚   β”œβ”€ Evidence Board (React Flow)                            β”‚   β”‚
β”‚   β”‚   β”œβ”€ Suspect Nodes with Guilt %                             β”‚   β”‚
β”‚   β”‚   └─ Multi-file Upload β†’ Presigned PUT β†’ Spaces             β”‚   β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚                           β”‚                       β”‚
        β–Ό                           β–Ό                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ DO Spaces     β”‚        β”‚ DO Managed       β”‚    β”‚ DO Functions     β”‚
β”‚ (Presigned)   β”‚        β”‚ PostgreSQL       β”‚    β”‚ (Serverless)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              DigitalOcean Gradientβ„’ AI Platform                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  7-AGENT ORCHESTRATION PIPELINE                                β”‚ β”‚
β”‚  β”‚                                                                 β”‚ β”‚
β”‚  β”‚  1. ForensicTagger    β†’ Extract objects, locations, timestamps β”‚ β”‚
β”‚  β”‚  2. WitnessAnalyst    β†’ Suspect descriptors, timeline hints    β”‚ β”‚
β”‚  β”‚  3. PsychoProfiler    β†’ Behavioral hypotheses                  β”‚ β”‚
β”‚  β”‚  4. SuspectRanker     β†’ Guilt probability 0-100%               β”‚ β”‚
β”‚  β”‚  5. ConnectionMapper  β†’ Graph nodes and edges                  β”‚ β”‚
β”‚  β”‚  6. DeskSergeant      β†’ Merge all outputs                      β”‚ β”‚
β”‚  β”‚  7. CaseFileWriter    β†’ Prosecutor-ready narratives            β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  CrimeBoard-KB (Knowledge Base)                                β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎯 Key Features

Multi-File Upload (Presigned PUT)

  • Select multiple images, PDFs, text files at once
  • Files upload directly to Spaces via presigned PUT URLs
  • Never sends file bytes through API routes (avoids 1MB limits)
  • Per-file upload status indicators

Multi-Agent Investigation

  • 7 specialized AI agents analyze evidence in sequence
  • Each agent builds on previous outputs
  • Returns structured JSON for board rendering

Suspect Ranking

  • 2-5 suspects with guilt probability (0-100%)
  • Each suspect shows:
    • Why suspected (with evidence citations)
    • Key attributes (description, vehicle, last seen)
    • Relationships to other suspects
    • Recommended next action

Presigned URL Security

  • All Spaces objects are private
  • Every image/PDF renders via presigned READ URL
  • URLs expire after 1 hour (configurable)
  • CORS configured for upload domains

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • doctl CLI authenticated
  • DigitalOcean account with Spaces, Functions, Gradient access

1. Clone and Install

git clone https://github.com/YOUR_USERNAME/crimeboard_ocean.git
cd crimeboard_ocean
cd apps/web && npm install

2. Environment Setup

cp .env.example apps/web/.env.local
# Edit with your credentials

3. Database Setup

# Add your IP to trusted sources first!
psql $DATABASE_URL -f db/migrations/001_initial.sql

4. Spaces CORS Setup (Required!)

In DO Control Panel β†’ Spaces β†’ Bucket β†’ Settings β†’ CORS:

{
  "CORSRules": [{
    "AllowedOrigins": ["http://localhost:3000", "https://your-app.ondigitalocean.app"],
    "AllowedMethods": ["GET", "PUT", "HEAD"],
    "AllowedHeaders": ["*"],
    "MaxAgeSeconds": 3600
  }]
}

5. Run Locally

npm run dev
# Open http://localhost:3000

πŸ“¦ Deployment

Deploy Functions

doctl serverless install
doctl serverless connect
cd functions && doctl serverless deploy .

Deploy Web App

doctl apps create --spec .do/app.yaml

πŸ† DigitalOcean Products Used

Product How We Used It
Gradientβ„’ AI Platform 7-agent orchestration, function routing, knowledge base
Functions 6 serverless endpoints (upload, OCR, tag-image, composite, casefile-pdf, signed-url)
Spaces Private evidence storage, presigned PUT/GET URLs
Managed PostgreSQL Cases, evidence, board nodes, edges, suspects
App Platform Next.js frontend hosting

πŸ“ Project Structure

crimeboard_ocean/
β”œβ”€β”€ apps/web/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”‚   └── api/cases/[id]/     # CRUD, analyze, upload, close
β”‚   β”œβ”€β”€ components/             # EvidenceBoard, NodePanel, UploadModal
β”‚   └── lib/
β”‚       β”œβ”€β”€ agents.ts           # 7-agent orchestration
β”‚       β”œβ”€β”€ gradient.ts         # Gradient API wrapper
β”‚       β”œβ”€β”€ spaces.ts           # S3/Spaces client
β”‚       └── db.ts               # PostgreSQL pool
β”œβ”€β”€ functions/                  # DO Functions
β”œβ”€β”€ db/migrations/              # SQL schema
└── .do/app.yaml                # App Platform spec

πŸ“„ License

MIT - Built for DigitalOcean Hackathon

About

Multi-Agent investigation platform. Orchestrates LLMs to correlate evidence, detect inconsistencies, and generate deduction boards.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors