← Back to Talent Portal
Login to report
🌐
Web App

AI Crypto Chart Advisor

👤 by Tehzeeb Shah 📍 Karachi 📅 Sep 3, 2026 ⏱ 21.8h build time
❤️ 0
Upvotes
88
🤖 AI Score
18
👁 Views

📦 Deliverables

🎯 Problem Statement

Crypto traders rarely get a quick, objective second opinion before entering a trade. Manual chart analysis means opening TradingView, drawing levels and calculating risk-reward by hand - slow and error-prone, especially for beginners. There was no simple tool that combines live market data, classic technical indicators and an AI review into one clear BUY / SELL / HOLD call with a complete, ready-to-use trade setup.

🛠️ What I Built

A full-stack web app deployed live on Linux/Plesk. The user picks any crypto pair and a timeframe from 1m to 1d - including a custom 10m timeframe that Binance does not offer, synthesized by merging pairs of 5m candles. The app pulls live candlesticks from Binance with 4-host failover and a 45-second file cache, computes technical indicators in pure PHP (EMA 20/50/200, RSI, MACD, Bollinger, Stochastic, ATR, support/resistance), then sends them to an LLM for a structured JSON second opinion. A weighted 60/40 merge (technicals/AI) produces the final signal with confidence. Every analysis returns a complete trade plan: direction, entry, stop-loss (1.5x ATR), TP1/TP2, risk-reward and an exit checklist - rendered on an interactive candlestick chart with EMA/Bollinger overlays and Entry/SL/TP price lines. Includes user accounts (CSRF, bcrypt, session regeneration), MySQL history, screenshot proxy uploads, a live homepage ticker + hero chart, one-click demo login, and a fully responsive mobile layout. Full source and setup instructions on GitHub; 106-assertion unit test suite covering all indicator math, signal fusion and trade-plan invariants (runs with: php tests/run_tests.php).

🔥 Challenges I Faced

Deploying with no shell access (server user has /bin/false), so everything shipped over flaky FTP plus the Plesk XML API. Python hosting was unavailable, so the whole app was ported to dependency-free PHP 8.4. Hunted invisible bugs caused by a UTF-8 BOM that PHP emitted before headers and binary image output. The MySQL table column 'signal' is a reserved word and silently broke inserts until every query was backticked. Binance blocks some requests, requiring multi-host failover plus caching. The reasoning AI model sometimes returned truncated JSON - fixed by raising max_tokens and writing defensive JSON extraction with truncation detection. The Plesk WAF even blocked my test client's default user-agent. The 10m timeframe had to be synthesized from 5m data. Writing the test suite surfaced two real production bugs: RSI returned a neutral 50 for a pure zero-loss uptrend (should be 100), and the technical scorer emitted warnings on partial indicator arrays - both fixed and pinned by regression tests.

💡 What I Learned

How to ship a real product on budget shared hosting: work within platform limits, verify every change over real HTTP, and never call a deploy done until you see the 200. Practical web security end-to-end: CSRF tokens, output escaping, prepared statements, ownership checks and authenticated file proxies. Deeper command of technical-analysis math (ATR-based stops, risk-reward) and LLM APIs - structured prompting, token limits, defensive parsing. The value of testing: a small dependency-free suite caught two genuine math bugs in shipped code. And remote debugging without server logs: isolate variables and probe methodically from the client side.

🚀 Future Improvements

Wire the real custom domain to remove the preview-domain warning; price alerts with Web Push when a signal flips; multi-pair batch scanning; a backtesting mode that scores past signals; a Telegram bot; portfolio tracking of executed trades against their original plans; and Composer/PHPStan integration in CI.

🧰 Tech Stack & AI Tools

PHP 8.4 FPM MySQL/MariaDB vanilla JavaScript (Lightweight Charts v4 self-hosted) Binance REST API Plesk Linux hosting. Zero Composer dependencies - everything is pure PHP.
🤖 AI Tools:
OpenCode CLI powered by Kimi K2.6 via the jugaar LLM gateway; the app itself calls an OpenAI-compatible chat API at runtime for trade second opinions

🤖 AI Reviewer Feedback

Great job delivering a fully functional, secure web app with solid testing and clever workarounds for shared‑hosting limits. To boost reliability, consider adding rate‑limiting and more robust fallback handling for the AI API, and modularize the indicator logic for easier maintenance and future extensions.