Skip to content

Konan69/athena-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

69 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Athena AI β€” B2B Autonomous Intelligence Suite

TypeScript React Bun Biome Turbo

Athena AI is a business-to-business intelligence platform that embeds collaborative AI agents inside enterprise workflows. It gives go-to-market, research, and operations teams a command center where machine teammates gather context, draft deliverables, and keep humans in the loop.

πŸš€ Quick Start

# Clone the repository
git clone <repository-url>
cd athena-ai

# Install dependencies
pnpm install

# Start development environment (client + server + database studio)
pnpm dev

πŸ“‹ Table of Contents

🎯 Product Overview

Who It Serves

Operators, analysts, and customer-facing teams inside growth-stage B2B companies

Primary Value

Accelerates insight generation, document production, and customer responses without breaking compliance guardrails

Key Features

  • πŸ€– Agent Workstreams: Spin up dedicated agent workflows for research, account planning, and knowledge retrieval
  • πŸ“š Knowledge Libraries: Centralize organizational knowledge that agents cite automatically
  • πŸ”„ Human-AI Collaboration: Route responsibilities with assignment flows, approvals, and notifications
  • πŸ“Š Real-time Monitoring: Track usage, latency, and quality metrics
  • πŸ”’ Enterprise Security: Multi-tenant architecture with role-based access controls
  • ⚑ Live Collaboration: Stream token-level progress for real-time review and intervention

πŸ—οΈ Architecture

Layer Technology Purpose
Experience (client) React 19 + TanStack Router + Tailwind Web interface for command console, organization admin, and transcript playback
Services (server) Bun + Hono + tRPC + Drizzle API with type-safe endpoints, database persistence, and streaming
Orchestration (mastra) Mastra + AI SDK Agent workflows coordinating OpenAI, Exa, PostHog, and custom tools
Shared Foundation Turbo + pnpm + Biome + TypeScript Build orchestration, package management, and code quality

πŸ“‹ Prerequisites

  • Node.js: 20.9.0 or higher
  • pnpm: 10.0.0 or higher
  • Bun: 1.0+ (for server runtime)
  • Docker: For test databases (optional)
  • PostgreSQL: For production database (can use Neon, Supabase, etc.)

πŸ› οΈ Installation

  1. Clone the repository

    git clone <repository-url>
    cd athena-ai
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    # Copy environment templates
    cp client/.env.example client/.env.local
    cp server/.env.example server/.env.local
    cp mastra/.env.example mastra/.env.local
  4. Configure your environment

    • OpenAI API key (for AI features)
    • Database connection string
    • Authentication secrets
    • Other service API keys as needed

πŸš€ Development

Start the full development environment

pnpm dev

This launches:

  • Client: React dev server on http://localhost:3000
  • Server: Bun dev server with hot reload
  • Database Studio: Drizzle Studio for database management

Start individual services

# Client only
pnpm dev:client

# Server only
pnpm dev:server

# Database studio only
pnpm dev:db-studio

# Mastra orchestration
pnpm dev:mastra

Build for production

# Build all packages
pnpm build

# Build individual packages
pnpm -F @athena-ai/client build
pnpm -F @athena-ai/server build
pnpm -F @athena-ai/mastra build

πŸ“œ Available Commands

Root Commands (Workspace)

# Development
pnpm dev                    # Start all services (client + server + db studio)
pnpm build                  # Build all packages
pnpm check-types           # Type checking across workspace
pnpm clean                 # Clean caches and node_modules

# Individual services
pnpm dev:client            # Client only
pnpm dev:server            # Server only
pnpm dev:db-studio         # Database studio only
pnpm dev:mastra           # Mastra orchestration only

Client Commands

cd client
pnpm dev                   # Start Vite dev server
pnpm build                 # Production build
pnpm serve                 # Preview production build
pnpm check-types          # TypeScript type checking
pnpm test                  # Run Vitest tests
pnpm format                # Format with Biome
pnpm lint                  # Lint with Biome
pnpm check                 # Full Biome check

Server Commands

cd server
pnpm dev                   # Start Bun dev server with hot reload
pnpm build                 # TypeScript compilation
pnpm start                 # Production server

# Testing
pnpm test                  # Run tests
pnpm test:watch            # Watch mode tests
pnpm test:coverage         # Coverage report
pnpm test:typecheck        # Type checking

# Database
pnpm db:studio            # Drizzle Studio
pnpm db:push              # Push schema changes

# Test database
pnpm test:db:up           # Start test database
pnpm test:db:down         # Stop test database
pnpm test:db:reset        # Reset test database
pnpm test:db:migrate      # Run migrations
pnpm test:db:generate     # Generate migrations
pnpm test:db:push         # Push schema to test db
pnpm test:setup           # Full test setup (db + schema)
pnpm test:full            # Setup + run tests

Mastra Commands

cd mastra
pnpm dev                   # Start Mastra development server
pnpm build                 # Build Mastra agents and workflows
pnpm start                 # Production Mastra server

πŸ“ Project Structure

athena-ai/
β”œβ”€β”€ client/                 # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # UI components
β”‚   β”‚   β”œβ”€β”€ routes/         # TanStack Router routes
β”‚   β”‚   β”œβ”€β”€ services/       # API services
β”‚   β”‚   β”œβ”€β”€ store/          # Zustand stores
β”‚   β”‚   └── types/          # TypeScript types
β”‚   β”œβ”€β”€ public/             # Static assets
β”‚   └── package.json
β”œβ”€β”€ server/                 # Bun backend API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ modules/        # Feature modules
β”‚   β”‚   β”œβ”€β”€ db/             # Database schemas/migrations
β”‚   β”‚   β”œβ”€β”€ trpc/           # tRPC routes
β”‚   β”‚   β”œβ”€β”€ middleware/     # Server middleware
β”‚   β”‚   └── __tests__/      # Integration tests
β”‚   └── package.json
β”œβ”€β”€ mastra/                 # AI orchestration
β”‚   β”œβ”€β”€ src/mastra/
β”‚   β”‚   β”œβ”€β”€ agents/         # AI agents
β”‚   β”‚   β”œβ”€β”€ workflows/      # Agent workflows
β”‚   β”‚   β”œβ”€β”€ tools/          # Custom tools
β”‚   β”‚   └── prompts/        # Prompt templates
β”‚   └── package.json
β”œβ”€β”€ package.json           # Workspace root
β”œβ”€β”€ turbo.json            # Build orchestration
β”œβ”€β”€ tsconfig.json         # TypeScript config
└── biome.jsonc          # Code formatting/linting

πŸ› οΈ Technology Stack

Frontend

  • React 19 - Latest React with concurrent features
  • TanStack Router - Type-safe routing with file-based routing
  • Tailwind CSS - Utility-first CSS framework
  • Radix UI - Accessible component primitives
  • TanStack Query - Powerful data fetching and caching
  • Zustand - Lightweight state management
  • Vite - Fast build tool and dev server

Backend

  • Bun - Fast JavaScript runtime and bundler
  • Hono - Lightweight web framework
  • tRPC - Type-safe API layer
  • Drizzle ORM - Type-safe SQL query builder
  • PostgreSQL - Primary database
  • Better Auth - Authentication and authorization
  • Redis - Caching and session storage

AI & Orchestration

  • Mastra - AI agent orchestration framework
  • OpenAI - LLM provider
  • Exa - Web search and research
  • PostHog - Analytics and monitoring
  • AI SDK - Unified AI interface

Development & Quality

  • TypeScript - Type-safe JavaScript
  • Biome - Fast formatter and linter
  • Turbo - Build orchestration and caching
  • Vitest - Fast unit testing
  • Playwright - E2E testing (future)

🀝 Contributing

Development Workflow

  1. Branch: Create feature branches from main
  2. Commits: Use conventional commits (feat:, fix:, chore:, etc.)
  3. PRs: Write descriptive pull requests explaining the problem and solution
  4. Testing: Ensure tests pass and add new tests for features
  5. Code Quality: Run pnpm check before committing

Code Quality

  • Biome: Automatic formatting and linting
  • TypeScript: Strict type checking enabled
  • Conventional Commits: For clean release notes
  • Pre-commit hooks: Automated quality checks

Testing Strategy

  • Frontend: Vitest for unit tests with Testing Library
  • Backend: Bun test runner with integration tests
  • Database: Docker-based test databases
  • E2E: Playwright (planned)

πŸ“š Documentation

πŸ“„ License

This project is licensed under the ISC License.

πŸ™‹ Support


Athena AI β€” Where human intelligence meets artificial capability πŸ€–βœ¨

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages