Next Steps
4 minute read
You’ve completed the Getting Started guide. You now know how to install Rivaas, build applications, configure them, and add middleware.
What You’ve Learned
β
Installation β Set up Rivaas and verified it works
β
First Application β Built a REST API with routes and JSON responses
β
Configuration β Configured service metadata, health checks, and observability
β
Middleware β Added functionality like CORS and authentication
Choose Your Path
π Building Production APIs
Learn advanced routing, error handling, and API patterns:
- Routing Guide β Advanced routing patterns, groups, and constraints
- Request Binding β Bind and validate JSON, XML, YAML, and form data
- OpenAPI Documentation β Auto-generate API specs
- Validation Guide β Input validation strategies
Recommended Example: Blog API β Full-featured blog with CRUD operations, validation, and testing.
π Observability & Monitoring
Understand your application in production:
- Logging Guide β Structured logging with slog
- Metrics Guide β Prometheus metrics and custom instrumentation
- Tracing Guide β Distributed tracing with OpenTelemetry
- Health Endpoints β Kubernetes-compatible liveness/readiness
Key Pattern: The observability trinity (logs, metrics, traces) works together. They provide complete visibility into your application.
π Security & Best Practices
Secure your APIs:
- Validation Guide β Input validation and sanitization
- Validation Security β Security considerations for validation
- Router Middleware β Security middleware (basic auth, rate limiting)
Security Checklist:
- β Use HTTPS in production
- β Validate all inputs
- β Implement authentication
- β Add rate limiting
- β Enable security headers
βοΈ Deployment & Operations
Deploy your application to production:
- App Configuration β Environment-based config
- Server Configuration β Timeouts and graceful shutdown
- Health Endpoints β Kubernetes-compatible probes
- Debug Endpoints β pprof for profiling
Production Checklist:
- β Set up health endpoints
- β Configure timeouts
- β Enable observability
- β Use environment variables
- β Implement graceful shutdown
π― Advanced Topics
Deep dive into framework internals:
- Router Middleware β Build reusable middleware
- App Testing β Unit, integration, and E2E tests
- Lifecycle Hooks β Application lifecycle management
Example Applications
Learn from complete, production-ready examples:
Quick Start Example
Path: /app/examples/01-quick-start
Complexity: Beginner
Shows: Minimal setup, basic routing, health checks
cd app/examples/01-quick-start
go run main.go
Blog API Example
Path: /app/examples/02-blog
Complexity: Intermediate
Shows: CRUD operations, validation, OpenAPI, testing, configuration
cd app/examples/02-blog
go run main.go
# Visit http://localhost:8080/docs for Swagger UI
Features:
- Complete REST API (posts, authors, comments)
- Method-based validation
- OpenAPI documentation
- Comprehensive tests
- Configuration management
- Observability setup
More Examples
- Middleware Examples β All 12 middleware with curl commands
- Router Examples β Low-level router usage
Framework Packages
Rivaas is modular β use any package independently:
Core Packages
| Package | Description | Go Reference |
|---|---|---|
| app | Batteries-included framework | pkg.go.dev |
| router | High-performance HTTP router | pkg.go.dev |
Data Handling
| Package | Description | Go Reference |
|---|---|---|
| binding | Request binding (JSON, XML, YAML, etc.) | pkg.go.dev |
| validation | Struct validation with JSON Schema | pkg.go.dev |
Observability
| Package | Description | Go Reference |
|---|---|---|
| logging | Structured logging with slog | pkg.go.dev |
| metrics | OpenTelemetry metrics | pkg.go.dev |
| tracing | Distributed tracing | pkg.go.dev |
API & Errors
| Package | Description | Go Reference |
|---|---|---|
| openapi | OpenAPI 3.0/3.1 generation | pkg.go.dev |
| errors | Error formatting (RFC 9457, JSON:API) | pkg.go.dev |
Learn More: Package Documentation
Reference Documentation
Quick access to API references:
- App Options β All configuration options
- App Context API β Request/response handling
- Router Middleware β All middleware options
- Router API β Low-level router API
Community & Support
Get Help
- π¬ GitHub Discussions β Ask questions, share ideas
- π GitHub Issues β Report bugs, request features
- π§ Email β security@rivaas.dev (security issues only)
Contribute
Rivaas is open source and welcomes contributions:
- Contributing Guide β How to contribute
- Design Principles β Framework philosophy
- Testing Standards β Testing guidelines
Stay Updated
- β Star on GitHub β Get notified of releases
- π¦ Release Notes β What’s new
- πΊοΈ Roadmap β Upcoming features
Quick Reference Card
Create Application
a, err := app.New(
app.WithServiceName("my-api"),
app.WithServiceVersion("v1.0.0"),
)
Register Routes
a.GET("/path", handler)
a.POST("/path", handler)
a.PUT("/path/:id", handler)
a.DELETE("/path/:id", handler)
Add Middleware
a.Use(middleware1, middleware2)
api := a.Group("/api", authMiddleware)
Start Server
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer cancel()
a.Start(ctx)
Handle Requests
func handler(c *app.Context) {
// Get path parameter
id := c.Param("id")
// Get query parameter
filter := c.Query("filter")
// Bind request body (auto-detects JSON, form, etc.)
var req MyRequest
if err := c.Bind(&req); err != nil {
c.JSON(400, map[string]string{"error": "Invalid request"})
return
}
// Send JSON response
c.JSON(200, map[string]string{"status": "ok"})
}
What’s Next?
Pick the topic that interests you most. The documentation works for both linear reading and jumping to specific topics.
Happy building with Rivaas!
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.