Simulacre AI

Documentation

Project documentation rendered from bundled README sources.

# Simulacre AI Web Docs

Simulacre AI is a market intelligence workspace that combines:

- AI chat and reasoning modes
- Asset analysis with charting and export
- Telegram-sourced news monitoring
- Real-time widgets and market overview
- Telegram bot and Telegram Mini App access
- Analysis email delivery with PDF/DOCX attachments

## Core Stack

- FastAPI backend
- Next.js frontend
- Perplexity Sonar for latest-info, fact-check, and Sonar flows
- Supabase for Telegram access, beta requests, and quotas
- Resend for analysis email delivery

## Main Screens

- `Landing` - product overview with terminal-style shell
- `Chat Workspace` - operator chat plus analysis panel
- `Discover` - widgets and market overview
- `Documentation` - project docs
- `About` - product and workflow summary
- `Telegram Mini App` - compact mobile workflow inside Telegram

## Analysis

Analysis combines:

- market candles
- technical signal extraction
- news context
- probability summary
- support / resistance levels
- deep reasoning as a second pass

Export options:

- PDF
- DOCX
- JPEG
- Email with PDF/DOCX attachments

## Sonar

Sonar returns web source links.

- If a source URL points directly to a PDF, the user can open that link and download the file in the browser.
- The app does not currently provide a dedicated built-in "download PDF from Sonar" action.

## Telegram Bot

The Telegram bot supports:

- explicit Chat and Sonar modes
- widgets
- news
- analysis
- deep reasoning
- audio transcription in chat flow
- beta access request to admin

Free tier limits:

- chat: 5 requests/day
- analysis: 1/day
- widgets: 1/day
- news: 1/day

Premium is granted by admin approval.

## Deployment Notes

- `api` and `telegram-bot` run from repository root
- `web` runs from `apps/web`
- Supabase SQL setup for Telegram beta requests and persistent quotas is in `infra/supabase_telegram.sql`

## Environment

Important variables:

- `OPENROUTER_KEY`
- `PERPLEXITY_API_KEY`
- `TELEGRAM_BOT_TOKEN`
- `TELEGRAM_BOT_USERNAME`
- `NEXT_PUBLIC_TELEGRAM_BOT_USERNAME`
- `SUPABASE_URL`
- `SUPABASE_SERVICE_ROLE_KEY`