Skip to content

miles-no/assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

96 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Miles Assistant

AI-Powered Workplace Platform

"Siri har mye pรฅ agendaen, sรฅ vi introduserer Miles Assistant โ€“ intelligent workspace management through multiple interfaces"

License: MIT Node.js Go MCP


๐ŸŒŸ What is Miles Assistant?

Miles Assistant started as a room booking system, but has evolved into a comprehensive AI-powered workplace platform with six different interfaces, natural language processing, and intelligent automation. Whether you prefer a HAL-9000 terminal, conversational chat, visual web interface, or scriptable CLIโ€”Miles Assistant adapts to how you work.

graph TB
    subgraph Interfaces["๐ŸŽจ Six Ways to Interact"]
        IRIS[๐Ÿ”ด IRIS Terminal<br/>HAL-9000 Inspired]
        CHAT[๐Ÿ’ฌ Chat Assistant<br/>Natural Language]
        WEB[๐ŸŒ Web App<br/>Visual Interface]
        TUI[๐ŸŽจ Terminal UI<br/>Bubble Tea]
        CLI[โŒจ๏ธ CLI<br/>Scriptable]
        MOBILE[๐Ÿ“ฑ Mobile<br/>Slack + ESP32]
    end

    subgraph Core["๐Ÿง  AI Core"]
        MCP[Model Context Protocol]
        LLM[Multi-LLM Support<br/>Ollama, OpenAI, Claude]
        API[REST API + Auth]
    end

    subgraph Backend["๐Ÿ’พ Backend"]
        DB[(PostgreSQL<br/>Prisma ORM)]
        TOOLS[Booking Tools<br/>Rooms, Users, Calendar]
    end

    IRIS --> MCP
    CHAT --> MCP
    WEB --> API
    TUI --> API
    CLI --> API
    MOBILE --> API

    MCP --> LLM
    MCP --> API
    API --> TOOLS
    TOOLS --> DB

    style IRIS fill:#330000,stroke:#ff0000,color:#fff
    style CHAT fill:#1a1a2e,stroke:#0f3460,color:#fff
    style Core fill:#2d3436,stroke:#fdcb6e,color:#fff
    style Backend fill:#2d3436,stroke:#00b894,color:#fff
Loading

๐ŸŽฏ Choose Your Interface

Interface Best For Technology Port Documentation
๐Ÿ”ด IRIS Power users who love retro-futuristic terminals Node.js + HAL-9000 CSS 3002 ๐Ÿ“– IRIS Docs
๐Ÿ’ฌ Chat Natural conversation and AI assistance Node.js + Multi-LLM 3001 ๐Ÿ“– Chat Docs
๐ŸŒ Web Visual, mobile-friendly experience React + TypeScript 5173 ๐Ÿ“– Web Docs
๐ŸŽจ TUI Terminal enthusiasts and keyboard warriors Go + Bubble Tea - ๐Ÿ“– TUI Docs
โŒจ๏ธ CLI Automation, scripting, CI/CD Go + Cobra - ๐Ÿ“– CLI Docs
๐Ÿ“ฑ Mobile Slack teams and room displays Integration Guides - ๐Ÿ“– Guides

โœจ Standout Features

๐Ÿค– AI-First Design

  • Natural Language Processing: Talk to your booking system like a colleague
  • Multi-LLM Support: Choose between Ollama (local), OpenAI, or Anthropic
  • Model Context Protocol: Standardized AI tool integration across all interfaces
  • Intelligent Suggestions: AI recommends available times, rooms, and resolves conflicts

๐ŸŽจ Multiple Interfaces

  • IRIS Terminal: HAL-9000 inspired with CRT scanlines, pulsing red eye, typing animations
  • Chat Assistant: Modern chat UI with markdown rendering, tables, and streaming responses
  • Web App: React SPA with shadcn/ui components and dark mode
  • Terminal UI: Vim keybindings, beautiful TUI built with Bubble Tea
  • CLI: Fast, scriptable commands for automation
  • Integrations: Slack bot guide, ESP32 display guide

๐Ÿ”’ Type Safety Everywhere

  • OpenAPI-First: Single source of truth (api/openapi.yaml)
  • Generated Clients: TypeScript and Go types auto-generated
  • End-to-End Safety: From database to frontend

๐Ÿข Enterprise Ready

  • Multi-location: 7 offices across Norway and Lithuania
  • Role-based Access: Admin, Manager, User roles
  • Real-time Conflict Detection: Prevent double-bookings
  • Calendar Integration: iCal export for Google Calendar, Outlook
  • Feedback System: Room feedback with resolution workflows

๐Ÿš€ Quick Start

Prerequisites

What you'll need (click to expand)

Required:

  • Node.js 20.x or higher
  • PostgreSQL (or Docker)

Optional (depending on interface):

  • Go 1.24.3+ (for TUI/CLI)
  • Docker & Docker Compose (for containerized deployment)
  • Ollama (for local AI, recommended)

For AI Features: Choose one:

  • ๐Ÿฆ™ Ollama (local, free, private)
  • ๐Ÿค– OpenAI API key (ChatGPT)
  • ๐Ÿง  Anthropic API key (Claude)

One-Command Setup

# Clone and setup everything
git clone <repo-url> miles-assistant
cd miles-assistant
./start-dev.sh

This automatically:

  • โœ“ Checks prerequisites (Docker, Ollama)
  • โœ“ Pulls LLM model if needed
  • โœ“ Starts PostgreSQL in Docker
  • โœ“ Runs database migrations and seeding
  • โœ“ Starts API on port 3000
  • โœ“ Starts Chat Assistant on port 3001
  • โœ“ Performs health checks
  • โœ“ Shows you URLs and credentials

Access Your Interfaces

After setup completes:

Interface URL Credentials
API Documentation http://localhost:3000/api-docs N/A
Chat Assistant http://localhost:3001 Login required
IRIS Terminal http://localhost:3002 Login required
Web App http://localhost:5173 Login required

Test Accounts (all passwords: password123):

  • Admin: admin@miles.com
  • Manager: manager.stavanger@miles.com
  • User: john.doe@miles.com

Choose Your Adventure

Want the HAL-9000 experience?

cd iris
npm start
# Open http://localhost:3002

Prefer chat?

cd chat-app
npm start
# Open http://localhost:3001

Go developer?

./install.sh           # Installs TUI and CLI
miles-booking          # Launch TUI
miles login user@mail  # Use CLI

Just want the web UI?

cd web
npm install
npm run dev  # http://localhost:5173

๐Ÿ“š Documentation

Core Documentation

Interface Documentation

API & Integration

Implementation Guides


๐Ÿ—๏ธ Architecture Overview

Technology Stack

Component Technology Purpose
API Node.js, Express, TypeScript, Prisma Core backend with REST API and MCP server
IRIS Node.js, Express, Vanilla JS HAL-9000 inspired terminal assistant
Chat Node.js, Express, marked.js AI chat with markdown rendering
Web React, TypeScript, Vite, shadcn/ui Modern web application
TUI Go, Bubble Tea, Lipgloss Beautiful terminal interface
CLI Go, Cobra Scriptable command-line tool
Database PostgreSQL, Prisma ORM Persistent data storage
AI Layer Ollama / OpenAI / Anthropic Natural language processing
Protocol Model Context Protocol (MCP) Standardized AI tool interface

Project Structure

miles-assistant/
โ”œโ”€โ”€ api/                    # ๐Ÿ”Œ REST API & MCP Server
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ””โ”€โ”€ mcp/            # Model Context Protocol tools
โ”‚   โ”œโ”€โ”€ prisma/             # Database schema & migrations
โ”‚   โ””โ”€โ”€ openapi.yaml        # OpenAPI specification
โ”‚
โ”œโ”€โ”€ iris/                   # ๐Ÿ”ด HAL-9000 Terminal Assistant
โ”‚   โ”œโ”€โ”€ public/             # Frontend (HTML/CSS/JS)
โ”‚   โ”œโ”€โ”€ server.js           # MCP client + LLM integration
โ”‚   โ””โ”€โ”€ llm-providers.js    # Multi-LLM abstraction
โ”‚
โ”œโ”€โ”€ chat-app/               # ๐Ÿ’ฌ AI Chat Assistant
โ”‚   โ”œโ”€โ”€ public/             # Frontend with markdown rendering
โ”‚   โ”œโ”€โ”€ server.js           # Express + MCP + LLM
โ”‚   โ””โ”€โ”€ llm-providers.js    # Multi-LLM support
โ”‚
โ”œโ”€โ”€ web/                    # ๐ŸŒ React Web App
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/     # shadcn/ui components
โ”‚   โ”‚   โ”œโ”€โ”€ lib/api/        # Generated API client
โ”‚   โ”‚   โ””โ”€โ”€ pages/          # App routes
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ tui/                    # ๐ŸŽจ Terminal UI (Go)
โ”‚   โ”œโ”€โ”€ internal/
โ”‚   โ”‚   โ”œโ”€โ”€ generated/      # OpenAPI-generated types
โ”‚   โ”‚   โ””โ”€โ”€ ui/             # Bubble Tea views
โ”‚   โ””โ”€โ”€ Makefile
โ”‚
โ”œโ”€โ”€ cli/                    # โŒจ๏ธ CLI (Go)
โ”‚   โ”œโ”€โ”€ internal/
โ”‚   โ”‚   โ”œโ”€โ”€ generated/      # OpenAPI-generated types
โ”‚   โ”‚   โ””โ”€โ”€ commands/       # Cobra commands
โ”‚   โ””โ”€โ”€ Makefile
โ”‚
โ”œโ”€โ”€ docs/                   # ๐Ÿ“š Integration Guides
โ”‚   โ”œโ”€โ”€ SLACK_BOT_GUIDE.md
โ”‚   โ””โ”€โ”€ ESP32_DISPLAY_GUIDE.md
โ”‚
โ”œโ”€โ”€ ARCHITECTURE.md         # System architecture deep-dive
โ”œโ”€โ”€ GETTING_STARTED.md      # Comprehensive setup guide
โ”œโ”€โ”€ docker-compose.yml      # Container orchestration
โ”œโ”€โ”€ start-dev.sh            # Development startup script
โ””โ”€โ”€ install.sh              # CLI/TUI installer

๐ŸŽฎ Example Workflows

Natural Language Booking (IRIS or Chat)

> I need a room for 6 people tomorrow at 2pm

IRIS: I found Teamrommet which seats 8 people. Would you like
      to book it for 1 hour starting at 2:00 PM?

> yes, make it 2 hours

IRIS: โœ“ Booked Teamrommet for 2025-10-21 from 14:00-16:00

CLI Automation

# Script to book daily standup
#!/bin/bash
miles book \
  --room "Focus Room" \
  --start "$(date +%Y-%m-%d) 09:00" \
  --duration 15 \
  --title "Daily Standup" \
  --recurring weekly

TUI Power User

Press 'q' for quick book
Select room with j/k
Press Enter to book
Press '/' to search

๐Ÿงช Development

Start Development Environment

# Start everything (database, API, chat-app)
./start-dev.sh

# Check status of all services
./status.sh

# View logs (interactive menu)
./logs.sh

# Stop all services
./stop-dev.sh

Individual Component Development

API:

cd api
npm run dev              # Hot reload
npm run prisma:studio    # Database GUI

IRIS:

cd iris
npm run dev              # Hot reload (node --watch)

Chat:

cd chat-app
npm start

Web:

cd web
npm run dev
npm run generate         # Regenerate API client

TUI/CLI:

cd tui  # or cd cli
make generate            # Generate types from OpenAPI
make build
make run

๐Ÿณ Docker Deployment

Complete Docker setup with nginx reverse proxy - ๐Ÿ“– Full Docker Documentation

One-Command Start

# Start all services (database, API, chat, IRIS, web, nginx)
docker-compose up -d

Access Everything via Nginx (Port 80):

Or Direct Service Access:

Development with Hot-Reload

# Use development config with volume mounts
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

# Or hybrid: Database in Docker, services local
docker-compose up -d postgres
cd api && npm run dev
cd web && npm run dev

See README-DOCKER.md for:

  • ๐Ÿ“‹ Detailed setup instructions
  • ๐Ÿ”ง Development workflows
  • ๐Ÿ› Troubleshooting guide
  • ๐Ÿš€ Production deployment

๐ŸŒ Office Locations

Miles Assistant supports 7 office locations:

๐Ÿ‡ณ๐Ÿ‡ด Norway

  • Stavanger (5 meeting rooms)
  • Haugesund
  • Oslo
  • Bergen
  • ร…lesund
  • Innlandet (Lillehammer)

๐Ÿ‡ฑ๐Ÿ‡น International

  • Lithuania (Vilnius)

๐Ÿค Contributing

This is a Miles internal project. For development guidelines, see:


๐Ÿ“„ License

MIT License - see LICENSE file for details


โญ Powered By

Model Context Protocol โ€ข OpenAPI โ€ข Ollama โ€ข Prisma


Built with โค๏ธ for Miles

From a booking system to a full AI assistant platform

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •