api for huntapp
|
|
||
|---|---|---|
| .gitea/workflows | ||
| Controllers | ||
| docs | ||
| Models | ||
| Services | ||
| Sql | ||
| .gitignore | ||
| appsettings.json | ||
| HuntingAppApi.csproj | ||
| NuGet.config | ||
| Program.cs | ||
| README.md | ||
HuntingAppApi
ASP.NET Core / .NET 10 Web API sample using Controllers, Newtonsoft.Json, Npgsql and PostGIS.
Setup
createdb hunting_app
psql -d hunting_app -f Sql/001_schema.sql
dotnet restore
dotnet run
Update appsettings.json with your PostgreSQL connection string and JWT secret.
Main endpoints
POST /api/auth/external-loginGET /api/hunt-areasPOST /api/hunt-areasGET /api/map-points/area/{huntAreaId}POST /api/map-pointsGET /api/hunts/area/{huntAreaId}POST /api/huntsPOST /api/hunts/{huntId}/participantsPOST /api/hunts/{huntId}/assignmentsGET /api/hunts/{huntId}/participant-locationsPOST /api/locationsGET /api/hunts/{huntId}/messagesPOST /api/hunts/{huntId}/messages
Important production notes
The external token validator is intentionally simple. Before production, validate Google/Microsoft ID tokens against issuer, audience/client ID, expiry and JWKS signature validation.