DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Andrei Anisimov for 8base

Posted on

Generate React app with GraphQL backend in minutes

A new experimental feature in 8base CLI generates a working React app from your data model. This is great for getting started with GraphQL and React or for quickly generating an admin UI for your app. Similar to scaffolding in Ruby-on-Rails.

The generated React app is based on Create React App, uses Apollo Client for GraphQL requests and includes authentication powered by Auth0 as well as the ability to upload files.

Few simple steps:

  1. Define your data model in 8base
    Define your data model

  2. Install open-source 8base CLI using npm and run 8base login

  3. Run 8base generate app ${YOU_APP_NAME} to generate app template

  4. Run 8base generate scaffold ${TABLE_NAME} to generate CRUD UI for chosen data table (you can repeat this step for each table you want to add)

  5. yarn install && yarn start to start the app

All terminal steps combined:
Generate React code

Here's a demo of a React app that gets generated:
Start app

Let me know your thoughts and happy generating! More info here.

P.S. 8base is currently in beta and is completely free. It will forever remain free for small dev teams.

Top comments (0)

Create an Account!
Now it's your turn!
Β 
πŸ—’ Share a tutorial
πŸ€” Reflect on your coding journey
❓ Ask a question

Create an account to join hundreds of thousands of DEV members on their journey.