Setting up SnailyCADv3 on Linux

Created: 2021-04-04 - Last updated: 2021-04-16

Getting started

This is a Linux guide for installing SnailyCAD. See the windows guide here.

Requirements

Before starting the installation of SnailyCAD, you need to have the follow installed on your machine:

Setting up XAMPP

If you already have XAMPP setup or another MySQL database, you can skip to Installing SnailyCAD.

After successfully installing XAMPP, we'll start both Apache and MySQL by running the following command:

sudo /opt/lampp/lampp mysql

If started successfully, you can now access http://localhost/phpmyadmin in your browser. If you're using a VPS then you need to use the IP of the VPS, you might need to configure access to the VPS for phpmyadmin.


Let's create the database and insert the snaily-cad.sql file

In the sidebar you can see a link: "New", click that, it should look something like this:

create-database

Enter snaily-cad in the input field then click Create.

Once finished creating the database, you can should see a navbar at the top, click the import button:

import-button

Now a new window should appear, click the browse... button and select the snaily-cad.sql file. It's located in the root folder of SnailyCAD. After selecting it you can click the Go button on the bottom right corner.

database-browse

šŸŽ‰ You've successfully setup XAMPP and MySQL for SnailyCAD! If you're experiencing issues, feel free to join our Discord server.

Installing SnailyCAD

Firstly, open a terminal.

Once opened, we'll need to clone down the code, run the following command:

git clone https://github.com/Dev-CasperTheGhost/snaily-cadv3

Once that's finished, we can go into the SnailyCAD folder with the following command:

cd snaily-cadv3

Now we need to install all the dependencies to run the CAD. Run the following command:

This can take several minutes to finish, please be patient!

npm install

Once it has finished installing, navigate to the src folder with the following command:

cd src

We can see all the files and folders with the following command:

ls -l

Now you should see the following files and folders:

components
hooks
interfaces
lib
pages
state
styles
config.example.ts
language.json
server.ts

To create the config file run the following command:

This will copy and rename the file.

cp config.example.ts config.ts

Your server folder should now have these files:

components
hooks
interfaces
lib
pages
state
styles
config.example.ts
config.ts
language.json
server.ts

Now open the config.ts file using nano config.ts or any other terminal-editor. You can view more information about what the values mean here.

Once modified, make sure to save the config file (CTRL + S).

Now you can run the following command:

npm start

This will start SnailyCAD.

Woohoo šŸŽ‰šŸŽ‰

You've successfully installed SnailyCAD!

You can now open http://localhost:3030 in your browser.

If you're using a VPS, you'll need to use the IP of that VPS to access the CAD. You can use NGINX to proxy the CAD too.

Further support and questions

If you have any other questions or need help installing SnailCAD, feel free to join the Discord server.