A production-ready React + Vite dashboard featuring live ISS tracking, a news dashboard, interactive charts, and an AI chatbot powered by Mistral-7B — all in a stunning dark/light mode UI.
| Feature | Description |
|---|---|
| 🛸 ISS Live Tracker | Real-time ISS position via map, updated every 15 seconds |
| 🗺️ Leaflet Map | Interactive map with trajectory polyline & custom ISS marker |
| 📰 News Dashboard | Filterable, searchable news grid with 15-min localStorage cache |
| 🤖 AI Chatbot | Floating Mistral-7B chatbot limited to dashboard data only |
| 📊 Charts | Speed area chart + news doughnut chart (Recharts) |
| 🌙 Dark / Light Mode | Persisted in localStorage |
| 📱 Fully Responsive | Mobile · Tablet · Desktop |
cd foai_appnpm installcp .env.example .envEdit .env and add your keys:
VITE_NEWS_API_KEY=your_newsapi_org_key
VITE_AI_TOKEN=your_huggingface_token- NewsAPI key → https://newsapi.org/register
- HuggingFace token → https://huggingface.co/settings/tokens
Note: The app works without keys — it uses demo space news and simulates AI responses based on live dashboard data.
npm run devnpm run build
npm run preview # preview the production build locallynpm i -g vercel
vercel --prod- Push to GitHub
- Go to vercel.com/new
- Import your repository
- Set Framework Preset to
Vite - Add environment variables in Settings → Environment Variables:
VITE_NEWS_API_KEYVITE_AI_TOKEN
- Click Deploy
foai_app/
├── public/
│ └── iss-icon.svg
├── src/
│ ├── components/
│ │ ├── chat/
│ │ │ └── ChatBot.jsx # Floating AI chatbot
│ │ ├── charts/
│ │ │ ├── SpeedChart.jsx # ISS speed area chart
│ │ │ └── NewsDistributionChart.jsx
│ │ ├── common/
│ │ │ ├── ErrorBoundary.jsx
│ │ │ ├── ErrorCard.jsx
│ │ │ └── Spinner.jsx
│ │ ├── iss/
│ │ │ ├── ISSMap.jsx # Leaflet map
│ │ │ ├── ISSStats.jsx # Stat tiles
│ │ │ └── AstronautPanel.jsx
│ │ ├── layout/
│ │ │ └── Layout.jsx
│ │ └── news/
│ │ ├── NewsCard.jsx
│ │ └── NewsFilters.jsx
│ ├── context/
│ │ ├── ThemeContext.jsx
│ │ ├── ISSContext.jsx # Haversine speed, 15s polling
│ │ ├── NewsContext.jsx # 15-min localStorage cache
│ │ └── ChatContext.jsx # Mistral-7B integration
│ ├── hooks/
│ │ ├── useLocalStorage.js
│ │ ├── useDebounce.js
│ │ └── useMediaQuery.js
│ ├── pages/
│ │ ├── ISSPage.jsx
│ │ ├── NewsPage.jsx
│ │ └── ChartsPage.jsx
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── .env
├── .env.example
├── .gitignore
├── index.html
├── package.json
├── postcss.config.js
├── tailwind.config.js
└── vite.config.js
| API | Endpoint | Purpose |
|---|---|---|
| Where The ISS At | https://api.wheretheiss.at/v1/satellites/25544 |
ISS position & velocity |
| Open Notify (via proxy) | https://api.open-notify.org/astros.json |
People in space |
| NewsAPI | https://newsapi.org/v2/everything |
News articles |
| HuggingFace Inference | mistralai/Mistral-7B-Instruct-v0.2 |
AI chatbot |
MIT