The Vessel-Tracker is a service that uses the free AIS stream web socket (https://aisstream.io/) to fetch position data of ships and provides visual representation on a map.
- Docker
- Minikube
- kubectl
- go
- react
kubectl apply -f deployment/namespace.yaml
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm install postgres bitnami/postgresql -n postgres -f databases/postgres/postgres-values.yaml
port-forward to localhost:5432:
kubectl port-forward svc/postgres-postgresql 5432:5432 -n postgres
- Fill
/.envwith db values and api key - Generate sqlc functions:
cd ./AIS/dband thensqlc generate - Run main:
cd ..andgo run main.go
cd ./vessel-tracker-ui and then run npm install; npm run dev
Locate in your browser on http://localhost:5173/
+-----------------------+
| AIS Stream (WS) | (Global Firehose)
+----------+------------+
|
v
+----------+------------+
| Ingestion Service |
| - Connects to WS |
| - Parses messages | GO
| - Stores in DB |
| - Scrapes for image |
+----------+------------+
|
v
+----------+------------+
| PostgreSQL |
+----------+------------+
|
v
+----------+------------+
| REST API Service |
| - Handles HTTP GET | GO
| - Queries DB by FOV |
+----------+------------+
|
v
+----------+------------+
| React Frontend |
| - Polls /api/position| REACT
| - params: bbox |
+-----------------------+