Examples
Examples
Complete, runnable examples for REST APIs, WebSocket chat, file uploads, and auth flows.
Complete, runnable examples for common StreetJS Framework use cases.
| Example | Description |
|---|---|
| REST API | CRUD endpoints with PostgreSQL, pagination, OpenAPI |
| WebSocket Chat | Real-time chat with rooms and JWT auth |
| File Upload | Streaming multipart upload with validation |
| User API | Full user management with auth, roles, sessions |
| Streaming Query | Stream large PostgreSQL result sets row-by-row |
All examples assume you have run street create my-app and have a working StreetJS project.
Starter apps & templates
Scaffold a complete project for a domain in one command — each template overlays domain packages and a starter module on the base app:
1
2
3
4
street create my-shop --template ecommerce # products, inventory, carts, orders
street create my-saas --template saas # users, roles (RBAC), audit log
street create my-chat --template realtime-chat # WebSocket channels, presence, typing
street create my-date --template dating-app # encrypted profiles, likes, matching
Add a typed frontend (Vite React or Next.js App Router) and a CI workflow:
1
2
street create my-app --template saas --frontend react
street create my-app --template ecommerce --frontend next
| Template | What you get | Tutorial |
|---|---|---|
app (default) |
HTTP, DI, PostgreSQL, health checks | First API |
saas |
User/role admin + audit log | Auth |
ecommerce |
Catalog, inventory, carts, orders | REST API |
realtime-chat |
Channels, presence, typing | Realtime |
dating-app |
Profiles, likes, reciprocal matching | PostgreSQL |
Reference example pages
| Example | Description |
|---|---|
| Todo API | The smallest end-to-end CRUD service — great first build |
| REST API | Full CRUD + pagination + OpenAPI |
| WebSocket Chat | Rooms + JWT auth |
| File Upload | Streaming multipart upload |
Building the broader catalog (Blog API, URL Shortener, CRM, Marketplace, AI Knowledge Base, …) is tracked in the Tutorials & Examples Program, which lists what is published versus planned. We add runnable examples incrementally rather than shipping stubs.