Commit Graph

183 Commits

Author SHA1 Message Date
feb65131fa Merge pull request 'fix: populate config endpoints with chain and token data' (#33) from fix/issue-27 into main 2026-04-09 08:23:43 +02:00
shokollm
50af4e0722 fix: reduce tokens limit to 20 per review 2026-04-09 06:18:31 +00:00
shokollm
786e964e32 fix: return bsc chain and tokens from AVE API in config endpoints 2026-04-09 06:02:05 +00:00
41b699f9ee Merge pull request 'fix: make strategy_config and llm_config optional in BotCreate' (#32) from fix/issue-26 into main 2026-04-09 07:54:20 +02:00
shokollm
ccc0404cd1 fix: make strategy_config and llm_config optional in BotCreate schema 2026-04-09 05:30:12 +00:00
shokollm
0a2e347fdb feat: Add database init on startup and documentation
- Add lifespan handler to main.py for automatic DB table creation
- Expand .env.example with detailed variable documentation
- Add AUDIT_REPORT.md with comprehensive product/technical review
- Add STRATEGY_SCHEMA.md as single source of truth for strategy config
- Remove redundant init_db.py script (DB init now handled by app startup)
2026-04-09 04:49:11 +00:00
2561759b78 feat: Add deployment documentation and templates (issue #12) (#23) 2026-04-09 01:23:53 +02:00
b6f99aa8fe Merge pull request '[Backend] AVE Cloud Integration - Data and Trading APIs' (#22) from fix/issue-11 into main 2026-04-08 16:49:13 +02:00
shokollm
3806af3e23 feat(backend): Implement AVE Cloud integration for Data and Trading APIs
- Add tier field to User model for plan detection (free/normal/pro)
- Create AVE Cloud API client with all Data API endpoints:
  - Token search (GET /v2/tokens)
  - Batch prices (POST /v2/tokens/price)
  - Token details (GET /v2/tokens/{id})
  - Kline data (GET /v2/klines/token/{id})
  - Trending tokens (GET /v2/tokens/trending)
  - Token risk (GET /v2/contracts/{id})
- Add Trading API endpoints:
  - Chain wallet quote (POST /v1/chain/quote)
  - Chain wallet swap (POST /v1/chain/swap)
- Add tier gating with upsell messaging for Pro features
- Handle rate limiting gracefully with 429 responses
- Add Pydantic schemas for AVE API requests/responses

Fixes #11
2026-04-08 14:41:40 +00:00
a892a403fb Merge pull request '[Frontend] Components - Chat UI, Dashboard, Visualizations' (#21) from fix/issue-10 into main 2026-04-08 16:23:23 +02:00
shokollm
0bb5d9a5d6 feat: Implement frontend UI components for issue #10
Created the following components:
- ChatInterface: Message input, AI responses, chat history with bot selector dropdown
- BotCard: Bot preview card for dashboard
- BotSelector: Dropdown to select bot (max 3 bots)
- StrategyPreview: Shows parsed strategy config in readable format
- SignalChart: Visual representation of signals over time (SVG-based)
- BacktestChart: Portfolio value chart with metrics display
- ProUpgradeBanner: Upsell banner for Pro features
- TokenPicker: Search/select tokens for conditions
- ConditionBuilder: UI for building trading conditions

Updated pages to use new components:
- Dashboard now uses BotCard
- Bot detail page now uses ChatInterface and StrategyPreview
- Backtest page now uses BacktestChart
- Simulate page now uses SignalChart and ProUpgradeBanner
2026-04-08 13:41:43 +00:00
875427a0c1 Merge pull request '[Frontend] Project Setup - Svelte with TypeScript' (#20) from fix/issue-9 into main 2026-04-08 15:17:10 +02:00
shokollm
5eb623f022 feat: setup SvelteKit frontend with TypeScript
Implemented issue #9 - Frontend Project Setup with Svelte and TypeScript.

Changes:
- Created SvelteKit project with TypeScript
- Set up routing structure:
  - / (landing page)
  - /login
  - /register
  - /dashboard
  - /bot/[id]
  - /bot/[id]/backtest
  - /bot/[id]/simulate
  - /settings
- Created Svelte stores for state management:
  - userStore - Current user info
  - botsStore - List of user's bots
  - currentBotStore - Selected bot
  - chatStore - Chat messages
  - backtestStore - Backtest results
  - simulationStore - Simulation signals
  - authStore - Authentication state
- Created API client for backend communication
- Set up environment variables (.env.example)
- Created auth store with protected routes and login/register functionality
2026-04-08 12:58:33 +00:00
a59a1ccd97 Merge pull request '[Backend] Simulate Engine - Real-time Signal Detection' (#19) from fix/issue-8 into main 2026-04-08 14:57:28 +02:00
shokollm
965efa122b feat: implement Simulate Engine for real-time signal detection
Implement simulate engine for real-time signal detection via REST polling.

Changes:
- SimulateEngine service with configurable check interval (default 60s for free tier)
- REST polling for current prices using AveCloudClient
- Condition matching for real-time data (price_drop, price_rise, volume_spike, price_level)
- Signal logging with user-initiated start/stop
- Simulation API endpoints:
  - POST /api/bots/{id}/simulate - Start simulation
  - GET /api/bots/{id}/simulate/{run_id} - Get status/signals
  - GET /api/bots/{id}/simulations - List all simulations
  - POST /api/bots/{id}/simulate/{run_id}/stop - Stop simulation
- Updated SimulationCreate schema with check_interval field
- Free tier limited to 60s minimum check interval
- Signals stored in database for simulation signal history

Depends on issue #7 (Backtest Engine) which was merged in PR #18
2026-04-08 11:25:51 +00:00
0fb16f06e4 Merge pull request '[Backend] Backtest Engine - Historical Data Replay' (#18) from fix/issue-7 into main 2026-04-08 13:21:56 +02:00
shokollm
a461005015 Implement Backtest Engine - Historical Data Replay
Implements issue #7 - Backtest Engine for historical strategy testing.

Changes:
- Created AveCloudClient for fetching klines from AVE Cloud Data API
- Implemented BacktestEngine with condition matching (price_drop, price_rise, volume_spike, price_level)
- Implemented signal generation and portfolio simulation
- Calculates metrics: total_return, win_rate, max_drawdown, sharpe_ratio, total_trades
- Implemented async/background backtest execution via FastAPI BackgroundTasks
- Stores results in backtests table and signals table
- All backtest API endpoints with JWT auth and ownership validation

API Endpoints:
- POST /api/bots/{id}/backtest - Start backtest
- GET /api/bots/{id}/backtest/{run_id} - Get status/results
- GET /api/bots/{id}/backtests - List all backtests
- POST /api/bots/{id}/backtest/{run_id}/stop - Stop running backtest
2026-04-08 09:39:07 +00:00
b0311bc96f Merge pull request '[Backend] Chat Interface + CrewAI Integration' (#17) from fix/issue-6 into main 2026-04-08 08:37:58 +02:00
shokollm
a280217254 feat: implement chat interface with CrewAI integration
- Create MiniMax LLM connector for CrewAI integration
- Implement TradingCrew with trading_designer, strategy_validator, strategy_explainer
- Add strategy parsing from natural language to strategy_config JSON
- Update chat endpoint with CrewAI integration and conversation context
- Add strategy validation logic
- Add explanation generation for user-friendly responses
- Add BotChatRequest/BotChatResponse schemas

Fixes #6
2026-04-08 06:29:05 +00:00
0cc3327991 Merge pull request '[Backend] Bot CRUD - Bot Management with Max 3 Limit' (#16) from fix/issue-5 into main 2026-04-08 08:16:19 +02:00
shokollm
429d46c6d0 feat: implement bot CRUD with 3-bot limit per user 2026-04-08 06:05:43 +00:00
a2f0c9a0e9 Merge pull request '[Backend] Auth System - JWT Authentication' (#15) from fix/issue-4 into main 2026-04-08 08:01:24 +02:00
shokollm
42640679c7 feat: implement JWT authentication system
- Add register endpoint with bcrypt password hashing
- Add login endpoint returning JWT tokens
- Add logout endpoint with token blacklisting
- Add /me endpoint for current user info
- Add rate limiting (5/minute) for login attempts using slowapi
- Add user settings GET and PATCH endpoints
- Create auth middleware via get_current_user dependency
- Add UserSettings and UserSettingsUpdate schemas
2026-04-08 05:48:38 +00:00
f59e595ffd Merge pull request '[Backend] Database Models - Add missing Pydantic schemas' (#14) from fix/issue-3 into main 2026-04-08 06:57:46 +02:00
shokollm
a5e41ab449 Add missing Pydantic schemas for BotConversation and Signal
Based on IMPLEMENTATION_PLAN.md Section 4 schema, the existing schemas.py
was missing schemas for:
- BotConversationCreate/Response (for bot_conversations table)
- SignalResponse (for signals table)

These were identified as gaps during issue #3 review.
2026-04-08 04:41:31 +00:00
6977203748 Merge pull request '[Backend] Project Setup - FastAPI Structure and Dependencies' (#13) from fix/issue-2 into main 2026-04-08 06:35:53 +02:00
shokollm
7dfd79dea2 fix: remove pycache and .env from git tracking
These files are listed in .gitignore but were accidentally committed.
Removing them from git while keeping them locally.
2026-04-08 03:54:26 +00:00
shokollm
a03304f9ef chore: update .gitignore to exclude Python artifacts 2026-04-08 03:49:06 +00:00
shokollm
f2b5bd5f45 feat: backend project setup with FastAPI structure and dependencies
- Create directory structure per IMPLEMENTATION_PLAN.md Section 12
- Add requirements.txt with FastAPI, SQLAlchemy, CrewAI, etc.
- Add core/config.py for environment variable configuration
- Add core/database.py for SQLite connection
- Add core/security.py for password hashing and JWT
- Add FastAPI app entry point (main.py) with all API routers
- Add Uvicorn runner (run.py)
- Add API route stubs (auth, bots, backtest, simulate, config)
- Add db/models.py with SQLAlchemy models
- Add db/schemas.py with Pydantic schemas
- Add service stubs (ai_agent, backtest, simulate engines)
- Add .env.example with all required environment variables
- Verify server starts correctly
2026-04-08 03:48:21 +00:00
shokollm
75a6273013 docs: add Phase 1 implementation plan
- Project overview and target audience
- Architecture diagram (Frontend/Backend/Data layers)
- Tech stack (Svelte, FastAPI, CrewAI, SQLite)
- Database schema with all tables and indexes
- API endpoints (Auth, Bots, Backtest, Simulate, Config)
- CrewAI agent design with roles and tasks
- Backtest engine algorithm
- Simulate engine algorithm
- Frontend pages and components
- Tier gating matrix (Free/Normal/Pro)
- Environment configuration
- Project directory structure
- Deployment steps
- Phase 1 deliverables checklist
- Phase 2 considerations
2026-04-05 22:23:47 +00:00
shokollm
1dd7bf47f3 docs: clarify AVE Cloud does not support testnets
Add important note that AVE Cloud APIs are production/mainnet only.
Include safe testing alternatives: quote/dry-run mode and minimal amounts.
2026-04-05 20:58:10 +00:00
shokollm
90283d7403 docs: expand AVE Claw Hackathon research with code examples and guides
- Added 3 runnable Python scripts for Data REST, Data WebSocket, and Trading APIs
- Expanded research with 7 new sections:
  - Extended API documentation with full request/response examples
  - Working code examples with CLI commands
  - Security guide (API keys, HMAC signing, private key protection)
  - Testing strategies (dry-run, paper trading, testnets)
  - Troubleshooting guide with error codes
  - Competitive analysis vs DexScreener, Moralis, CoinGecko
  - Quick reference appendix

Research doc grew from 242 to 906 lines
2026-04-05 20:52:58 +00:00
shokollm
eabbcd911c docs: add AVE Claw Hackathon 2026 research report 2026-04-05 19:42:53 +00:00