Rocketgraph gives superpowers to your web applications. Get Authentication, Postgres Database pre-configured, GraphQL console, AI Chatbots and Server-less function right from day 0. When you create a project on rocketgraph you are provided with Postgres Instance, Hasura console to get a GraphQL API and manage granular authorisation rules, automated server-less deployments with Git, and a full blown authentication system built in. It uses the open-source Hasura Batteries to power it's authentication service. In addition you also get an AI chatbot that is trained on the documentation provided by you.
🎉What's new?
Checkout how to train your own AI Chatbot. Just provide the documentation URL and it'll scrape the URL, tokenize the text and train an AI chatbot that can answer your user's questions.
- 🔒 Authentication using email/password
- 👬 Authentication using social logins
- 🪄 Authentication using OTP and magic link
- ⛈️ Server-less functions: Bring your own code and run it as thin AWS lambdas.
- 👨💻 Your code will be automatically picked up from your Github commits by our Github bot and deployed as Lambdas
- 🦾 AWS RDS support: 8GB PostgreSQL
- 👩🚀 Postgres Logs using
pgAudit
- 🍪 Secure session management with cookies refreshed automatically
This guide helps you get started with rocketgraph and setting up your backend in just 15 minutes. In 15 minutes you will be able to create a todos app with db, auth and realtime subscriptions.
Your first instance is free for 14 days. No credit card. So go to the signup page and create account. Then on the dashboard click new project. Wait for a few seconds for the instance to boot up and load the software.
You can see your hasura console url. There you can manage your database.
And links to your Backend URLs
For your front-end, you can start with the already provided examples. Just download and npm run dev
. todos
is without authentication, auth
is with authentication.
npx create-react-app todos
cd todos
yarn add react-router-dom react-router
yarn add @apollo/client @rocketgraphql/react-apollo @rocketgraphql/rocketgraph-js-sdk graphql
Next create src/utils/config.js
and add the following:
import { createClient } from "@rocketgraphql/rocketgraph-js-sdk";
const config = {
baseURL: "https://backend-XXXXXXX.rocketgraph.app/auth",
};
const { auth } = createClient(config);
export { auth };
Replace the backend-XXX
URL with the url on your Rocketgraph dashboard. Congratulations, you have setup the basics required to use Rocketgraph.
Use GraphQL in your application, index.js
by wrapping your App in RApolloProvider as follows:
// src/index.js
import React from "react";
import ReactDOM from "react-dom";
import { ChakraProvider } from '@chakra-ui/react'
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import App from "./App";
import Message from "./components/Message"
import Login from "./components/Login"
import Signup from "./components/Signup"
// Rocketgraph providers
import { RApolloProvider } from "@rocketgraphql/react-apollo";
import { auth } from "./utils/config";
ReactDOM.render(
<React.StrictMode>
<ChakraProvider>
<RApolloProvider auth={auth} gqlEndpoint="https://hasura-AEF0WTE.rocketgraph.app/v1/graphql">
<Router>
<Routes>
<Route path="/login" element={<Login />}/>
<Route path="/signup" element={<Signup />}/>
<Route path="/messages" element={<Message />} />
<Route path="/" element={<App />} />
</Routes>
</Router>
</RApolloProvider>
</ChakraProvider>
</React.StrictMode>,
document.getElementById("root")
);
Then in your App.js file
import { gql, useSubscription } from "@apollo/client";
const GET_TODOS = gql`
subscription {
users {
id
email
}
}
`;
export default function Application() {
const [ data, loading] = useSubscription(GET_TODOS);
}
First enter your documentation URL to train your chatbot:
You can test out your chatbot:
get your embed code that you can embed in your own website:
In your logs dasboard you can write complex queries to query your logs. Use cloudwatch logs syntax
Install Rgraph CLI v0.1.10
Deploy your edge functions with rgraph deploy <project_name>
See : https://github.com/RocketsGraphQL/hasura-batteries
To run this as a standalone docker container.
- We use cypress tests on all the examples provided. Run them using
cypress
- We use unit tests and CI pipelines, see: https://github.com/RocketsGraphQL/hasura-batteries