No description
- Rust 72.8%
- CSS 23.7%
- Dockerfile 3.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| src | ||
| toasty | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| components.toml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
| styles.css | ||
hello-topcoat
A Topcoat application.
Development
Install the Topcoat CLI:
cargo install topcoat-cli
Create the database tables by generating a migration from the models and applying it:
cargo run -- toasty migration generate
cargo run -- toasty migration apply
Run both commands again after changing a model. The database is stored in data.db.
Start the development server, which rebuilds the application when you edit its source:
topcoat dev
Then open http://127.0.0.1:3000.
Project structure
| Path | Contents |
|---|---|
src/app.rs, src/app/ |
The route tree: the router, layouts, pages, and routes. |
src/features.rs, src/features/ |
Everything one feature owns, such as its data and business rules. |
src/components.rs, src/components/ |
Shared UI components that belong to no single feature. |
src/db.rs |
The database connection. |
toasty/ |
The database migrations. Commit them with your code. |
Pages in app use features and components. A feature can use shared components but never imports from app, and shared components never import from a feature.