#
Get started
#
Hey maker, welcome to RustSaaS 👋
Here's a quick overview of the boilerplate. Follow along to get your app up and running.
Once you're done, start with this tutorial to launch your project in 5 minutes. Let's build that startup, FAST ⚡
#
Prerequisites
- Have Rust installed
- Have PG (or any other database system) installed
- for MacOS users:
brew install postgresql@16
- for Linux users:
apt install postgresql
- for Windows users: follow the PostgreSQL installation instructions
- for MacOS users:
#
Start a local server
In your terminal, run those commands separately:
git clone git@gitlab.com:rustsaas/rustsaas.git [YOUR_APP_NAME]
cd [YOUR_APP_NAME]
cargo install just
git remote remove origin
just init
This last command will:
- Install node dependencies, in order for the sample website to display correctly
- Copy
.env.dist
file in a new.env
file - Build the project using cargo
- Create the database (we'll talk about the .env file later)
- Start the app
#
How to use the repository?
We opted for a virtual workspace architecture ;
the crates are in the /crates
folder. Each crate serves it own purpose - We'll detail every crate in the Crates section.
This allows to group all the dependencies in the root Cargo.toml
file. Then, in the children Cargo.toml
files, we can add the dependencies this way:
actix-web = { workspace = true }
To add custom crates to another custom crate, you only have to add this to the target Cargo.toml
:
repositories = { path = '../repositories' }