Enterprise-grade security dashboard for AI agent vulnerability management. Built with Next.js 14, TypeScript, and Tailwind CSS.
- Scan Management: Upload and scan AI agent code for vulnerabilities
- Findings Viewer: Detailed security findings with severity levels, CWE/OWASP mapping
- Agent Topology: Visual graph of agent control flow and data paths
- Governance Scores: EU AI Act readiness assessment
- Scan History: Browse and compare historical scan results
- API Key Management: Create and manage API keys for CLI integration
- Export Options: JSON, SARIF, and PDF report generation
- Framework: Next.js 14 (App Router)
- Language: TypeScript (strict mode)
- Styling: Tailwind CSS + Radix UI primitives
- Authentication: Clerk
- Analytics: PostHog
- Error Tracking: Sentry
- Visualization: React Flow (topology graphs)
- Node.js 18+
- npm or yarn
Create a .env.local file:
# Required: Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_...
CLERK_SECRET_KEY=sk_...
# Required: Backend API
NEXT_PUBLIC_API_URL=https://api.inkog.io
# Optional: Analytics
NEXT_PUBLIC_POSTHOG_KEY=phc_...
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
# Optional: Error Tracking
NEXT_PUBLIC_SENTRY_DSN=https://...@sentry.io/...
SENTRY_ORG=your-org
SENTRY_PROJECT=inkog-dashboard
SENTRY_AUTH_TOKEN=sntrys_...# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start# Run linter
npm run lint
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests in watch mode
npm run test:watchsrc/
├── app/ # Next.js App Router pages
│ ├── dashboard/ # Protected dashboard pages
│ │ ├── api-keys/ # API key management
│ │ ├── history/ # Scan history viewer
│ │ ├── results/[id]/ # Individual scan results
│ │ └── scan/ # File upload scanner
│ ├── sign-in/ # Clerk sign-in page
│ └── sign-up/ # Clerk sign-up page
├── components/
│ ├── dashboard/ # Dashboard-specific components
│ ├── history/ # History page components
│ ├── layout/ # Shell, sidebar, navigation
│ ├── topology/ # Graph visualization nodes
│ └── ui/ # Reusable UI primitives
├── hooks/ # Custom React hooks
├── lib/ # Utilities and API client
└── __tests__/ # Jest test files
Type-safe API client with:
- Automatic token injection (Clerk)
- Exponential backoff retry
- Error handling and typing
import { createAPIClient } from '@/lib/api';
const api = createAPIClient(getToken);
const scans = await api.history.list();Enterprise-grade toast system:
import { useToast } from '@/hooks/useToast';
const toast = useToast();
toast.success({ title: 'Scan complete' });
toast.handleAPIError(error);Loading states for all major components:
import { SkeletonMetricCard, SkeletonHistoryTable } from '@/components/ui/skeleton';The dashboard uses Jest with React Testing Library:
# Run all tests
npm test
# Run with coverage report
npm run test:coveragesrc/__tests__/
├── components/ # Component tests
│ ├── FindingCard.test.tsx
│ ├── ErrorBoundary.test.tsx
│ └── dashboard/
│ └── SecurityMetricCard.test.tsx
└── lib/ # Utility tests
├── api.test.ts
└── export-utils.test.ts
Errors are automatically captured and sent to Sentry in production. Configure with:
NEXT_PUBLIC_SENTRY_DSN=https://...@sentry.io/...Components are wrapped with ErrorBoundary to prevent crashes:
import { ErrorBoundary, withErrorBoundary } from '@/components/ErrorBoundary';
// Wrap component
<ErrorBoundary>
<ComponentThatMightFail />
</ErrorBoundary>
// Or use HOC
const SafeComponent = withErrorBoundary(UnsafeComponent);- Connect repository to Vercel
- Set environment variables
- Deploy
docker build -t inkog-dashboard .
docker run -p 3000:3000 inkog-dashboardThe dashboard connects to NEXT_PUBLIC_API_URL for:
| Endpoint | Method | Description |
|---|---|---|
/v1/keys |
GET | List API keys |
/v1/keys |
POST | Create API key |
/v1/keys/:id |
DELETE | Revoke API key |
/v1/history |
GET | List scan history |
/v1/stats |
GET | Dashboard statistics |
/v1/scans/:id |
GET | Full scan details |
/v1/scans/:id/export/json |
GET | Export as JSON |
/v1/scans/:id/export/sarif |
GET | Export as SARIF |
/api/v1/scan |
POST | Upload and scan files |
- Create a feature branch
- Make changes with tests
- Ensure tests pass:
npm test - Create pull request
Proprietary - Inkog Security Ltd.