An open-source storm spotter network platform for tracking severe weather spotters and reports in real-time.
- Real-time Location Tracking: Spotters share their GPS location via WebSocket
- Weather Reports: Submit and view severe weather reports (tornadoes, hail, flooding, etc.)
- Interactive Map: Leaflet-based map showing active spotters and reports
- Chat/Messaging: Real-time communication between spotters
- Role-based Access: Spotter, Verified Spotter, Coordinator, and Admin roles
- Public API: REST API with API key authentication for third-party integrations
- Python 3.11+ with FastAPI
- PostgreSQL 16 with asyncpg
- Redis for caching and pub/sub
- SQLAlchemy 2.0 with async support
- JWT authentication
- React 18 with TypeScript
- Vite build tool
- Leaflet/React-Leaflet for maps
- TanStack Query for data fetching
- Zustand for state management
- Tailwind CSS for styling
- Docker and Docker Compose
- Node.js 18+ (for local frontend development)
- Python 3.11+ (for local backend development)
-
Clone the repository:
git clone https://github.com/FahrenheitResearch/openspotter.git cd openspotter -
Copy the environment file:
cp .env.example .env
-
Start all services:
docker-compose up -d
-
Seed demo data (optional):
docker-compose exec backend python seed_demo.py -
Access the application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Run development server (uses SQLite by default)
uvicorn app.main:app --reload
# Seed demo data (optional)
python seed_demo.pycd frontend
npm install
npm run devopenspotter/
├── backend/
│ ├── app/
│ │ ├── models/ # SQLAlchemy models
│ │ ├── routers/ # API routes
│ │ ├── schemas/ # Pydantic schemas
│ │ ├── services/ # Business logic
│ │ ├── utils/ # Dependencies and helpers
│ │ ├── websocket/ # WebSocket handlers
│ │ ├── config.py # Configuration
│ │ ├── database.py # Database setup
│ │ └── main.py # FastAPI app
│ ├── seed_demo.py # Demo data script
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API and WebSocket services
│ │ └── store/ # Zustand stores
│ └── package.json
├── docker-compose.yml
├── Dockerfile.backend
├── Dockerfile.frontend
└── .env.example
POST /auth/register- Register new userPOST /auth/login- Login and get tokensPOST /auth/refresh- Refresh access token
GET /users/me- Get current userPUT /users/me- Update current userGET /users/{id}- Get user by ID (admin)
GET /locations/active- Get active spotter locations (GeoJSON)POST /locations/update- Update own locationWS /locations/ws- WebSocket for real-time location updates
GET /reports- List weather reportsPOST /reports- Create new reportGET /reports/geojson- Get reports as GeoJSONPUT /reports/{id}/verify- Verify report (coordinator+)
GET /messages/channels- List channelsGET /messages/channels/{id}/messages- Get channel messagesPOST /messages- Send messageWS /messages/ws- WebSocket for real-time chat
GET /api/v1/spotters- Get active spottersGET /api/v1/reports- Get weather reportsGET /api/v1/reports/geojson- Reports as GeoJSON
| Role | Permissions |
|---|---|
spotter |
Submit reports, share location, chat |
verified_spotter |
All spotter permissions + visible on public API |
coordinator |
Verify reports, moderate chat, manage spotters |
admin |
Full system access, manage users and API keys |
See .env.example for all configuration options. Key settings:
| Variable | Description |
|---|---|
SECRET_KEY |
JWT signing key (change in production!) |
DATABASE_URL |
PostgreSQL connection string |
REDIS_URL |
Redis connection string |
DEBUG |
Enable debug mode |
CORS_ORIGINS |
Allowed CORS origins |
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Commit changes:
git commit -m 'Add my feature' - Push to branch:
git push origin feature/my-feature - Open a pull request
MIT License - see LICENSE file for details.