Refactor SSL

This commit is contained in:
Benjamin Toby
2024-11-06 13:57:20 +01:00
parent eb341a7845
commit 83d261362f
316 changed files with 541 additions and 4615 deletions
@@ -261,13 +261,6 @@ module.exports = require("serverless-mysql");
module.exports = require("fs");
/***/ }),
/***/ 1017:
/***/ ((module) => {
module.exports = require("path");
/***/ })
};
File diff suppressed because one or more lines are too long
@@ -288,13 +288,6 @@ module.exports = require("serverless-mysql");
module.exports = require("fs");
/***/ }),
/***/ 1017:
/***/ ((module) => {
module.exports = require("path");
/***/ })
};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Database Reference","slug":"database-reference","description":"<p>Understanding SQL and its syntax.</p>","content":"<h2>Overview</h2><p>SQL (Sequential Query Language) is the industry-standard, battle-tested database querying language used to interact with relational databases. While datasquirel aims to abstract much of it, knowing the basics is still very important to get the full power of datasquirel management system.</p>"}},"__N_SSG":true}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Data types","slug":"data-types","description":"<p>Relational database data types</p>","content":"<h2>VARCHAR</h2><p>The varchar datatype is probably the most commonly used datatype. It's basically text and numbers that max out at 255 characters. Varchar type is usually annoted in the form <code style=\"display:inline\">VARCHAR(20)</code> .</p>"}},"__N_SSG":true}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Querying Data","slug":"querying-data","description":"<p>Using SQL to query data from your database</p>","content":"<h2>Overview</h2><p>Querying data will eventually be the most common thing you do with your datasquirel account. So it's important to know some essential querying syntax, our node module abstraction will not give you the same level of control as direct sql querying.</p><h2>SELECT Keyword</h2><pre class=\"language-markup\">SELECT * FROM blog_posts</pre><p>The select keyword is the most basic and used keyword. In the example above, we're selecting every row(or entry) from the table <code style=\"display:inline\">blog_posts</code> . The \"*\" sign stands for \"all columns\". To dial down to specific columns, you can replace the \"*\" symbol with the column(s) you want to select. Example:</p><pre class=\"language-markup\">SELECT title, body FROM blog_posts</pre><p>This query only targets the <code style=\"display:inline\">title</code> and <code style=\"display:inline\">body</code> columns(or fields) in the <code style=\"display:inline\">blog_posts</code> table.</p>"}},"__N_SSG":true}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Getting Started","slug":"getting-started","description":"<p>Introduction to datasquirel. Read the <a href=\"../../../docs/quick-start\">quick-start guide</a> to get started with a new account.</p>","content":"<h2>Overview<a href=\"https://vitejs.dev/guide/#overview\"></a></h2><p>Datasquirel is an SQL-based data management system that aims to manage SQL databases with the lowest level of opinionation. Datasquirel consists of 2 main parts:</p><ol><li>A full-fledged SQL server that runs multiple isolated databases for different users, interfacing with an online Graphical user interface and a REST API integration.</li><li>An all-purpose static files server using NGINX to serve static files on demand. Files uploaded to datasquirel static file server are public by default, but the can be made private, in which case they can only be accessed via secure encrypted credentials.</li></ol><div style=\"flex-wrap:wrap;max-width:800px\"><div style=\"padding:30px;border-radius:5px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;background-color:rgb(246, 244, 248);position:relative;overflow:hidden;flex-grow:1\"><h3 style=\"margin:0px;color:rgb(30, 41, 59)\">GUI Reference</h3><div>SQL through your bowser</div><a href=\"../../../docs/gui-reference\" class=\"button\">Learn More</a> <img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/icons/ui-design.png\" style=\"position:absolute;bottom:-100px;right:-50px;opacity:0.2\" width=\"250\" height=\"250\" /></div></div><p>Datasquirel's Graphical User Interface aims to narrow down the the complexities of SQL to a simple user interface with columns, rows, and entries.</p><div style=\"flex-wrap:wrap;max-width:800px\"><div style=\"padding:30px;border-radius:5px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;background-color:rgb(246, 244, 248);position:relative;overflow:hidden;flex-grow:1\"><h3 style=\"margin:0px;color:rgb(30, 41, 59)\">API Reference</h3><div>SQL over the cloud using REST</div><a href=\"../../../docs/api-reference\" class=\"button\">Learn More</a> <img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/icons/world-wide-web.png\" style=\"position:absolute;bottom:-100px;right:-50px;opacity:0.2\" width=\"250\" height=\"250\" /></div></div><p>Datasquirel's API reference uses our NPM module <a href=\"https://www.npmjs.com/package/datasquirel\">datasquirel</a>. This can be installed via npm:</p><pre class=\"language-markup\">npm install datasquirel</pre><p>Learn more by reading the <a href=\"docs/api-reference\">api documentation</a></p><h2><br /></h2><h2>Key Concepts</h2><h3>SQL</h3><p>SQL stands for \"Sequential Query language\". This is the standard language for relational databases like MySQL and Postgres. Datasquirel uses MySQL and is compatible with all known SQL syntax.</p><h3>Database</h3><p>A database in datasquirel is an isolated MySQL database running on our MySQL servers. A database consists of tables, which in turn consists of columns, rows, and entries. Each database can be exported at anytime, and also populated using a .sql dump file at any time.</p><h3>CRUD</h3><p>CRUD stands for <strong>Create, Read, Update, Delete</strong>. This is the basic spectrum of the capabilities of any database, and it is useful for managing data.</p>"}},"__N_SSG":true}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"GUI Reference","slug":"gui-reference","description":"<p>Datasquirel Graphic User Interface provides a way to manage database instances from your browser</p>","content":"<p>A lot can be done using our web interface. Everyhing going on you admin dashboard is essentially running SQL queries on your isolated database, and saving and retrieving static files. Our integrated SQL shell for each database takes this concept to the next level. Giving you the ability to run SQL queries directly via your browser. To get started using our GUI, follow these steps:</p><h3>1. Create Account</h3><p>Create a free account <a href=\"../../../create-account\">here</a></p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/create-account.png\" width=\"700\" height=\"506\" /></p><p><br /></p><h3>2. Create Database</h3><p>Navigate to your <a href=\"../../../admin\">Dashboard</a> or <a href=\"../../../admin/databases\">Databases page</a>. Click the \"Add Database\" button to add a new database.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/screencapture-localhost-7070-admin-2023-07-16-13_35_04.png\" width=\"700\" height=\"371\" /></p><p>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</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/screencapture-localhost-7070-admin-databases-add-database-2023-07-17-11_01_28.png\" width=\"700\" height=\"327\" /></p><p>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.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/screencapture-localhost-7070-admin-databases-test-2023-07-17-11_09_52.png\" width=\"700\" height=\"327\" /></p><h3>3. Add a table</h3><p>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.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/add-table-form.png\" width=\"700\" height=\"697\" /></p><p>On each table form you have access to the table fields(or column titles). Each field contains a few options:</p><ul><li><strong>Field Name</strong>: Name of field(or column title)</li><li><strong>Data Type</strong>: type of data to be stored on that field: <a class=\"inline\" href=\"docs/db-reference/data-types\">See All Datatypes</a></li><li><strong>Required</strong>: Choose whether the field must have a value or not</li><li><strong>Default Value</strong>: Default value of field in the case no value is entered.</li><li><strong>More:</strong> The \"More\" button contains options for encryption and foreign keys</li></ul><p>After these fields are filled, click \"Add Field\". Add as much field as you need. These fields serve as column titles for your table.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/tables-list.png\" width=\"700\" height=\"327\" /></p><p>After creating a table you now have access to the tables list.</p><p><br /></p><h3>4. Add an Entry</h3><p>Select the newly created Table and on the designated table page click on \"Add New Table Entry\"</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/table-page.png\" width=\"700\" height=\"504\" /></p><p>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.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/add-entry.png\" width=\"700\" height=\"554\" /></p>"}},"__N_SSG":true}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Getting Started","slug":"getting-started","description":"<p>Get started creating databases and making entries.</p>","content":"<h2>Overview</h2><p>Datasquirel GUI is focused on the process of creating databases, defining and adding tables, and adding entries to these tables. We will go through these steps here.</p><p><br /></p><h2>1. Create Account</h2><p>Create a free account <a href=\"../../../create-account\">here</a></p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/create-account.png\" width=\"700\" height=\"506\" /></p><p><br /></p><h2>2. Create Database</h2><p>Navigate to your <a href=\"../../../admin\">Dashboard</a> or <a href=\"../../../admin/databases\">Databases page</a>. Click the \"Add Database\" button to add a new database.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/screencapture-localhost-7070-admin-2023-07-16-13_35_04.png\" width=\"700\" height=\"371\" /></p><p>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</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/screencapture-localhost-7070-admin-databases-add-database-2023-07-17-11_01_28.png\" width=\"700\" height=\"327\" /></p><p>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.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/screencapture-localhost-7070-admin-databases-test-2023-07-17-11_09_52.png\" width=\"700\" height=\"327\" /></p><h2>3. Add a table</h2><p>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.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/add-table-form.png\" width=\"700\" height=\"697\" /></p><p>On each table form you have access to the table fields(or column titles). Each field contains a few options:</p><ul><li><strong>Field Name</strong>: Name of field(or column title)</li><li><strong>Data Type</strong>: type of data to be stored on that field: <a class=\"inline\" href=\"docs/db-reference/data-types\">See All Datatypes</a></li><li><strong>Required</strong>: Choose whether the field must have a value or not</li><li><strong>Default Value</strong>: Default value of field in the case no value is entered.</li><li><strong>More:</strong> The \"More\" button contains options for encryption and foreign keys</li></ul><p>After these fields are filled, click \"Add Field\". Add as much field as you need. These fields serve as column titles for your table.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/tables-list.png\" width=\"700\" height=\"327\" /></p><p>After creating a table you now have access to the tables list.</p><p><br /></p><h2>4. Add an Entry</h2><p>Select the newly created Table and on the designated table page click on \"Add New Table Entry\"</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/table-page.png\" width=\"700\" height=\"504\" /></p><p>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.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/add-entry.png\" width=\"700\" height=\"554\" /></p>"}},"__N_SSG":true}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"pageProps":{"user":null,"pages":[{"id":8,"title":"Getting Started","slug":"getting-started","level":1,"parent_id":null},{"id":9,"title":"Getting Started","slug":"getting-started","level":2,"parent_id":3},{"id":2,"title":"Quick Start","slug":"quick-start","level":1,"parent_id":null},{"id":3,"title":"GUI Reference","slug":"gui-reference","level":1,"parent_id":null},{"id":4,"title":"API Reference","slug":"api-reference","level":1,"parent_id":null},{"id":10,"title":"Get","slug":"get","level":2,"parent_id":4},{"id":12,"title":"Database Reference","slug":"database-reference","level":1,"parent_id":null},{"id":11,"title":"Post","slug":"post","level":2,"parent_id":4},{"id":13,"title":"Data types","slug":"data-types","level":2,"parent_id":12},{"id":14,"title":"Querying Data","slug":"querying-data","level":2,"parent_id":12},{"id":15,"title":"Upload Media","slug":"upload-media","level":2,"parent_id":3}],"targetPage":{"title":"Upload Media","slug":"upload-media","description":"<p>Datasquirel comes baked with an integrated static file directory. This makes it easy to upload public and private files and access it from anywhere.</p>","content":"<h2>Overview</h2><p>Media management is a bigger problem than it sounds at first. Images tend to get out of hand when adding them to web projects: your images need to be well optimized for fast loading, easily accessible, and maintain clarity so that your website doesn't look like it's from the 80's. Datasquirel does this all for you in a few clicks.</p><h2>Adding Media</h2><p>Every datasquirel account is created with two directories for media storage: one is public, and the other is private. To start adding media, follow these steps:</p><h3>1. Navigate to \"<strong>Media\" </strong>from your dashboard</h3><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/media-page-with-folder.png\" width=\"800\" height=\"373\" /></p><p>If you created a database already, with an image for this database, your media folder will be pre-populated with a folder named after your database (<code style=\"display:inline\">test</code>  in this case), and it will contain the image you uploaded when you created the database. </p><h3>2. Select Media files</h3><p>To add a new media, click on <strong>Add Media</strong> button. This will open a modal for you to choose which type of media you want to add.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/chose-media-type-to-upload.png\" width=\"800\" height=\"373\" /></p><p>There are two options available at this time: <strong>Images</strong>, and <strong>Files</strong>. Image uploads only allow the image types listed in the description, the same applies with files. Click on the desired type and select the files you want to upload. You can upload multiple files at the same time.</p><h3>3. Edit selected files and upload files</h3><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/select-images-to-upload.png\" width=\"800\" height=\"373\" /></p><p>The next modal gives you the option to further change attributes of the images before uploading. These attributes include the <strong>image name</strong>, and <strong>privacy</strong>. Private images can only be accessed via out API using your <strong>Read Only </strong>or <strong>Full Access</strong> API keys.</p><p>After you're set, click on \"Upload Media\". This process uploads selected media to their respective directories. But that's not all, each media is compressed automatically, using a max width of <strong>1800px</strong>, and each media comes with an automatically generated thumbnail. So For each image you upload, you have two images. The thumbnail image contains a suffix <code style=\"display:inline\">_thumbnail</code> added to the original image's name.</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/media-with-added-images.png\" width=\"800\" height=\"599\" /></p><p>After images have been uploaded, you can now copy the link for *public images and share anywhere, you can also copy the thumbnail link. NOTE, you cannot share private images publicly, private images don't have a public URL, they can only be accessed through OUR API with valid credentials.</p><p><br /></p><h2>Adding Folders</h2><p>Adding folders help to better organize media. We currently have 2 depths of folder structure. So you can create a folder, and a sub-folder. To create a folder, simply navigate to your <strong>Media </strong>admin page and click \"<strong>Add Folder</strong>\".</p><p><img src=\"https://static.datasquirel.com/images/user-images/user-2/docs/add-folder-screen.png\" width=\"800\" height=\"376\" /></p><p>Add a folder name and click \"<strong>Add New Folder</strong>\". Your new folder is now ready to go. Click on the new folder and you can upload images and files to that folder.</p>"}},"__N_SSG":true}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long