Sentinel India is a geospatial OSINT portal focused on India and the surrounding region. It combines a Spring Boot API, a React + Leaflet frontend, MySQL-backed persistence, live and near-real-time external data feeds, and a bundled production build that can be deployed as a single service.
The app supports place search, bookmarks and history, weather and air-quality context, land-use and rainfall lookups, live flights and marine traffic, multiple satellite and specialty overlays, and a SQL-backed cache for third-party API responses.
- Place search using Bhuvan search APIs
- Weather, precipitation, wind, cloud, pressure, humidity, dew point, and snow overlays
- Air-quality lookup via OpenAQ
- Live flights over India via OpenSky
- Marine vessel snapshots sourced from AISStream
- NASA GIBS layers for MODIS, VIIRS, Himawari, aerosols, snow, SST, NO2, and soil moisture
- Basemap switching for OSM, ESRI imagery, topo, dark, and terrain styles
- Bookmarking and recent-search persistence in MySQL
- SQL-backed API cache with a 5-minute TTL
- Single-image deployment for Railway using Docker
- Backend: Spring Boot 3, Spring Web, Spring Data JPA, WebSocket, Lombok
- Frontend: React 19, Vite 8, React Leaflet, Recharts, Axios
- Database: MySQL
- Deployment: Dockerfile-based Railway deploy
.
|-- src/main/java/com/bhuvaninsight
| |-- config
| |-- controller
| |-- model
| |-- repository
| `-- service
|-- src/main/resources
|-- frontend
| |-- src
| | |-- components
| | |-- hooks
| | `-- api.js
| `-- package.json
|-- Dockerfile
|-- railway.toml
`-- pom.xml
GET /api/health- health check used by RailwayGET /api/search?q=...- Bhuvan place searchGET /api/weather?lat=...&lon=...- weather forecast proxyGET /api/air?lat=...&lon=...- air-quality lookupGET /api/flights- live flight state vectorsGET /api/vessels- current AIS vessel snapshotGET /api/lulc?district=...- land-use statisticsGET /api/rainfall- rainfall dataset proxyGET /api/satellite?norad=...- satellite position lookupGET /api/train?no=...- train status lookupGET /api/locations- saved bookmarksGET /api/locations/history- recent searches
This repository no longer stores working API keys in source. Configure secrets in your shell, IDE run configuration, or Railway variables.
You can use either direct MySQL fields or a full URL:
MYSQLHOSTMYSQLPORTMYSQLDATABASEorMYSQL_DATABASEMYSQLUSERorMYSQL_USERMYSQLPASSWORDorMYSQL_PASSWORD
Optional alternatives also supported by the backend:
DATABASE_URLDATABASE_USERNAMEDATABASE_PASSWORDDB_URLDB_USERDB_PASS
BHUVAN_TOKENOPENAQ_KEYOPENSKY_USEROPENSKY_PASSN2YO_KEYAISSTREAM_KEYRAILAPI_KEYDATAGOVIN_KEYOWM_KEY
See ./.env.example for a reference template.
- Java 17+
- MySQL 8+
- Node.js 22+ if you want to run the frontend directly with Vite
Create a MySQL database and make its credentials available through environment variables.
Example values:
MYSQLHOST=localhost
MYSQLPORT=3306
MYSQLDATABASE=sentinel_india
MYSQLUSER=sentinel
MYSQLPASSWORD=sentinel123./mvnw spring-boot:runThe backend starts on http://localhost:8080 by default.
cd frontend
npm install
npm run devThe Vite dev server runs on http://localhost:5173 and proxies /api to the backend.
The Maven build installs Node/NPM, builds the React app, copies the frontend bundle into Spring static resources, and produces a single executable jar.
./mvnw clean package -DskipTests
java -jar target/sentinel-india-0.0.1-SNAPSHOT.jarThis repo is set up for a single Railway service that serves both the API and the frontend.
- Deploy from the repository root that contains
Dockerfile,pom.xml, andrailway.toml - Attach a MySQL service
- Add the MySQL variables to the app service
- Add any external API keys you want enabled
- Redeploy
Railway uses:
/api/health
If logs show:
Unknown database 'sentinel_india'
then the app did not receive the real database name from Railway and fell back to the default. In that case, set MYSQLDATABASE or MYSQL_DATABASE on the service and redeploy.
The backend stores third-party API responses in MySQL using the api_cache table. Cached entries use a global 5-minute TTL and fall back to stale data when a refresh fails.
- Some features are unavailable until their corresponding API keys are configured
- Marine traffic depends on AISStream availability
- Weather overlays require an OpenWeather key for tile access
- Frontend production builds use same-origin API calls by default, which keeps single-service deploys simple
./mvnw clean package -DskipTestsis the canonical production buildfrontend/.envis optional for local frontend-only customization.envfiles are ignored by Git; use.env.exampleas a template instead