Update documentation content

This commit is contained in:
2026-03-15 05:32:05 +01:00
parent 7d10f030f3
commit c0b92596ec
30 changed files with 1840 additions and 29 deletions
@@ -0,0 +1,55 @@
---
title: Add an Entry | Datasquirel docs
description: Insert a new row into a Datasquirel table
page_title: Add an Entry
page_description: Insert a new row into a table using the web admin panel.
---
## Overview
An **entry** is a single row in a table. Once you have a table with fields defined, you can start inserting entries through the admin panel or via the API.
## Steps
### 1. Open the Table
Navigate to your database and click on the table you want to add an entry to.
<DocsImg
alt="Table Page"
srcLight="/images/screenshots/table-page-screenshot-light.webp"
srcDark="/images/screenshots/table-page-screenshot-dark.webp"
/>
### 2. Click Add New Table Entry
Click the **Add New Table Entry** button at the top of the table page.
### 3. Fill in the Fields
A form will appear with an input for each field in your table. Fill in the values:
- Fields marked **Required** must have a value — the form will not submit without them.
- Fields with a **Default Value** are pre-filled — you can leave them or override the default.
- **Rich fields** (HTML, Markdown, JSON, code) open in their dedicated editors.
### 4. Save the Entry
Click **Add Entry**. The new row is inserted into the table and will appear in the table view immediately.
## Editing an Entry
To edit an existing entry, click on the row in the table view to open the edit form. Change the values and click **Update Entry**.
## Deleting an Entry
To delete an entry, open the edit form and click **Delete Entry**, or use the delete action in the table row controls. Deleted entries are permanently removed from the database.
## Adding Entries via the API
Entries can also be inserted programmatically using the REST API or the npm package. See [API Reference → POST](/docs/api-reference/crud/post) for details.
## What's Next
- [API Reference → CRUD](/docs/api-reference/crud) — manage entries programmatically
- [Media](/docs/gui-reference/media) — upload and attach files to your entries
@@ -0,0 +1,43 @@
---
title: Create a Database | Datasquirel docs
description: Create a new database from the Datasquirel web GUI
page_title: Create a Database
page_description: Add a new database to your Datasquirel account using the web admin panel.
---
## Overview
A **database** is a named container that holds one or more tables. Each Datasquirel account can have multiple databases, and each database is isolated from the others — API keys can be scoped to specific databases.
## Steps
### 1. Open the Databases Page
Log in to your admin panel and navigate to **Databases** in the sidebar, or go to [/admin/databases](/admin/databases).
### 2. Click Add Database
Click the **Add Database** button at the top of the databases list.
<DocsImg
alt="Databases List"
srcLight="/images/screenshots/databases-light.webp"
srcDark="/images/screenshots/databases-dark.webp"
/>
### 3. Fill in the Database Details
A form will appear. Fill in the required fields:
- **Database Name** — a unique name for the database. Use lowercase letters, numbers, and underscores (e.g. `social_network`).
- **Description** *(optional)* — a short description of the database.
- **Image** *(optional)* — an image to display on the database card.
### 4. Create the Database
Click **Create Database**. You will be taken to the new database page where you can start creating tables or import an existing database from an SQL file.
## What's Next
- [Create a Table](/docs/gui-reference/databases/create-table) — add your first table to the database
- [Create Table Fields](/docs/gui-reference/databases/create-table-fields) — define the columns for your table
@@ -2,9 +2,65 @@
title: Create Database Table Fields
description: Learn how to create fields/columns in your tables
page_title: Create Table Fields
page_description: Learn how to create fields/columns in your tables
page_description: Define the columns and data types for your Datasquirel tables.
---
## Create Database Table Fields
## Overview
Fields (or Columns) define the structure of your SQL tables. Datasquirel Helps you define these structures and even extend them.
**Fields** (also called columns) define the structure of a SQL table. Every row in the table must conform to the field definitions. Datasquirel provides a visual field editor that maps directly to MariaDB column definitions — what you define is what gets created in the database.
## Adding a Field
Open a table in your admin panel and click **Add Field** (or access the field editor during table creation). For each field you need to provide:
### Field Name
The name of the column. Use lowercase letters, numbers, and underscores. This name is used in API responses and SQL queries (e.g. `first_name`, `created_at`).
### Data Type
The SQL data type for the column. Common types include:
| Type | Description |
|------|-------------|
| `VARCHAR` | Variable-length text, up to a defined maximum length (e.g. `VARCHAR(255)`) |
| `INT` | 32-bit integer |
| `BIGINT` | 64-bit integer — use for IDs that may exceed 2 billion |
| `TEXT` | Unlimited-length text |
| `LONGTEXT` | Very large text content (e.g. HTML, Markdown, JSON) |
| `DATETIME` | Date and time value |
| `DATE` | Date only |
| `BOOLEAN` | True/false stored as `TINYINT(1)` |
| `FLOAT` | Floating-point number |
| `JSON` | Structured JSON data |
| `ENUM` | A value from a predefined list |
See the full list in the [Database Reference → Data Types](/docs/database-reference/data-types).
### Required
Check this option to add a `NOT NULL` constraint — the field must have a value on every insert. Leave it unchecked to allow `NULL`.
### Default Value
A value to use when no value is provided on insert. For example:
- `0` for numeric fields
- `""` for empty text
- `CURRENT_TIMESTAMP` for datetime fields that should auto-populate
### More Options
Click **More** on any field to access additional options:
- **Unique** — adds a UNIQUE constraint so no two rows can have the same value for this field.
- **Encryption** — encrypts the value before storing it. Useful for sensitive data like tokens.
- **Foreign Key** — links this field to a column in another table, enforcing referential integrity.
## Editing and Removing Fields
To edit an existing field, open the table schema editor and click on the field. To remove a field, click the delete icon next to it. Removing a field drops the column from the underlying MariaDB table — all data in that column will be lost.
## What's Next
- [Create Table Indexes](/docs/gui-reference/databases/create-table-indexes) — add indexes to speed up queries on specific fields
- [Add an Entry](/docs/gui-reference/databases/add-entry) — start inserting rows
@@ -0,0 +1,56 @@
---
title: Create Table Indexes | Datasquirel docs
description: Add indexes to your database tables to improve query performance
page_title: Create Table Indexes
page_description: Add indexes to your tables to speed up queries on frequently searched fields.
---
## Overview
An **index** is a data structure that MariaDB maintains alongside your table to make certain queries faster. Without an index, a query that filters by a column must scan every row in the table. With an index on that column, MariaDB can jump directly to the matching rows.
Adding indexes is especially important on:
- Fields used in `WHERE` clauses (e.g. `WHERE slug = ?`)
- Fields used in `ORDER BY` or `GROUP BY`
- Foreign key fields
## Index Types
Datasquirel supports the following MariaDB index types:
| Type | Description |
|------|-------------|
| **INDEX** | A standard non-unique index. Use this to speed up queries on any column that is not required to be unique. |
| **UNIQUE** | Like INDEX, but also enforces that no two rows can have the same value for the indexed column. |
| **FULLTEXT** | A full-text index used for text search with `MATCH ... AGAINST`. Applies to `TEXT` and `VARCHAR` columns. |
## Adding an Index
### From the Field Settings
The simplest way to index a field is directly in the field editor. When creating or editing a field, click **More** and enable the **Unique** option — this creates a UNIQUE index on the field.
### From the Table Schema Editor
1. Open the table in your admin panel.
2. Navigate to the **Schema** or **Indexes** tab.
3. Click **Add Index**.
4. Select the index type and choose the field(s) to include.
5. Save the index.
<DocsImg
alt="SQL Field Settings"
srcLight="/images/screenshots/sql-field-settings-light.webp"
srcDark="/images/screenshots/sql-field-settings-dark.webp"
/>
## Notes
- Every table automatically has a PRIMARY KEY on the `id` column. This index is created by Datasquirel and cannot be removed.
- Adding an index on a large table may take a moment as MariaDB rebuilds the index structure.
- Indexes speed up reads but add a small overhead to writes (INSERT, UPDATE, DELETE). Only index fields you actually query on.
## What's Next
- [Create Table Fields](/docs/gui-reference/databases/create-table-fields) — understand field types and constraints
- [API Reference → GET](/docs/api-reference/crud/get) — use query parameters to filter and sort data
@@ -0,0 +1,52 @@
---
title: Create a Table | Datasquirel docs
description: Create a new table inside a Datasquirel database
page_title: Create a Table
page_description: Add a new table to an existing database using the web admin panel.
---
## Overview
A **table** is a structured set of rows, where every row has the same columns (fields). Before you can add data, you need to create at least one table in your database and define its fields.
## Steps
### 1. Open a Database
Navigate to the database you want to add a table to. Click on the database from the [Databases](/admin/databases) list.
### 2. Click Add Table
On the database page, click the **Add Table** button.
<DocsImg
alt="Tables List"
srcLight="/images/screenshots/tables-list-white.webp"
srcDark="/images/screenshots/tables-list-dark.webp"
/>
### 3. Name the Table
Enter a name for the table. Table names should use lowercase letters, numbers, and underscores (e.g. `blog_posts`).
### 4. Add Fields
The table creation form includes a field editor. Add at least one field to define the structure of the table. For each field, provide:
- **Field Name** — the column name (e.g. `title`, `created_at`).
- **Data Type** — the SQL data type for the column. See [Data Types](/docs/database-reference/data-types) for the full list.
- **Required** — whether the field must have a value (NOT NULL constraint).
- **Default Value** — a default value used when no value is provided.
- **More** — additional options including encryption and foreign key relationships.
See [Create Table Fields](/docs/gui-reference/databases/create-table-fields) for a detailed breakdown of each field option.
### 5. Save the Table
Click **Add Table** to create the table. It will appear in the table list for the database.
## What's Next
- [Create Table Fields](/docs/gui-reference/databases/create-table-fields) — learn more about field types and options
- [Add an Entry](/docs/gui-reference/databases/add-entry) — insert your first row
- [Create Table Indexes](/docs/gui-reference/databases/create-table-indexes) — add indexes to improve query speed
+27 -19
View File
@@ -7,22 +7,30 @@ page_description: Create and manage databases via the web GUI
## Quick Links
<br />
<DocsCard
title="Create a New Database"
description="Create a new Database from the web GUI"
href="/docs/gui-reference/databases/create-database"
/>
<br />
<DocsCard
title="Create a New Table"
description="Create a table in your Database"
href="/docs/gui-reference/databases/create-table"
/>
<br />
<DocsCard
title="Create Table Fields"
description="Create fields/columns in your tables"
href="/docs/gui-reference/databases/create-table-fields"
/>
<div className="w-full grid grid-cols-1 gap-4 items-stretch">
<DocsCard
title="Create a New Database"
description="Create a new database from the web GUI."
href="/docs/gui-reference/databases/create-database"
/>
<DocsCard
title="Create a New Table"
description="Create a table inside your database."
href="/docs/gui-reference/databases/create-table"
/>
<DocsCard
title="Create Table Fields"
description="Define the columns and data types for your table."
href="/docs/gui-reference/databases/create-table-fields"
/>
<DocsCard
title="Add an Entry"
description="Insert a new row into a table."
href="/docs/gui-reference/databases/add-entry"
/>
<DocsCard
title="Create Table Indexes"
description="Add indexes to improve query performance."
href="/docs/gui-reference/databases/create-table-indexes"
/>
</div>
@@ -0,0 +1,40 @@
---
title: Create an account | Datasquirel docs
description: Create an Account with Datasquirel
page_title: Create an Account
page_description: Get started with a new Datasquirel account.
---
## Datasquirel.com
Creating an account on datasquirel.com is simple. Just navigate to the [signup page](/signup) and log in with Google or enter your account details to create an account.
<DocsImg
alt="Create New Account"
srcLight="/images/screenshots/create-account-screen-light.webp"
srcDark="/images/screenshots/create-account-screen-dark.webp"
/>
## Self Hosted
Creating an account for self-hosted instances can only be done by the `super admin` user. This user is created during the initial setup of the instance. Every other user is created by the `super admin` user.
### Creating The Super Admin User
When a self-hosted instance is first started, you are directed to the `super admin` user creation page. Fill in the required fields to create the `super admin` user. This user has all privileges and can create other users. This user is created only once and cannot be deleted.
<DocsImg
alt="Create Super Admin User"
srcLight="/images/screenshots/su-user-signup-light.webp"
srcDark="/images/screenshots/su-user-signup-dark.webp"
/>
### Creating Other Users
To create other users, navigate to the Super Admin [users page](/admin/su/users) and click the `Add User` button. Fill in the required fields to create the user.
<DocsImg
alt="Create Other Admin Users"
srcLight="/images/screenshots/su-create-user-light.webp"
srcDark="/images/screenshots/su-create-user-dark.webp"
/>
@@ -1,8 +1,8 @@
---
title: Getting Started | Datasquirel docs
description: Get started with Datasquirel
page_title: Create Table Fields
page_description: Jump in and start up your project
title: GUI Getting Started | Datasquirel docs
description: Get started with the Datasquirel web admin panel
page_title: Getting Started
page_description: Jump in and start managing your data using the Datasquirel GUI.
---
## Get Started With Datasquirel
@@ -10,7 +10,7 @@ page_description: Jump in and start up your project
<br />
<DocsCard
title="Create Account"
description="Learn how to Create a datasquirel account"
href="/docs/getting-started/create-account"
title="Create an Account"
description="Learn how to create a Datasquirel account or set up a self-hosted instance."
href="/docs/gui-reference/getting-started/create-an-account"
/>
+40
View File
@@ -0,0 +1,40 @@
---
title: Media GUI Reference | Datasquirel docs
description: Upload and manage media files using the Datasquirel web GUI
page_title: Media
page_description: Upload, organize, and manage media files from the Datasquirel admin panel.
---
## Overview
Datasquirel includes a built-in media storage system. Files are organized into folders, served by a dedicated static file server, and can be made public or private per folder.
<div className="w-full grid grid-cols-1 gap-4 items-stretch">
<DocsCard
title="Upload Media"
description="Upload images and files to your media storage."
href="/docs/gui-reference/media/upload-media"
/>
</div>
## Navigating to Media
In the admin panel sidebar, click **Media** to open the media management page. From here you can:
- Browse your media folders and files
- Create new folders
- Toggle a folder between **public** and **private** mode
- Upload new files
- Delete existing files
<DocsImg
alt="Media List"
srcLight="/images/screenshots/media-list-white.webp"
srcDark="/images/screenshots/media-list-dark.webp"
/>
## Public vs Private Folders
**Public folders** — files are accessible to anyone with the direct URL. Use this for profile images, product photos, and other assets that should be freely accessible.
**Private folders** — files require a valid, time-limited access key to download. Use this for documents, premium content, or any file that should only be accessible to specific users. See [Private Media](/features/private-media) for details.
@@ -0,0 +1,51 @@
---
title: Upload Media | Datasquirel docs
description: Upload images and files to Datasquirel media storage
page_title: Upload Media
page_description: Upload images and other files to your Datasquirel media storage folders.
---
## Overview
You can upload any file type to Datasquirel media storage through the admin panel. Uploaded images are automatically given a thumbnail. All uploaded files are served by a dedicated static file server.
## Steps
### 1. Open the Media Page
Click **Media** in the admin panel sidebar to open the media management page.
### 2. Select or Create a Folder
Choose an existing folder from the list or create a new one by clicking **Add Folder**. Folders keep your files organized and control public/private access at the folder level.
### 3. Open a Folder
Click on a folder to open it and see its files.
<DocsImg
alt="Media Storage"
srcLight="/images/screenshots/media-storage-2-light.webp"
srcDark="/images/screenshots/media-storage-2-dark.webp"
/>
### 4. Upload a File
Click **Upload** (or drag and drop a file into the folder view). You can upload multiple files at once.
Supported file types include images (JPEG, PNG, WebP, GIF, SVG), documents (PDF), and any other file type.
### 5. Copy the File URL
Once uploaded, the file appears in the folder. Click on a file to copy its URL. For public folders, this URL can be used directly in your application.
## Uploading via the API
You can also upload files programmatically using the media API. See [API Reference → Media → POST](/docs/api-reference/media/post) for details.
## Notes
- Image thumbnails are generated automatically on upload.
- File names are stored as uploaded. Avoid special characters in file names.
- To move a file to a different folder, delete it and re-upload it to the target folder.
- Deleting a folder deletes all files inside it permanently.