In this tutorial, we'll go through the process of connecting API endpoints from Xano, a no-code backend platform, to AppGyver, a powerful no-code front-end builder. By following these steps, you'll be able to seamlessly integrate your Xano backend with AppGyver, enabling you to build and deploy full-stack applications without writing a single line of code.
Prerequisites
Before we begin, make sure you have the following:
- A Xano account (you can sign up for a free trial if you don't have one)
- An AppGyver account (a free plan is available)
- A basic understanding of Xano's data models and API endpoints
Step 1: Set up a Blank Project in AppGyver
- Log in to your AppGyver account and create a new blank project.
- Once the project is created, navigate to the "Data" tab at the top of the screen.
Step 2: Connect Xano API Endpoints to AppGyver
Get List Endpoint (Read Operation)
- In the "Data" tab, click "Add Data Resource" on the right side.
- Select the "REST API Direct Integration" option.
- In the "Resource ID" field, enter a descriptive name (e.g., "products").
- Copy the endpoint URL for your "Get List" operation from Xano and paste it into the "Resource URL" field in AppGyver.
- Leave the "Relative Path Response" field empty and go to the "Test" tab.
- Click "Run Test" to fetch the API response.
- Once the response is received, click "Set Schema from Response" to automatically generate the data schema based on the response.
- Click "Save" in the top-right corner of AppGyver.
Get Record Endpoint (Read Operation)
- In the "Data" tab, scroll down to the "Get Record" section.
- In the "Relative Path" field, enter the path for your "Get Record" operation in Xano, including the ID placeholder (e.g., "products/{products_ID}").
- In the "URL Placeholders" section, add a new placeholder with the label and key matching the ID placeholder in your Xano endpoint (e.g., "Label: products_ID", "Key: products_ID").
- Go to the "Test" tab and enter a valid ID in the "Type Text" field.
- Click "Run Test" to fetch the API response for the specified ID.
- Click "Set Schema from Response" to update the data schema.
- Click "Save" in the top-right corner of AppGyver.
Create Record Endpoint (Create Operation)
- In the "Data" tab, scroll down to the "Create Record" section and toggle the switch to enable it.
- Go to the "Schema" tab and click "Custom Schema".
- Add properties to the schema matching the fields required by your Xano "Create Record" endpoint (e.g., "Name" and "Description").
- Go back to the "Create Record" section and click the "Custom Object" field under "Record Properties".
- Enter test values for the fields you defined in the schema.
- Click "Save" and then "Run Test" to create a new record in Xano.
- Click "Set Schema from Response" to update the data schema.
- Click "Save" in the top-right corner of AppGyver.
Update Record Endpoint (Update Operation)
- In the "Data" tab, scroll down to the "Update Record" section and toggle the switch to enable it.
- In the "Relative Path" field, enter the path for your "Update Record" operation in Xano, including the ID placeholder (e.g., "products/{products_ID}").
- In the "URL Placeholders" section, add a new placeholder with the label and key matching the ID placeholder in your Xano endpoint (e.g., "Label: products_ID", "Key: products_ID").
- Go to the "Schema" tab and click "Custom Schema".
- Add properties to the schema matching the fields required by your Xano "Update Record" endpoint (e.g., "Name" and "Description").
- Go back to the "Update Record" section and enter a valid ID in the "Type Text" field.
- Click the "Custom Object" field under "Record Properties" and enter the updated values for the fields you defined in the schema.
- Click "Save" and then "Run Test" to update the record in Xano.
- Click "Set Schema from Response" to update the data schema.
- Click "Save" in the top-right corner of AppGyver.
Step 3: Set up Authentication
- In AppGyver, navigate to the "Auth" tab and click "Enable Authentication".
- Select "Direct Third-Party Authentication" and click "OK" to confirm the changes.
- Go back to the "Data" tab and click "Add Data Resource".
- Select the "REST API Direct Integration" option.
- In the "Resource ID" field, enter a descriptive name (e.g., "auth_login").
- Copy the endpoint URL for your "Auth Login" operation from Xano and paste it into the "Resource URL" field in AppGyver.
- Scroll down to the "Create Record" section and toggle the switch to enable it.
- Go to the "Schema" tab and click "Custom Schema".
- Add properties to the schema matching the fields required by your Xano "Auth Login" endpoint (e.g., "Email" and "Password").
- Go back to the "Create Record" section and click the "Custom Object" field under "Record Properties".
- Enter test values for the "Email" and "Password" fields.
- Click "Save" and then "Run Test" to authenticate and receive an authentication token from Xano.
- Click "Set Schema from Response" to update the data schema.
- Click "Save" in the top-right corner of AppGyver.
Authenticated Requests
- In the "Data" tab, click "Add Data Resource".
- Select the "REST API Direct Integration" option.
- In the "Resource ID" field, enter a descriptive name for the authenticated endpoint (e.g., "auth_me").
- Copy the endpoint URL for your authenticated operation from Xano and paste it into the "Resource URL" field in AppGyver.
- Scroll down to the "HTTP Headers" section and click "Add HTTP Header".
- In the "Label" and "Key" fields, enter "Authorization".
- Leave the "Is Static" and "Is Optional" options unchecked.
- In the "Default Value" field, enter "Bearer " (with a space after "Bearer") and paste the authentication token you received from the "Auth Login" endpoint.
- Go to the "Get Record" section and remove any placeholders or parameters.
- In the "HTTP Headers" section, add the "Authorization" header by selecting it from the dropdown.
- In the "Value" field, enter "Bearer " (with a space after "Bearer") and paste the authentication token you received from the "Auth Login" endpoint.
- Click "Save" and then "Run Test" to fetch the authenticated data from Xano.
- Click "Set Schema from Response" to update the data schema.
- Click "Save" in the top-right corner of AppGyver.
Congratulations! You have successfully connected your Xano API endpoints to AppGyver, including authentication. You can now leverage the power of Xano's no-code backend and AppGyver's front-end builder to create and deploy full-stack applications without writing any code.
Remember, this tutorial covers the basic setup and integration. Both Xano and AppGyver offer many more advanced features and capabilities that you can explore as you continue building your applications.