Source: handbook/ in the repository. Every code block compiles: CI runs ray check on each one.

More examples

The apps in this handbook cover the most common cases, each explained step by step. The ray-language organization publishes more apps written in raylang, with their full source, for other use cases. They are a good starting point when what you want to build is not in the handbook: find the closest one, clone it and change it.

By use case

Use case Apps
Desktop and mobile ray808 (drum machine with React for desktop, iOS and Android), raydesk (task manager), raynote (notepad with native menus and dialogs), rayplay (background audio player), raystage (window kinds)
Servers and networking raygate (API gateway), raywatch (service monitor with an SSE dashboard), raystream (media server), rayq (message queue with a WAL), raykv (Redis-compatible server), raybot (WebSocket bot), raymail (SMTP client), rayrelay (relay)
Distributed systems raymart (e-commerce with microservices, a gateway, a queue and four databases), raycall (microservices with RPC and tracing)
Security and P2P msg (encrypted P2P chat), takeit (encrypted file transfer), raypass (secrets vault), raysync (encrypted sync)
Web store (store with an Astro frontend and a raylang backend), raysite (static site generator)
Terminal raytop (process viewer), raylogs (log analyzer), raytetris, rallyx and 1942 (games at 30 fps)

raymart is the most complete example: a distributed e-commerce system with four hexagonal-architecture APIs (products, cart, orders and payments), each with its own database (PostgreSQL, MySQL, MongoDB and raykv), behind raygate, talking over rpc and gRPC and coordinated by the rayq queue. It runs as native binaries with docker compose, and includes end-to-end, chaos and load tests. It is the reference for seeing how several of these apps fit into a real system.

The packages they use are in the package index, and ray search finds them.

After each chapter

Every chapter of the handbook has apps that take the same idea further:

If you just read Look next at What they add
Mobile app and cross-platform ray808, rayplay, raydesk real-time and background audio, and an app with more screens
Windows in depth raynote, raystage an editor with real documents and every window kind
Server-rendered site and with React store, raysite a shop with a separate frontend and a site generator
Web API raygate, raycall, raymart a gateway, traces across services and a whole system
Command-line tool raytop, raylogs, raytetris full-screen terminal interfaces
Performance rayq, raykv, raystream servers measured under load

Starting from one

git clone https://github.com/ray-language/raydesk && cd raydesk
ray fetch          # downloads the ray.toml dependencies to .ray-deps/
ray test
ray dev

Every repository has a README that says what it covers and how to run it. To turn it into your project, change name in [package] and name and id in [app], and delete what you do not need: the compiler points at every place that depended on what you deleted.

For any function, the reference has its signature, and the manual (Spanish) explains the language in depth. The overview gathers every chapter.

<!-- sync: sha256:4e6fd5263a63 -->