Backend Geoportal is an experiemntal REST API for a Web GIS platform, built with Django. It exposes endpoints to query and manage geospatial entities, with session-based user authentication protecting write operations. The project is fully dockerized, with separate configurations for development and production environments.
The spatial ORM provided by the GeoDjango module is not used. Instead, explicit SQL/PostGIS statements are used on an experimental basis.
- π REST API ready to be consumed by a web or mobile frontend (CORS enabled)
- π Management of the geoportal's geospatial entities (query, create, update, and delete)
- π Session-based user authentication, with protected endpoints for write operations
- π³ Deployment via Docker / Docker Compose, with separate profiles for development and production
- βοΈ Configuration based on environment variables, with no credentials hardcoded in the code
Backend_Geoportal/
β
βββ docker-compose.yml # Orchestration for the development environment
βββ docker-compose.prod.yml # Orchestration for the production environment
βββ scripts/ (*.sh) # Helper scripts for database management
β
βββ juavaal2/ # Django project
βββ manage.py
βββ requirements.txt
βββ Dockerfile
β
βββ juavaal2/ # Project configuration (settings, urls, wsgi/asgi)
βββ appjuavaal2/ # Main API application (views, routes, models, and business logic)
git clone https://github.com/jrvalza/Backend_Geoportal.git
cd Backend_GeoportalDevelopment (with hot reload):
docker compose -f docker-compose.yml up --buildProduction:
docker compose -f docker-compose.prod.yml up --build -dThe API will be available at http://localhost:8000/
The project reads its configuration from .env / .env.dev / .env.prod files (not included in the repository), containing values such as the database connection, DEBUG mode, and the ports exposed by each environment.
| Technology | Purpose |
|---|---|
| Main language | |
| Web framework, routing, authentication, and sessions | |
| Containerized application deployment | |
| Database | |
| WSGI server in production |
- The REST API is designed to work as a standalone service, consumed by a web frontend.
- The separate configuration between
docker-compose.ymlanddocker-compose.prod.ymlkeeps the development workflow agile without affecting production deployment. - Access to geospatial data is currently based on pure SQL with
PostGISstatements, rather than using the spatial ORM provided byGeoDjango. Migrating or adapting data access to use the GeoDjango module is the next planned step. - Some settings (CSRF middleware disabled, permissive CORS/ALLOWED_HOSTS, limited exception handling) are relaxed for local/experimental use and should be hardened before any public deployment.
