Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aleksac/drf-gatsby-example
Simple GIS application with Django REST Framework backend and Gatsby frontend.
https://github.com/aleksac/drf-gatsby-example
django django-rest-framework gatsby gis-application
Last synced: 5 days ago
JSON representation
Simple GIS application with Django REST Framework backend and Gatsby frontend.
- Host: GitHub
- URL: https://github.com/aleksac/drf-gatsby-example
- Owner: AleksaC
- License: mit
- Created: 2020-01-28T16:52:24.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-25T03:54:55.000Z (over 2 years ago)
- Last Synced: 2023-03-06T03:08:57.358Z (over 1 year ago)
- Topics: django, django-rest-framework, gatsby, gis-application
- Language: JavaScript
- Size: 929 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# drf-gatsby-example
Simple GIS application with Django REST Framework backend and Gatsby frontend.
## About 🤔
The application was built as a final project for Geographic Information Systems
course at my university. Backend API was built using Django REST Framework with
PostGIS database. Frontend is made with Gatsby along with Leaflet for map
visualization. My goal was to finish this as fast as possible, so I've made some
design decisions that I otherwise wouldn't in a production grade application
(e.g. write all Django code in a single application). There was no need to use
Gatsby, but I wanted to try it at the time so I used it here.
## Preview 👀
![preview](preview.png)## Setup ⚙️
To run this project you need to have Python (v3.5 or greater), Node and PostGIS
installed. Once you've done that you can proceed with the following steps.```shell script
git clone https://github.com/AleksaC/drf-gatsby-example.git
cd drf-gatsby-example
```### db
```shell script
sudo su postgres
psql
\i backend/sql/create_db.sql
```### backend
```shell script
cd backend
python -m pip istall -r requirements.txt
python manage.py runserver
```This will start a Django development server on port 3000.
### frontend
```shell script
cd ../fronted
npm install
gatsby develop
```This will start a Gatsby development server on port 8000.
**Note**: Both Django and Gatsby development servers are configured to listen on
all interfaces by default.### All of the above using Docker 🐋
```shell script
docker-compose up
```Docker images were meant for development purposes and are therefore completely
unoptimized. I used Buster images since installing GDAL for GeoDjango and sharp
for Gatsby on Alpine was pain in the ass and didn't want to waste time on it.## Get in touch 🙋♂️
If you liked this project or for whatever reason want to get in touch with me
you can do so through my [personal website](https://aleksac.me), where you can
contact me directly or via social media linked there. I'm always up to something
cool/useful and if you don't want to miss out on that you should follow me on
twitter: