Skip to content

jrvalza/Backend_Geoportal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

REST Backend Geoportal

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.

Python Django PostgreSQL Docker Gunicorn


Inicio app


πŸ“‘ Table of contents


πŸš€ Features

  • 🌐 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

πŸ“ Project structure

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)

βš™οΈ Build and installation

With Docker (recommended)

git clone https://github.com/jrvalza/Backend_Geoportal.git
cd Backend_Geoportal

Development (with hot reload):

docker compose -f docker-compose.yml up --build

Production:

docker compose -f docker-compose.prod.yml up --build -d

The API will be available at http://localhost:8000/


πŸ”§ Environment variables

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.


🧠 Technologies used

Technology Purpose
Python Main language
Django Web framework, routing, authentication, and sessions
Docker Containerized application deployment
Postgres Database
Gunicorn WSGI server in production

πŸ“Œ Notes

  • The REST API is designed to work as a standalone service, consumed by a web frontend.
  • The separate configuration between docker-compose.yml and docker-compose.prod.yml keeps the development workflow agile without affecting production deployment.
  • Access to geospatial data is currently based on pure SQL with PostGIS statements, rather than using the spatial ORM provided by GeoDjango. 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.

About

REST API backend for a Web GIS platform (experimental) with geospatial data management, session-based authentication and Dockerized deployment.

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors