basebox Technical Documentation
What is basebox?
basebox is a GraphQL API server with a unique GraphQL compiler connected to a PostgreSQL database that frees you from writing boiler plate resolver functions. It is written in Rust, thus really fast and safe, and is extendible by Python code you can inject into the request handling process (not in the first BETA, but in the next). Its development is done in compliance to various regulations to ease the certification of projects using basebox.
The idea in general is: You provide...
- A GraphQL schema file with some annotations
- Business logic in the form of Python code (we will add support for microservices via gRPC later)
and you have a full-fledged, high performance GraphQL API server up and running.
Note
basebox is currently in BETA state; it is not ready for production!
The information on this site (docs.basebox.io) is targeted at developers and technicians; it might be hard to comprehend for others. For a more general description about basebox, please visit basebox' main site at basebox.io.
Overview
basebox consists of the following components:
- bbc
-
The basebox compiler; compiles a GraphQL schema into an SQL schema to initialize the PostgreSQL database, SQL templates to handle GraphQL operations and a type mapper. The latter two files are later used by basebox to translate your client's GraphQL into SQL requests.
bbc is run only once during installation and again should the schema change.
- broker
-
basebox HTTPS GraphQL server; receives GraphQL requests from your clients, handles OpenID Connect authorization and authentication, hosts the Python business logic layer (not part of the first BETA), sends requests to the database proxy and returns the JSON results to the client.
- dbproxy
-
The database proxy; it ideally runs on the same host as the PostgreSQL server, translates GraphQL requests to SQL, hits the database and returns JSON results.
- OpenID Connect
-
basebox uses OpenID Connect for authorization and authentication. OpenID Connect is not part of the basebox package itself, so you can integrate your basebox project with an existing OpenID Connect infrastructure (SSO), create a new one or use a commercial service for that purpose.
basebox is written in 100% Rust.
Here is a graphical overview:
For more general information, please visit our main site at basebox.io.