A Progressive Web App (PWA) for grading trades using the PREPARE methodology, featuring AI-powered analysis with web search capabilities.
Architecture: 100% client-side static web application. No backend server, uses localStorage for data persistence and public CORS proxies for API access.
- Grade Tab: Pre-trade psychology check, pattern recognition, and risk assessment
- Trade Tracker: Plan builder with entry price, stop loss (5-10%), and profit target (15-30%) sliders
- Trade History: Search and filter saved trades with detailed trade plan display
- AI Assistant: Integration with GitHub Models API for trade analysis
- File Attachments: Upload images, charts, and documents for AI analysis
- Vision Models: Automatic chart analysis, OCR, and pattern recognition
- Multiple Files: Attach up to 10 files simultaneously
- Smart Processing: Images analyzed, text extracted, patterns detected
- Web Search Tool: AI-powered web search via DuckDuckGo (free public API) with custom DOM-based scraping
- Static Backend Server: Client-side OAuth authentication handler for GitHub Copilot models
- CORS Widget: Public CORS proxy fallback system (corsproxy.io, cors.sh, codetabs)
- Chat History: Persistent conversation history in localStorage
- Syntax Highlighting: Code blocks with language detection and copy buttons
SFti.Trade_Grade/
├── LICENSE
├── .github
│ └── FUNDING.yml
├── docs
│ ├── AI_ASSISTANT.md
│ ├── API_REFERENCE.md
│ ├── INSTALLATION.md
│ ├── MODULES.md
│ ├── PREPARE_METHODOLOGY.md
│ ├── README.md
│ ├── TECHNICAL.md
│ └── USER_GUIDE.md
├── index.html
└── system
├── auth
│ └── callback
│ └── index.html
├── cs.+
│ ├── base.css
│ ├── chat.css
│ ├── components.css
│ ├── grading.css
│ ├── menu.css
│ ├── modal.css
│ ├── models.css
│ ├── responsive.css
│ ├── sliders.css
│ ├── styles.css.backup
│ └── toast.css
├── img
│ ├── icon-192.png
│ └── icon-512.png
└── js.on
├── ai.js
├── app.js.backup
├── auth.js
├── chat.js
├── config.js
├── grading.js
├── image-processor.js
├── init.js
├── manifest.json
├── menu.js
├── modal.js
├── models.js
├── screenshot.js
├── sliders.js
├── sw.js
├── toast.js
├── utils.js
└── web-search.js
8 directories, 43 files
This app can be installed as a PWA on mobile devices and desktop browsers. Visit the deployed site and follow your browser's "Add to Home Screen" or "Install" prompt.
- Grade a Stock: Enter ticker, adjust PREPARE sliders, add screenshot
- Build Trade Plan: Set entry price, stop loss, and profit target
- Save & Review: View trade history with search and filter capabilities
The app is a single-page application built with vanilla HTML, CSS, and JavaScript. No build process required - just serve the files from a web server.