Aptos Hackathon

Project for Aptos Hackathon (backend)

Features

  • Execute AI pipelines using OpenAI models
  • Integration with Model Context Protocol (MCP)
  • Convenient Telegram bot interface
  • Support for dynamic prompts and variables

Prerequisites

  • Docker and Docker Compose installed
  • .env file with required environment variables

Setup

  1. Copy .env.example to .env and configure the settings:
cp .env.example .env
  1. Edit the .env file and set:
    • OPENAI_API_KEY - Your OpenAI API key
    • TELEGRAM_BOT_TOKEN - Your Telegram bot token (get it from @BotFather)
    • MCP_SERVER_URL - (Optional) MCP server URL

Running the Application

Build and start the container:

docker-compose up --build -d

Viewing Logs

docker-compose logs -f

Stopping the Application

docker-compose down

Local Development

Prerequisites

  • Bun installed
  • Node.js

Installing Dependencies

bun install

Running the Application

In development mode with auto-reload:

bun --watch src/main.ts

Or in production mode:

bun run build
bun start

Using the Bot

  1. Find your bot on Telegram using the username you set with @BotFather
  2. Start a chat with the bot
  3. Send any message to the bot, and it will process it through the AI pipeline
  4. The bot will respond with the AI's analysis or action

Project Structure

  • src/bot/ - Telegram bot implementation
  • src/models/ - Data models and interfaces
  • src/pipelines/ - Pipeline execution logic
  • src/services/ - External service integrations
  • src/main.ts - Application entry point

Development

  • Run linter: bun run lint
  • Type checking: bun run ts:check
  • Run all checks: bun run check
  • Code formatting: bun run lint:fix

License

MIT

S
Description
No description provided
Readme
99 KiB
0 Stars 7 Watchers 0 Forks
Languages
TypeScript 99.2%
Dockerfile 0.8%