From ee8f6f04d9f19593137d0b5fc2fac75ce83aec3b Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Wed, 16 Jul 2025 11:30:29 +0100 Subject: [PATCH] Updates --- .../getting-started/create-account/index.mdx | 40 ++++++++ pages/gui-reference/getting-started/index.mdx | 43 ++------- pages/quick-start/index.mdx | 92 +++++++++++++++++++ pages/self-hosting/index.mdx | 4 +- pages/self-hosting/linux/index.mdx | 2 +- 5 files changed, 141 insertions(+), 40 deletions(-) create mode 100644 pages/gui-reference/getting-started/create-account/index.mdx create mode 100644 pages/quick-start/index.mdx diff --git a/pages/gui-reference/getting-started/create-account/index.mdx b/pages/gui-reference/getting-started/create-account/index.mdx new file mode 100644 index 0000000..8beed3a --- /dev/null +++ b/pages/gui-reference/getting-started/create-account/index.mdx @@ -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 datasqurel account +--- + +## Datasquirel.com + +Creating an account on datasquirel.com is simple. Just navigate to the [account page](/signup) and login with Google or enter your account details to create an account. + + + +## 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. And every other user is created by the `super admin` user. + +### Creating The Super Admin User + +When a self hosted instance is first created, you're 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. Learn more about [`super admin` users](/gui-reference/super-admin-user). + + + +### Creating Other Users + +To create other users, navigate to the Super Admin [users page](/admin/su/users) and click on the `Add User` button. Fill in the required fields to create the user. + + diff --git a/pages/gui-reference/getting-started/index.mdx b/pages/gui-reference/getting-started/index.mdx index 92d05fc..d966b1d 100644 --- a/pages/gui-reference/getting-started/index.mdx +++ b/pages/gui-reference/getting-started/index.mdx @@ -1,43 +1,14 @@ --- -title: Getting Started | GUI Reference | Datasquirel docs +title: Getting Started | Datasquirel docs description: Get started with Datasquirel page_title: Create Table Fields -page_description: Learn how to create fields/columns in your tables +page_description: Jump in and start up your project --- -import Border from "@/src/components/twui/elements/Border"; -import DocsImg from "@/src/components/twui/layout/DocsImg"; +## Get Started With Datasquirel -## Datasquirel.com - -Creating an account on datasquirel.com is simple. Just navigate to the [account page](/signup) and login with Google or enter your account details to create an account. - - - -## 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. And every other user is created by the `super admin` user. - -### Creating The Super Admin User - -When a self hosted instance is first created, you're 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. Learn more about [`super admin` users](/gui-reference/super-admin-user). - - - -### Creating Other Users - -To create other users, navigate to the Super Admin [users page](/admin/su/users) and click on the `Add User` button. Fill in the required fields to create the user. - - diff --git a/pages/quick-start/index.mdx b/pages/quick-start/index.mdx new file mode 100644 index 0000000..e34c4c2 --- /dev/null +++ b/pages/quick-start/index.mdx @@ -0,0 +1,92 @@ +--- +title: Quick Start | Datasquirel docs +description: Start saving and retrieving data now. +page_title: Quick Start +page_description: Start saving and retrieving data now. Set up and start deploying in minutes. +--- + +## Starting up your Datasquirel instance + +To get started with datasquirel you need an account online. The datasquirel npm module will hit this account via out API integration using your API credentials. Without an account, you cannout query any data on our API. Follow these steps to create an account: + +### 1\. Create Account + +Create a free account [here](/create-account) + +### 2\. Create Database + +Navigate to your [Dashboard](/admin) or [Databases](/admin/databases) page. Click the `Add Database` button to add a new database. + +On the next screen that appears, fill in the form and add a database image if you wish. Click on `Create Database` to add the new database + +Creating a new database takes you to the database page. This page allows you to import a pre-existing database using an SQL export file, or create a new table inside the newly-formed database. More operations for your database can be found in the database dropdown on the top left, or the `more` dropdown on the top right. + +### 3\. Add a table + +Databases consists of Tables: each with fields(or columns) and entries(or rows). Select a database from your database list to access the single database pages. Click on `Add Table` and fill in the new table form. + +On each table form you have access to the table fields(or column titles). Each field contains a few options: + +- **Field Name**: Name of field(or column title) +- **Data Type**: type of data to be stored on that field: See All Datatypes +- **Required**: Choose whether the field must have a value or not +- **Default Value**: Default value of field in the case no value is entered. +- **More**: The "More" button contains options for encryption and foreign keys. + +After these fields are filled, click `Add Field`. Add as much field as you need. These fields serve as column titles for your table. + +After creating a table you now have access to the tables list. + +### 4\. Add an Entry + +Select the newly created Table and on the designated table page click on `Add New Table Entry` + +Fill in the required fields and click on "Add Entry". Congrats, you have now created your first datasquirel data entry, you can now access this data from any platform using your api key. + +
+ +## Fetching Data + +To start fetching data from your datasquirel account, you need to go through 3 steps: + +### 1\. Create an API key + +Your api key is your gateway to all your data. There are two sets of API keys available for use: `Read Only` API keys, and `Full Access` API keys. They function as their names sound: Read only API keys only read data, Full Access API keys can read, write, delete, update, and also add media to your media storage directory. + +To create an API key, follow these steps: + +- Login to your admin dashboard and navigate to `API keys` page + +- Click on `Add API key` and fill in the form. Give your API key a name and select which the scope you wich to cover with the key (`Read Only` for just reading data, `Full Access` for reading and writing data). + +- Once your API key is created, copy the API key by clicking "Copy API key". Keep this key safe and secured. + +### 2\. Use your API key to make a request + +After creating your API key, then comes the backend section. + +First add the datasquirel package via NPM + +```bash +npm install @moduletrace/datasquirel +``` + +Next import the datasquirel module into your project, choose the database you will be querying, add your API key, and then run the query. + +```javascript +import datasquirel from "@moduletrace/datasquirel"; + +datasquirel.api.crud({ + database: "social_network", + table: "users", + key: process.env.READ_ONLY_API_KEY, + params: { + action: "get", + query: { + limit: 10, + }, + }, +}); +``` + +Learn more [here](/docs/api-reference/crud) diff --git a/pages/self-hosting/index.mdx b/pages/self-hosting/index.mdx index ef8057c..e0c223e 100644 --- a/pages/self-hosting/index.mdx +++ b/pages/self-hosting/index.mdx @@ -2,9 +2,7 @@ title: Self Hosting | Datasquirel docs description: Self Host your datasquirel instance page_title: Self Hosting -page_description: Host anywhere and manage your SQL database with ease. - Datasquirel is compatible with `MySQL` and `MariaDB` - databases. +page_description: Host anywhere and manage your SQL database with ease. Datasquirel is compatible with `MySQL` and `MariaDB` databases. --- ## Prerequisites diff --git a/pages/self-hosting/linux/index.mdx b/pages/self-hosting/linux/index.mdx index 7887045..91ce2d5 100644 --- a/pages/self-hosting/linux/index.mdx +++ b/pages/self-hosting/linux/index.mdx @@ -1,7 +1,7 @@ --- title: Linux Self Hosting | Datasquirel docs description: Host on Linux/Unix machines -page_title: Self Hosting on Linux/MacO +page_title: Self Hosting on Linux/Unix machines page_description: Host on Linux/Unix machines ---