All Projects → kadenbarlow → Django Postgres Graphql Boilerplate

kadenbarlow / Django Postgres Graphql Boilerplate

Licence: mit
A Boilerplate for a Django-GraphQL Project

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Postgres Graphql Boilerplate

Docker Django
A complete docker package for deploying django which is easy to understand and deploy anywhere.
Stars: ✭ 378 (+2123.53%)
Mutual labels:  postgres, django, boilerplate
Create Aio App
The boilerplate for aiohttp. Quick setup for your asynchronous web service.
Stars: ✭ 207 (+1117.65%)
Mutual labels:  postgres, boilerplate
Django Pgviews
Fork of django-postgres that focuses on maintaining and improving support for Postgres SQL Views.
Stars: ✭ 150 (+782.35%)
Mutual labels:  postgres, django
Endoflife.date
Informative site with EoL dates of everything
Stars: ✭ 296 (+1641.18%)
Mutual labels:  postgres, django
Go Postgres Jwt React Starter
A go, gin, and postgres API with jwt auth, complete with a react frontend
Stars: ✭ 115 (+576.47%)
Mutual labels:  postgres, boilerplate
Django Postgres Copy
Quickly import and export delimited data with Django support for PostgreSQL's COPY command
Stars: ✭ 139 (+717.65%)
Mutual labels:  postgres, django
Flask Boilerplate
Simple flask boilerplate with Postgres, Docker, and Heroku/Zeit now
Stars: ✭ 251 (+1376.47%)
Mutual labels:  postgres, boilerplate
Django Tsvector Field
Django field for tsvector (PostgreSQL full text search vector) with managed stored procedure and triggers.
Stars: ✭ 56 (+229.41%)
Mutual labels:  postgres, django
Posthog
🦔 PostHog provides open-source product analytics that you can self-host.
Stars: ✭ 5,488 (+32182.35%)
Mutual labels:  postgres, django
Architect
A set of tools which enhances ORMs written in Python with more features
Stars: ✭ 320 (+1782.35%)
Mutual labels:  postgres, django
Ugin
UGin is an API boilerplate written in Go (Golang) with Gin Framework.
Stars: ✭ 110 (+547.06%)
Mutual labels:  postgres, boilerplate
Aws Boilerplate
Opinionated full stack web app's boilerplate, ready to be deployed to AWS platform.
Stars: ✭ 682 (+3911.76%)
Mutual labels:  django, boilerplate
Rest Nestjs Postgres
CrudJS implemented as a REST API, using Nest.js and Postgres
Stars: ✭ 93 (+447.06%)
Mutual labels:  postgres, boilerplate
Django Celery Docker Example
Example Docker setup for a Django app behind an Nginx proxy with Celery workers
Stars: ✭ 149 (+776.47%)
Mutual labels:  postgres, django
Docker Django Example
A production ready example Django app that's using Docker and Docker Compose.
Stars: ✭ 86 (+405.88%)
Mutual labels:  postgres, django
Stator
Stator, your go-to template for the perfect stack. 😍🙏
Stars: ✭ 217 (+1176.47%)
Mutual labels:  postgres, boilerplate
Niklick
Rails Versioned API solution template for hipsters! (Ruby, Ruby on Rails, REST API, GraphQL, Docker, RSpec, Devise, Postgress DB)
Stars: ✭ 39 (+129.41%)
Mutual labels:  postgres, boilerplate
Fullstack Apollo Express Postgresql Boilerplate
💥 A sophisticated GraphQL with Apollo, Express and PostgreSQL boilerplate project.
Stars: ✭ 1,079 (+6247.06%)
Mutual labels:  postgres, boilerplate
Graphql Starter
💥 Monorepo template (seed project) pre-configured with GraphQL API, PostgreSQL, React, Relay, and Material UI.
Stars: ✭ 3,377 (+19764.71%)
Mutual labels:  postgres, boilerplate
Fastapi React
🚀 Cookiecutter Template for FastAPI + React Projects. Using PostgreSQL, SQLAlchemy, and Docker
Stars: ✭ 501 (+2847.06%)
Mutual labels:  postgres, boilerplate

Django - Postgres - GraphQL Boilerplate

I was looking for a boilerplate to run a GraphQL Django backend to use with a React or VueJS frontend and couldn't find one that fit my purposes so I wrote this one. The boilerplate uses graphene-django for graphql support and a custom user app has been created and integrated with JWT for authentication. The boilerplate can be used with any database backend Django supports but this boilerplate uses postgres. Everything is set up using docker for easy setup and development.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • docker (on mac install using brew cask install docker)

Installing

Below is a step by step series of examples that tell you how to get a development env running.

git clone <repository> <project_name>
cd <project_name>
rm -rf .git
git init
git remote add origin <your_project_git_url>
git add .
git commit -m <message>
git push -u origin master

./scripts/start-container # starts a local terminal for local development
./scripts/migrate
./scripts/seed # if you want to seed the database from fixtures
./scripts/start-app

You should now see Starting development server at http://0.0.0.0:8000/

Seed Database

Seed data can be kept in the fixtures directory. It can be stored as YAML or json, although I prefer YAML Example file for users is included. It creates three users. One admin, [email protected], and two other test users. The following commands load and dump data.

# load all fixtures
./scripts/seed

# load a specific fixture
./scripts/manage loaddata ./fixtures/users/user.yaml

# dump an apps data in a fixture
./scripts/manage dumpdata users.user --format=yaml > ./fixtures/users/user.yaml

Running the tests

Example GraphQL tests have been added to the users app. To run those and future tests use the command below.

./scripts/manage test

Installing New Packages

Dependencies are installed with pipenv. To install a new package simply run the command below. That will install it in your current working container. The ./scripts/start-container script will build the docker image from scratch so you don't have to worry about running pipenv install when you start the container.

pipenv install <package_name>

Useful Apps and their Documentation

Some apps come pre-installed in this boilerplate. Here is a list of them and a link to their documentation. You may want to remove these if you don't want their functionality.

  • django-extentions - Provides a bunch of useful commands for working in Django. For example, running ./scripts/manage shell_plus will load a shell with all your models already loaded.
  • django-import-export - Provides an import and export which can be useful in the admin tool.
  • django-simple-history - Provides a way to track changes to models. Useful for debugging and auditing which information has changed and by who. Simply add history = HistoricalRecords() on to one of your models. It also easily integrates with the admin tool.

Built With

Authors

  • Kaden Barlow

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].