Generate a backend and frontend (wip) stack using Python, including interactive GraphQL API documentation.
This example shows the postman environment, api, and an example of getting an auth token and creating an item. Note, not using GraphiQL since it doesn't support authentication headers.
wip
wip
-
Full Docker integration (Docker based).
-
Docker Swarm Mode deployment. (wip)
-
Docker Compose integration and optimization for local development.
-
Production ready Python web server using Uvicorn and Gunicorn. (wip)
-
Python FastAPI backend:
- Fast: Very high performance, on par with NodeJS and Go (thanks to Starlette and Pydantic).
- Intuitive: Great editor support. Completion everywhere. Less time debugging.
- Easy: Designed to be easy to use and learn. Less time reading docs.
- Short: Minimize code duplication. Multiple features from each parameter declaration.
- Robust: Get production-ready code. With automatic interactive documentation.
- Standards-based: Based on (and fully compatible with) the open standards for APIs: OpenAPI and JSON Schema.
- Many other features including automatic validation, serialization, interactive documentation, authentication with OAuth2 JWT tokens, etc.
-
Secure password hashing by default.
-
JWT token authentication.
-
SQLAlchemy models (independent of Flask extensions, so they can be used with Celery workers directly).
-
Basic starting models for users (modify and remove as you need).
-
Alembic migrations.
-
CORS (Cross Origin Resource Sharing).
-
Celery worker that can import and use models and code from the rest of the backend selectively.
-
REST backend tests based on Pytest, integrated with Docker, so you can test the full API interaction, independent on the database. As it runs in Docker, it can build a new data store from scratch each time (so you can use ElasticSearch, MongoDB, CouchDB, or whatever you want, and just test that the API works).
-
React frontend: wip
Go to the directory where you want to create your project and run:
git clone this project
docker-compose up
This stack can be adjusted and used with several deployment options that are compatible with Docker Compose, but it is designed to be used in a cluster controlled with pure Docker in Swarm Mode with a Traefik main load balancer proxy handling automatic HTTPS certificates, using the ideas from DockerSwarm.rocks.
Please refer to DockerSwarm.rocks to see how to deploy such a cluster in 20 minutes.
This project is licensed under the terms of the MIT license.