Every day, investors compare stocks and crypto before making decisions. I wanted to automate this with AIβso I built Peaxer, a free platform that generates AI-powered side-by-side comparisons.
Here is a deep dive into how the system works under the hood.
π The Stack
- Frontend: Astro (SSG for speed & SEO)
- Hosting: Cloudflare Pages
- AI Engine: Groq API (Llama 3.1)
- API Proxy: Cloudflare Workers
- Database: Cloudflare KV (for user voting)
- Automation: GitHub Actions
- Data Sources: CoinGecko API & TradingView Widgets
π€ Automated Content Pipeline
The entire pipeline runs without any manual intervention. Every day at 06:00 UTC, a GitHub Actions workflow kicks off:
- Selection: A Python script picks random pairs from a pool of 130+ assets.
- Generation: Groq API generates a detailed Turkish comparison.
- Localization: The same API translates the content into English.
- Deployment: Astro builds 700+ static pages, and Cloudflare Pages deploys them automatically.
βοΈ The "AI Stock Battle" Feature
One of the most engaging features is the AI Stock Battle.
Users can pick any two assets, and the AI analyzes them in real-time through a Cloudflare Worker proxy. It returns a winner based on growth potential, risk level, and innovation score.
π Bilingual SEO Strategy
To maximize reach, every comparison exists in both Turkish and English:
- Hreflang Tags: Proper implementation for search engines.
- Separate Sitemaps: Organized by language.
- Structured Data: Uses Article + FAQ schema to win rich snippets.
π‘ Key Learnings
- Static > Dynamic: Astro SSG + Cloudflare Pages delivers near-perfect Core Web Vitals with zero server costs.
- Free AI APIs work: Groqβs free tier is incredibly fast and reliable for production.
- Workers are Swiss Army Knives: Used for API key masking and KV storage.
π Try It Out
Check out the live project or dive into the code:
- Live Site: Peaxer.com
- Open Source: github.com/ozamanlar/peaxer-web
Top comments (0)