How habuskid/renaiss-intelligence-agent works
Purpose and entry points
Renaiss Intelligence Agent is a client-side React/Vite terminal for researching tokenized physical collectibles and real-world assets on BNB Chain. It combines live Renaiss market data with Gemini-generated investment analysis, FMV estimates, liquidity signals, and trade history.
Application bootstrap is src/main.jsx; top-level screen/state orchestration is in src/App.jsx. The browser shell is index.html.
Application composition
The UI is organized around a search-to-analysis workflow:
• src/components/LandingPage.jsx presents the initial terminal/featured-asset experience.
• src/components/SearchBar.jsx captures asset queries.
• src/components/SearchResults.jsx renders returned asset candidates and selection outcomes.
• src/components/FeaturedCards.jsx and src/components/CardResult.jsx provide asset discovery and result-card presentation.
src/components/Header.jsx provides shared terminal navigation/chrome.
Market-data boundary
src/services/renaiss.js is the external market-data integration boundary. It uses the Renaiss credentials supplied through Vite environment variables and supplies the UI with current asset information, historical trades, and FMV time-series data.
The client exposes API credentials via VITE_RENAISS_API_KEY and VITE_RENAISS_API_SECRET; deployment must therefore treat this as a browser-side integration rather than a protected server-side API boundary.
Analysis pipeline
src/services/gemini.js owns the Gemini REST integration. It builds prompts from market/history inputs, requests structured JSON analysis, parses model output, and handles overload/rate-limit behavior with retry and exponential backoff.
src/components/AiAnalysis.jsx is the presentation boundary for the generated recommendation, market trend, buy-window, and collector-oriented insights. Local browser storage enforces the documented three-analysis session quota and cooldown before requests reach Gemini.
Market visualization and evidence
Selected-asset data is rendered as separate evidence views:
• src/components/FmvChart.jsx visualizes FMV history using Recharts.
• src/components/TradeHistory.jsx presents historical transactions.
• src/components/StatsRow.jsx summarizes key market metrics.
• src/components/StarRating.jsx and src/components/TrendBadge.jsx communicate derived ratings and directional signals.
This keeps raw/live market information distinct from Gemini’s interpretive analysis.
Data shaping and presentation
Shared client-side normalization is concentrated in src/utils/formatters.js for values such as currency and dates, while src/utils/parseHref.js handles link extraction/parsing. Global styling and terminal visual language come from src/index.css, with Tailwind configuration in tailwind.config.js.
Runtime and external dependencies
The app runs in the browser on React 19, built and served by Vite (vite.config.js). It relies on Google Gemini REST via VITE_GEMINI_API_KEY, the Renaiss market API, Recharts for charts, Heroicons for icons, Tailwind plus custom CSS for the dark terminal UI, and localStorage for analysis quota state.
Main entry points: App.jsx App state orchestration · AiAnalysis.jsx AI analysis view · LandingPage.jsx Landing experience · gemini.js Gemini analysis client
Components 17
React UI
Client-side search, selection, and analysis experience.
- React bootstrap
src/main.jsx - App state orchestration · Coordinates search, asset selection, and analysis state.
src/App.jsx - Landing experience
src/components/LandingPage.jsx - Terminal header
src/components/Header.jsx - Asset search
src/components/SearchBar.jsx - Search results
src/components/SearchResults.jsx - Featured and result cards
src/components/FeaturedCards.jsx - AI analysis view · Enforces local session quota and cooldown before Gemini requests.
src/components/AiAnalysis.jsx
Service Integrations
Browser-side external API boundaries.
- Renaiss market client · Uses browser-exposed Renaiss credentials for live asset, trade, and FMV data.
src/services/renaiss.js - Renaiss market API
- Gemini analysis client · Builds market-informed prompts, parses structured JSON, and retries rate limits.
src/services/gemini.js - Gemini REST API
Market Evidence Views
Raw market data remains separate from AI interpretation.
- FMV, trades, and stats · Renders FMV history, transaction history, and key market metrics.
src/components/FmvChart.jsx - Ratings and trend signals
src/components/StarRating.jsx
Other components
- Browser
index.html - localStorage quota state
- Formatting utilities · Normalizes currency and dates for presentation.
src/utils/formatters.js
Connections 20
- Browser → React bootstrap: loads
- React bootstrap → App state orchestration: mounts
- App state orchestration → Terminal header: renders
- App state orchestration → Landing experience: renders initial view
- Landing experience → Asset search: contains
- Landing experience → Featured and result cards: shows
- Asset search → App state orchestration: query
- App state orchestration → Renaiss market client: fetches market data
- Renaiss market client → Renaiss market API: API requests
- App state orchestration → Search results: renders candidates
- Search results → App state orchestration: selects asset
- App state orchestration → FMV, trades, and stats: provides selected market data
- FMV, trades, and stats → Ratings and trend signals: renders derived indicators
- App state orchestration → AI analysis view: provides selected asset context
- AI analysis view → localStorage quota state: checks quota and cooldown
- AI analysis view → Gemini analysis client: requests analysis
- Gemini analysis client → Gemini REST API: REST requests
- Gemini analysis client → AI analysis view: structured recommendation
- Formatting utilities → FMV, trades, and stats: formats values
- Formatting utilities → Search results: formats values