How-to Guides
Concise, goal-oriented instructions for practical tasks. Real, working examples you can use immediately.
Looking for hands-on projects to get started? Check out Tutorials. Or want to understand the "why" behind things? Check out Explanation.
Core Patterns
Learn the fundamental patterns for building with Stario:
- Reading & Updating Datastar Signals + Patching Elements - Read signal values, update them, patch HTML elements. The foundation of reactive UIs.
- Form Validation with Datastar - Real-time and on-submit validation with error handling and retry logic.
- Image Upload - Handle file uploads with automatic base64 encoding, FileSignal objects, and loading indicators.
- Error Handlers & Custom Exceptions - Define custom exceptions, register handlers, return custom HTML for errors.
Development & Logging
Set up a productive development environment and robust logging:
- Logging with Logger Dependency - Use the logger dependency, log at different levels, add context, handle exceptions.
- Building Custom Log Sinks - Send logs to files, databases, Datadog, Sentry, CloudWatch, or anywhere else.
Authentication & Security
Secure your application:
- Authentication with Sessions - Cookie-based session management and user authentication.
Data & Database
Work with databases and structured data:
- Database Dependencies - Set up async database connections with dependency injection.
Deployment & Infrastructure
Get your app ready for production:
- Hot Reload Development - Fast development with automatic reloading.
- Docker Images for Production - Build optimized, secure Docker images with multi-stage builds.
Need Help?
- Not sure where to start? Check out the Tutorials
- Looking for conceptual understanding? See Explanations
- Need API details? Head to Reference
- Can't find what you need? Join our Community!
