docs verzeichnis und .env.local in Gitea speichern
This commit is contained in:
12
docs/README.md
Normal file
12
docs/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Entwickler-Dokumentation
|
||||
|
||||
Willkommen in der technischen Dokumentation von NodeMap.
|
||||
|
||||
📂 Wichtige Themen:
|
||||
|
||||
- Webservices: `api/webservices.md`
|
||||
- Redux / Fetch-Logik: `redux/api/fromWebService.md`
|
||||
- Konfigurationsschema: `env/env.local.schema.md`
|
||||
- Deployment: `deployment.md`
|
||||
|
||||
Diese Doku ist für Entwickler, die an diesem Projekt mitarbeiten oder übernehmen.
|
||||
0
docs/architecture.md
Normal file
0
docs/architecture.md
Normal file
0
docs/deployment.md
Normal file
0
docs/deployment.md
Normal file
5
docs/env.local.schema.md
Normal file
5
docs/env.local.schema.md
Normal file
@@ -0,0 +1,5 @@
|
||||
### /docs/env.local.schema.md
|
||||
|
||||
- `NEXT_PUBLIC_API_HOST` → Webservice-DNS oder IP
|
||||
- `NEXT_PUBLIC_API_BASE_PATH` → z. B. `talas5`, per Deployment steuerbar
|
||||
- `DB_NAME` → hängt vom Kundenprojekt ab
|
||||
101
docs/frontend/redux/api/fromWebService.md
Normal file
101
docs/frontend/redux/api/fromWebService.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# 📡 Webservices – TALAS / GIS
|
||||
|
||||
## Basis-URL
|
||||
|
||||
```env
|
||||
NEXT_PUBLIC_API_BASE_URL=http://[DNS-Name-oder-IP]/[pfad]
|
||||
# Beispiel: http://10.10.0.13/talas5/ClientData/WebServiceMap.asmx
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Endpunkte
|
||||
|
||||
### 1. `GisStationsStatic`
|
||||
|
||||
- **Beschreibung:** Statische Geräteliste einer Karte
|
||||
- **Methode:** GET
|
||||
- **Parameter:** `idMap`
|
||||
- **Beispiel:**
|
||||
|
||||
```
|
||||
GET /GisStationsStatic?idMap=12
|
||||
http://10.10.0.13/talas5/ClientData/WebServiceMap.asmx/GisStationsStatic?idMap=12
|
||||
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2. `GisStationsStaticDistrict`
|
||||
|
||||
- **Beschreibung:** Statische Geräte inkl. Bereichszuordnung
|
||||
- **Methode:** GET
|
||||
- **Parameter:** `idMap`, `idUser`
|
||||
- **Beispiel:**
|
||||
```
|
||||
GET /GisStationsStaticDistrict?idMap=12&idUser=484
|
||||
http://10.10.0.13/talas5/ClientData/WebServiceMap.asmx/GisStationsStaticDistrict?idMap=12&idUser=484
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3. `GisStationsStatusDistrict`
|
||||
|
||||
- **Beschreibung:** Aktueller Status von Geräten im Gebiet
|
||||
- **Methode:** GET
|
||||
- **Parameter:** `idMap`, `idUser`
|
||||
- **Beispiel:**
|
||||
```
|
||||
GET /GisStationsStatusDistrict?idMap=12&idUser=484
|
||||
http://10.10.0.13/talas5/ClientData/WebServiceMap.asmx/GisStationsStatusDistrict?idMap=12&idUser=484
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 4. `GisStationsMeasurements`
|
||||
|
||||
- **Beschreibung:** Live-Messwerte der Geräte
|
||||
- **Methode:** GET
|
||||
- **Parameter:** `idMap`, `idUser`
|
||||
- **Beispiel:**
|
||||
```
|
||||
GET /GisStationsMeasurements?idMap=12&idUser=484
|
||||
http://10.10.0.13/talas5/ClientData/WebServiceMap.asmx/GisStationsMeasurements?idMap=12&idUser=484
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 5. `GisSystemStatic`
|
||||
|
||||
- **Beschreibung:** Liste aller Systeme auf der Karte
|
||||
- **Methode:** GET
|
||||
- **Parameter:** `idMap`, `idUser`
|
||||
- **Beispiel:**
|
||||
```
|
||||
GET /GisSystemStatic?idMap=12&idUser=484
|
||||
http://10.10.0.13/talas5/ClientData/WebServiceMap.asmx/GisSystemStatic?idMap=12&idUser=484
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Nutzung im Code
|
||||
|
||||
- Alle Webservice-Aufrufe basieren auf:
|
||||
```js
|
||||
const apiBaseUrl = process.env.NEXT_PUBLIC_API_BASE_URL;
|
||||
```
|
||||
- Fallback-IDs über `.env.local`:
|
||||
```env
|
||||
NEXT_PUBLIC_DEFAULT_ID_MAP=12
|
||||
NEXT_PUBLIC_DEFAULT_ID_USER=484
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Hinweise
|
||||
|
||||
- ❌ Keine festen IPs/Domains in Code-Dateien verwenden
|
||||
- ✅ Nur `.env.local` als zentrale Konfiguration nutzen
|
||||
- ✅ Beispielaufrufe ausschließlich in dieser Datei dokumentieren
|
||||
- ✅ Webservice-Funktionen befinden sich in:
|
||||
`/redux/api/fromWebService/fetchGis*.js`
|
||||
Reference in New Issue
Block a user