Simplify your project setup with Loco's predefined boilerplates, designed to make your development journey smoother. To get started, install our CLI and choose the template that suits your needs.
cargo install loco-cli
Create a starter:
✔ ❯ App name? · myapp
? ❯ What would you like to build? ›
❯ lightweight-service (minimal, only controllers and views)
Rest API (with DB and user auth)
Saas app (with DB and user auth)
The Saas starter is an all-included set up for projects requiring both a UI and a REST API. For the UI this starter supports a client-side app or classic server-side templates (or a combination).
- Frontend starter built on React and Vite (easy to replace with your preferred framework).
- Static middleware that point on your frontend build and includes a fallback index. Alternatively you can configure it for static assets for server-side templates.
- The Tera view engine configured for server-side templates, including i18n configuration. Templates and i18n assets live in
healthendpoints to check service health. See all endpoint with the following command
cargo loco routes
- Users table and authentication middleware.
- User model with authentication logic and user registration.
- Forgot password API flow.
- Mailer that sends welcome emails and handles forgot password requests.
Rest API Starter
Choose the Rest API starter if you only need a REST API without a frontend. If you change your mind later and decide to serve a frontend, simply enable the
static middleware and point the configuration to your
frontend distribution folder.
Lightweight Service Starter
Focused on controllers and views (response schema), the Lightweight Service starter is minimalistic. If you require a REST API service without a database, frontend, workers, or other features that Loco provides, this is the ideal choice for you!