How to use Back4app Agent
Backend as a Service
22 min
back4app agentcan easily manage parse apps, enabling developers to create and improve their applications seamlessly this guide dives deep into each feature, providing a range of sample prompts to cater to different complexities creating a new parse app this feature allows developers to initiate a new application on back4app's platform by simply specifying a name, a fresh parse environment is set up, ready for development and deployment prompt samples create a new parse app named "simpleapp" create a new parse app named "intermediateapp" with default settings create a new parse app named "complexapp" with custom configurations and security settings getting existing parse apps this functionality provides an overview of all the parse apps associated with a developer's account it offers insights into app details, urls, keys, and other essential configurations prompt samples list all my parse apps retrieve details of the parse app named "intermediateapp" get all details, urls, and keys of all my parse apps creating database models a core feature that facilitates the creation of database schemas or classes developers can define fields, set up relational data models, incorporate geolocation attributes, and even populate the database with mock data prompt samples create a new class named "users" with fields "name" and "email" create a relational data model between "users" and "orders" classes design a geolocation based model for a "stores" class and insert mock data for 5 store locations deploying cloud code this allows developers to enhance their apps by deploying server side code from simple functions to intricate web pages, cloud code can be used to execute logic, manage data, or serve content sample prompts deploy a function to log "hello world" in "simpleapp" deploy a web page to display user data in "intermediateapp" deploy multiple functions, web pages, and event triggers for "complexapp" retrieving cloud code content a handy tool for reviewing or editing the cloud code of an app developers can fetch specific files or entire directories to inspect the server side code they've deployed sample prompts get the content of the main cloud code file in "simpleapp" retrieve all cloud code files related to user management in "intermediateapp" fetch the entire cloud code directory structure and content for "complexapp" creating a job function job functions are scheduled tasks that run at specified intervals they can be used for routine operations like data cleanup, sending notifications, or generating reports prompt sample create a job function to send daily email summaries in "simpleapp" schedule a job function to clean up inactive users every month in "intermediateapp" design a complex job function to analyze user behavior, generate reports, and send tailored notifications in "complexapp" 8\ calling the parse server rest api an interface to interact directly with the app's backend developers can fetch schemas, manipulate data, execute queries, and more, all through standardized restful calls prompt sample fetch the schema of the "users" class in "simpleapp" insert sample user data and perform a query to retrieve users with a specific email domain in "intermediateapp" execute multiple operations fetch schemas, create new classes, insert bulk data, and run advanced queries in "complexapp" 9\ calling the parse server graphql api an alternative to the rest api, the graphql api offers more flexibility in querying data developers can request specific data structures, reducing over fetching and optimizing performance prompt sample query all users in "simpleapp" using graphql use graphql to fetch user details and their related orders in "intermediateapp" design a graphql query to retrieve, filter, and sort data across multiple classes in "complexapp" 10\ activating web hosting this feature turns on web hosting for an app, making its public content accessible via a back4app subdomain it's ideal for hosting frontend interfaces or static assets prompt sample activate web hosting for "simpleapp" set up web hosting for "intermediateapp" with custom domain settings activate web hosting for "complexapp", configure ssl, and set up redirects 11\ using the developer environment an isolated sandbox environment on back4app where developers can write, test, and debug code it's a safe space to experiment without affecting live apps prompt sample create a new development environment for "simpleapp" test and debug cloud code for "intermediateapp" in the developer environment develop, test, and deploy a full fledged backend service for "complexapp" using the developer environment and web hosting