Logo

Sign InGet Started

Docs

Docs

Resources

Getting Started

Resources are the foundation of your app and API. Think of resources as Services (or maybe Models) of your application. For instance: for a note taking app you could create a Note resource for managing notes, and Folder resource to group the Notes in folders.

When you create a Resource, Kernex automatically performs the next step for you:

  1. Create an API endpoint for it.
  2. Generates three fields: _id, createdAt, and updatedAt.
  3. Generates Typescript interface for the Resource.
  4. Adds the Resource to the Content section so that you can manage the content.

Creating Resources

In order to create new resources, go to your app > Resources > Create Resource.

When you create a new Resource, you have to specify the Title, Slug, and Description.

  1. Title - the Resource title. It is how we'll reference this resource throughout the app.
  2. Slug - the slug that will be used in the API/client.

Resource Fields

You can define the fields for your Resource. Starting from basic field types as string, number, or boolean, to more complex fields as Rich Text, or Color.

By default, when a resource is created, we generate three fields for you automatically. You can not remove this fields because our platform relies on them.

  1. _id field - a unique id for the resource
  2. createdAt field - the creation timestamp of your resource
  3. updatedAt field - the update time of your resource. It is updated to current time every time your resource is changed.

Resource Database

You have the option to host the services in your own database. In order to do that, you have to provide us with your database details. In order to do so, go to your app > Resource > Database.

Your database credentials are encrypted and stored securely.

The resource will behave the same exact way as a service hosted in our database. This also allows you to import your database services and build an API for them instantly.