8base is a Developer Acceleration Platform offering a vast selection of features to help developers build applications at a faster and simpler rate. With 8base, you can easily curate your application’s backend without writing a line of code. Using the 8base platform, you can build your backend using a simple GUI that allows you to perform actions such as:
- Define your schema: create tables/table relationships.
- Upload files
- Define roles
- Manage various projects using “Workspaces”.
- Design queries using the API explorer (based on GraphQL).
In this tutorial, we’ll see how to make use of 8base to quickly define a backend and serve the data using a GraphQL API. Our frontend application will be built using React and will communicate with the server using GraphQL.
8base offers a simple GUI that makes working with it really seamless and interactive. To get started with 8base, follow these steps:
- Create an account on 8base (8base starts as a free to use platform and pricing changes as usage increases. You will be asked to verify your email and then redirected to the 8base UI).
- Once you are in the 8base UI, simply navigate to “Data” and click on “New Table” to start building your backend.
- After your new table is loaded, you’ll be taken to the schema to begin defining fields. Let’s take a look around and note a couple of things. On the left, you’ll see there are
Your Tables. Every new 8base workspace automatically comes prepackaged with a number of built-in Tables. These tables are used to handle things like Files, Settings, and Permissions and can all be accessed through the 8base GraphQL API.
Go ahead and create a table
Questionsthat consists of the following fields: ```
options: the field type is
Text. 8base allows multiple values for a field and converts it to an array of values, so we’ll utilise that. ```
answer: field type is
Text. This field will hold the answer for each question.
question: field type is
Textthat contains question string.
image: this field type is
File. It’ll hold a cover image for each question. 8base has fantastic file management capabilities that allows file uploads.
- Next, copy the API endpoint URL (available on the bottom left) — this is your main line of communication between your front end and your 8base backend.
- Finally, for the purpose of this tutorial we’re going to allow open access to Guests by default so that dealing with authentication is optional. To allow guest access to your new Questions table, navigate to Settings > Roles > Guest and check the appropriate boxes under Questions. Since we have a File field in the schema, we’ll have to enable file access for the guest user. All unauthenticated users who access your API endpoint are given the role of
*Guest*by default. Authentication is not covered in this tutorial. You can see how authentication should be handled in more detail here.
Now that we’ve finished setting up the backend using 8base, we’ll start work on the frontend side of the application.