This project is a simple fullstack web application that lets you upload and download files from "the cloud".
It was made using TypeScript with Svelte on the frontend and Rust with Axum on the backend. It uses Postgres to store user data and Redis to store session data.
This project was made as an assignment. You can read more about it here.
This section will guide you through the installation process to deploy the application on your machine.
Before starting with the installation, you need to make sure you have Node.js, npm as well as Rust installed on your machine.
You are also going to need docker and docker-compose to run the databases.
Once you have all the prerequisites installed, you can clone this repository and enter the project folder.
git clone https://github.com/MuttoniSamuele/cloud-storage-system
cd cloud-storage-system
Copy the .env.example
file and rename it to .env
.
cp .env.example .env
You can change the values of the variables in this file to suit your needs.
Now you can start the installation process.
First, start the databases with docker.
docker-compose up -d
Docker doesn't automatically load the database schema. You can do this by executing the following script.
./load-schema.sh
Next, run the following command to build the backend.
cargo build --release
While the code is compiling, you can build the frontend.
cd public
npm run build
This will create a public/dist
folder with the static files of the frontend. You can choose to only keep this folder and delete the rest of the frontend files as they will no longer be needed.
After the compilation is done, you can go back to the root of the project and run the server.
To run the application, execute the following command.
cargo run --release
Alternatively, you can run the executable in the target/release/
folder.