Skip to content

KABHINS0612/ai-aerial-dashboard

Repository files navigation

AI Aerial Intelligence Dashboard

Revolutionizing Autonomous Aerial Intelligence — a comprehensive drone monitoring and control dashboard with AI-powered features.

Quick Start

  1. Backend (Flask): create a virtual environment, install Python deps, then run the server.
  2. Frontend (React + Vite): install npm deps and run the dev server.

Packages

Frontend (root package.json)

  • Dependencies:
    • react: ^18.2.0
    • react-dom: ^18.2.0
    • react-router-dom: ^6.20.0
    • recharts: ^2.10.0
    • lucide-react: ^0.294.0
    • framer-motion: ^10.16.0
    • i18next: ^23.7.0
    • react-i18next: ^13.5.0
    • date-fns: ^2.30.0
  • DevDependencies:
    • @types/node, @types/react, @types/react-dom
    • @vitejs/plugin-react: ^4.2.1
    • typescript: ^5.2.2
    • vite: ^5.0.8

Backend (Flask) (backend-flask/requirements.txt)

  • Flask==3.1.0
  • flask-cors==5.0.0
  • Flask-SQLAlchemy==3.1.1
  • python-dotenv==1.0.1
  • PyJWT==2.10.1
  • bcrypt==4.2.1

Deprecated Node backend: backend/package.json is left in the repo but marked deprecated — use the Flask backend instead.

Environment variables

Create or edit backend-flask/.env with:

  • FLASK_ENV (development)
  • PORT (default 5000)
  • CLIENT_ORIGIN (set to your Vite frontend origin, e.g. http://localhost:5173)
  • JWT_SECRET (a long secret string)
  • SQLALCHEMY_DATABASE_URI (defaults to sqlite:///app.db)
  • BOOTSTRAP_ADMIN_EMAIL (optional admin seed email)
  • BOOTSTRAP_ADMIN_PASSWORD (optional admin seed password)

Run commands

Open two terminals (backend and frontend).

  1. Backend (Flask)
cd backend-flask
# optional: create venv
python -m venv .venv
# Windows
.\.venv\Scripts\activate
pip install -r requirements.txt
python run.py

The backend will run on http://localhost:5000 (health endpoint: /health). The Flask backend uses SQLite by default (app.db) unless you set a different SQLALCHEMY_DATABASE_URI.

  1. Frontend (Vite + React)
cd .
npm install
npm run dev

Frontend runs on http://localhost:5173 by default. Vite proxies /api to the backend (http://localhost:5000) during development — do not hardcode backend URLs in the frontend.

Notes & Troubleshooting

  • If the frontend shows Failed to fetch on register/login, ensure:
    • Flask is running on port 5000
    • CLIENT_ORIGIN in backend-flask/.env matches your frontend origin (http://localhost:5173)
    • You restarted Flask after editing .env
  • The Node backend/ is deprecated; the active backend is backend-flask/.
  • To create an admin automatically, set BOOTSTRAP_ADMIN_EMAIL and BOOTSTRAP_ADMIN_PASSWORD in backend-flask/.env before first run.

API Endpoints (used by frontend)

  • POST /api/auth/register — create user (returns token + user)
  • POST /api/auth/login — login (returns token + user)
  • GET /api/me — returns authenticated user details (requires Authorization: Bearer <token>)

Push to GitHub

This repo uses Git with a root .gitignore so node_modules/, .venv/, backend-flask/.env, and local SQLite files are not committed.

  1. On GitHub: New repository → create an empty repo (no README/license if you already have commits locally). Copy the remote URL, e.g. https://github.com/YOUR_USERNAME/YOUR_REPO.git.

  2. Set your name and email for commits (use your real GitHub email or your GitHub noreply address):

cd c:\Users\Welcome\ai-aerial-dashboard
git config --local user.name "Your Name"
git config --local user.email "your-email@example.com"
  1. Add remote and push (main branch):
cd c:\Users\Welcome\ai-aerial-dashboard
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
git push -u origin main

If GitHub asks for a password, use a Personal Access Token (PAT), not your account password.

Faster (GitHub CLI) — log in once, then create the repo and push in one step:

cd c:\Users\Welcome\ai-aerial-dashboard
gh auth login
.\scripts\push-to-github.ps1 -RepoName ai-aerial-dashboard -Visibility public

To push to an existing empty repo instead:

.\scripts\push-to-github.ps1 -RemoteUrl https://github.com/YOUR_USERNAME/YOUR_REPO.git

Fully automatic (no browser) — create a Personal Access Token with the repo scope. Store it only on your machine (never commit it, never paste it in chat). Then in PowerShell for that session:

cd c:\Users\Welcome\ai-aerial-dashboard
$env:GH_TOKEN = "ghp_your_token_here"
.\scripts\push-to-github.ps1 -RepoName ai-aerial-dashboard -Visibility public

Or set GH_TOKEN / GITHUB_TOKEN as a Windows user environment variable once; the script will use it if gh auth login was never run.

Optional — push only README (after editing it):

cd c:\Users\Welcome\ai-aerial-dashboard
.\scripts\push-readme.ps1 -RemoteUrl https://github.com/YOUR_USERNAME/YOUR_REPO.git -Branch main

If you'd like, I can also add a small make/PowerShell script to start both backend and frontend together.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors