Installation
Get Soli MVC up and running on your machine in minutes. Follow these steps to bootstrap your new project.
1
Prerequisites
Rust & Cargo
Latest stable version
rustc --version
Node.js
v16 or higher (for Tailwind CSS)
node --version
npm
Package manager
npm --version
2
Install Soli CLI
Terminal
# Clone the repository
git clone https://github.com/solisoft/soli_lang.git
cd soli_lang
# Build and install the soli CLI
cargo install --path .
# Verify installation
soli --version
3
Create Your Project
Terminal
# Create a new Soli app
soli new my_app
This command creates a new project with everything you need:
- MVC directory structure (
app/controllers,app/views,app/models) - Tailwind CSS configuration and dependencies
- Home controller and welcome page
- Application layout with responsive design
- Helper functions for views
4
Start Development Server
Terminal
cd my_app
soli serve . --dev
Your app is now running at http://localhost:3000
Hot Reload Enabled
The --dev flag enables hot reload. Edit any controller, middleware, or view file
and refresh your browser to see changes instantly. No restart needed!
Project Structure
Understanding the layout of a Soli MVC application.
my_app/
├── app/
│ ├── controllers/ # Request handlers
│ │ └── home_controller.soli
│ ├── helpers/ # View helpers
│ │ └── application_helper.soli
│ ├── models/ # Data models
│ └── views/ # Templates
│ ├── home/
│ │ └── index.html.erb
│ └── layouts/
│ └── application.html.erb
├── config/
│ └── routes.soli # Route definitions
├── db/
│ └── migrations/ # Database migrations
├── public/ # Static files
│ ├── css/
│ │ ├── app.css # Source (Tailwind directives)
│ │ └── output.css # Compiled CSS
│ ├── js/
│ └── images/
├── tests/ # Test files
├── .env # Environment variables
├── package.json # Node.js dependencies
└── tailwind.config.js # Tailwind configuration
Production Deployment
Terminal
# Start production server
soli serve . --port 3000
# Or run as a daemon (background process)
soli serve . -d
Troubleshooting
- If changes don't appear, check the terminal for errors
- Make sure port 3000 isn't in use by another process