The admin UI is available at the
/admin path of your running app:
The admin UI provides the following benefits:
- Allows you to access and manage your data
- Automatically generates data entry forms that can be used to create and edit database records.
- Provides visibility into which data is cached for both the in-memory and KV cache.
- Lists the table and record APIs that are automatically generated by SonicJs.
- Its also crazy fast, even when deployed to production and gives you an idea of how quick your UI can respond as a result of using SonicJs for your headless CMS/backend framework.
The admin home shows a list of auto-generated API endpoints based on your schema.
The Table section show a list of each table included in your schema. Clicking on any table will direct you to a grid where you can view/manage the records your database.
Clicking the "Create user record" or pencil icon will direct you to an automatically generated data entry form. Here is an example of the users data entry form:
Click on the "raw" icon will redirect you to the GET API endpoint for the record:
- In-Memory - Shows a list of items in your in-memory cache.
- KV (Key-Value pair store) - Shows a list of items in your KV (Key-Value) cache.
- Clear All Caches - Clears both In-Memory and KV caches.
The automatically generated endpoints are great for prototyping and simple apps, but you will of course want to create custom endpoints in order to fullfil your specific business requirements. For this, let's move on to routing.