https://github.com/eraydmrcoglu/turkey-earthquake-tracker
Full-Stack Real-Time Turkey Earthquake Tracker App Created with Next.js and NestJS
https://github.com/eraydmrcoglu/turkey-earthquake-tracker
afad axios earthquake-tracker nestjs nextjs react react-svg shadcn-ui tailwindcss tanstack-table turkiye-deprem
Last synced: 2 months ago
JSON representation
Full-Stack Real-Time Turkey Earthquake Tracker App Created with Next.js and NestJS
- Host: GitHub
- URL: https://github.com/eraydmrcoglu/turkey-earthquake-tracker
- Owner: eraydmrcoglu
- Created: 2025-11-09T07:50:34.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-11-26T13:56:33.000Z (7 months ago)
- Last Synced: 2025-12-26T13:40:23.608Z (6 months ago)
- Topics: afad, axios, earthquake-tracker, nestjs, nextjs, react, react-svg, shadcn-ui, tailwindcss, tanstack-table, turkiye-deprem
- Language: TypeScript
- Homepage:
- Size: 340 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π Turkey Earthquake Tracker
A full-stack web application that visualizes **real-time earthquake data across Turkey** on an interactive SVG map. The **backend (NestJS)** fetches and processes earthquake data from official sources such as **Kandilli Observatory** or **AFAD**, while the **frontend (Next.js)** displays it dynamically with responsive UI, hover tooltips, and clean visual design.
---
## β¨ Features
- πΊοΈ Interactive map with color-coded earthquake locations
- π Displays magnitude, date, and time of recent earthquakes
- π Real-time API data updates
- π¬ Smooth hover tooltips with scrollable details
- π¨ Fully responsive TailwindCSS design
- π§© Modular full-stack architecture (Next.js + NestJS)
---
## π§ Tech Stack
### π¨ Frontend
- **Next.js 15** β React-based frontend framework
- **TypeScript** β Type-safe development
- **TailwindCSS** β Utility-first CSS framework
- **ReactSVG** β Interactive SVG rendering
- **Axios / Fetch** β For API communication
### βοΈ Backend
- **NestJS** β Scalable Node.js backend framework
- **TypeScript** β Strongly typed backend logic
- **Axios** β Fetches live earthquake data
- **Cron Jobs** β Periodic data updates
- **Express Adapter** β REST API endpoints
---
## βοΈ Installation & Setup
### π§± Backend (NestJS)
```bash
cd backend
npm install
npm run start:dev
```
- Runs on β http://localhost:3000
- API endpoint β /api/depremler
## π» Frontend (Next.js)
```bash
cd frontend
npm install
npm run dev
```
- Runs on β http://localhost:3001
- Automatically connects to backend via the getDepremler() API call
## π API Endpoints
| Endpoint | Method | Description |
|------------------------|--------|------------------------------------|
| /api/depremler | GET | Returns all recent earthquakes |
| /api/depremler/:city | GET | Returns earthquakes for a city |
| /health | GET | Health check endpoint |
## π Example Response
```bash
[
{
"yer": "Balikesir - Sindirgi",
"tarih": "2025-11-09",
"saat": "10:24:58",
"buyukluk": 2.9
},
{
"yer": "Manisa - Akhisar",
"tarih": "2025-11-09",
"saat": "10:15:12",
"buyukluk": 1.8
},
{
"yer": "Izmir - Seferihisar",
"tarih": "2025-11-09",
"saat": "09:48:05",
"buyukluk": 3.2
}
]
```
## π§° Developer Notes
- πΊοΈ Turkey map SVG β frontend/public/assets/turkey-map.svg
- π Data fetching logic β frontend/src/api/api.ts
- π¬ Tooltip + hover events β DepremHaritasi.tsx
- π¨ Styling β TailwindCSS for all components
- π§ Backend services β deprem.service.ts
## π Future Improvements
- β‘ Real-time WebSocket support
- π Push notifications for major earthquakes
- π± Mobile optimization
- π Epicenter markers with zoom support