~shahper.shahin
Back to Selected Work
Full-Stack & Applied AIYear 2026

Beacon — Startup Management & Decision Workspace

End-to-end workspace connecting task execution, financial metrics, and context-aware AI advisory for early-stage teams.

Next.jsNode.jsMongoDBGemini AISocket.IOTypeScriptTailwind CSS
01

The Problem

Early-stage founders and small engineering teams struggle with context fragmentation across fragmented tools—spreadsheets for runway, Kanban boards for sprint tasks, and disparate chat threads for critical decisions. There is no single workspace connecting daily execution directly to financial health and AI-assisted strategic advice.

Engineered Beacon to provide a single, cohesive workspace that keeps founders and engineering leads grounded in operational reality by uniting tasks, ledger transactions, and a Gemini-powered AI co-founder injected with live workspace context.

02

The System & Architecture

Next.js App Router full-stack architecture with server-rendered workspace views, API route handlers connecting to MongoDB for structured documents (tasks, transactions, team rosters, decisions), Socket.IO channels for real-time collaboration updates, and a Gemini 2.5 Flash API integration acting as a conversational AI co-founder.

System Schematic

Beacon Architecture & Context-Injection Pipeline

4 Components • 4 Data Paths
client

Workspace Client

Next.js 14 UI

service

API Route Handlers

Next.js Server Actions & API

service

AI Co-Founder Engine

Gemini 2.5 Flash (Context Injected)

storage

MongoDB Store

Workspaces, Tasks & Ledger

Execution Sequence & Interconnects
01Workspace ClientAPI Route HandlersUser Actions / Ledger Updates
02API Route HandlersAI Co-Founder EngineContext-Injected Advisory Prompt
03API Route HandlersMongoDB StoreMongoose Query / Mutation
04AI Co-Founder EngineWorkspace ClientStructured Advisory & Insights
03

My Engineering Work

  • Engineered unified workspace data models connecting sprint tasks, financial ledger items, team members, and decision logs
  • Implemented Google OAuth authentication and session management for secure multi-user workspace isolation
  • Constructed structured prompt schemas that inject current startup metrics (burn rate, milestone progress) into Gemini API requests
  • Created interactive financial runway visualizers and Kanban boards with optimistic UI updates
advisor-context.ts
typescript
export async function buildAdvisorContext(workspaceId: string, userQuery: string) {
  const [tasks, ledger, metrics] = await Promise.all([
    TaskModel.find({ workspaceId, status: { $ne: 'completed' } }).limit(20),
    LedgerModel.find({ workspaceId }).sort({ date: -1 }).limit(30),
    getWorkspaceRunwayMetrics(workspaceId)
  ]);

  const systemPrompt = `You are an AI co-founder advisory engine. Context: Current Runway: ${metrics.runwayMonths} months. Monthly Burn: $${metrics.monthlyBurn}. Active Tasks: ${tasks.length}.`;
  return geminiClient.generateContent({ systemPrompt, prompt: userQuery });
}
04

Decisions & Trade-offs

Challenge: LLMs generating generic startup advice without grounding in the team's operational reality

Solution: Injected live workspace state (runway months, burn rate, overdue tasks) into system prompts with strict JSON schema outputs

Engineering Trade-off: Added token overhead per advisory request to ensure quantitative consistency

Challenge: Balancing operational simplicity with real-time state synchronization

Solution: Used Next.js App Router server actions for deterministic data mutations and Socket.IO for live event broadcasts

Engineering Trade-off: Separated WebSocket server handling from serverless routes to maintain persistent socket connections
05

Validation & Limitations

// Evaluated & Working
  • Fully functional end-to-end startup workspace unifying task lifecycle, financial transaction tracking, and AI advisory
  • Zero-configuration local setup with clean environment variable decoupling
// Current Limitations & Next Steps
  • Vector embedding retrieval across arbitrary PDF/document attachments is experimental and planned for future iterations
  • Automated bank sync is not integrated; transactions are recorded via structured CSV/manual entries
06

Evidence & Verification

Verify the implementation directly via source code, commit history, and setup documentation:

Ref: Setup guide, schema documentation, and .env.example included in repository