C-Radar is a full-stack, blazing-fast cryptocurrency tracking dashboard built to keep you constantly updated with the market momentum. The application seamlessly integrates the CoinGecko API for real-time market data alongside Google Gemini AI to provide an intelligent, live-context chat assistant—and does it all securely through a robust stateless Rust backend proxy.
- Frontend: Next.js (App Router), React, Tailwind CSS, Lucide React Mapped Icons.
- Backend Proxy: Rust, Tokio, Axum, reqwest.
This application utilizes a decoupled proxy approach to strongly protect API keys:
- The Browser: The Next.js React client runs statically, strictly making basic API calls to the Rust proxy (
http://127.0.0.1:8080). It houses no database or session logic, saving lightweight user-preferences tolocalStorageor pure uncommitted state. - The Rust Backend Proxy: The Rust
/backendis fully stateless. When it receives a request to/marketor/insight, it utilizesreqwestto independently query the CoinGecko API or Google Gemini models securely behind closed doors using locally stored secret keys. - Live AI Triggers: Because the Gemini API inherently lacks current market context, asking our chatbot "What's the market like?" triggers a real-time fetch to CoinGecko inside the Rust backend first, formatting the top 10 current circulating tokens accurately into the Gemini prompt dynamically before sending your question over. This allows your AI to answer as a globally informed trading assistant!
You'll need two separate .env files (one for the frontend Node system, one for the backend Rust system). Example files are provided.
First, set up your Next.js file in the root directory:
cp .env.local.example .env.localNext, set up the backend Rust variables:
cd backend
cp .env.example .envInside backend/.env, you must insert your valid CoinGecko and Gemini API Keys!
cd backend
cargo runOpen a new terminal at the root directory of the application:
npm install
npm run devThe application is now up and humming smoothly. Visit http://localhost:3000 to dive into the market!
