Project Examples
Explore complete, runnable projects that show how Chuks works in practice. Each project includes source code, a README, and can be run with chuks run or compiled with chuks build.
Beginner
Section titled “Beginner”Hello API
Section titled “Hello API”A minimal HTTP server with JSON routing — the simplest possible Chuks web service.
What you’ll learn:
- Creating an HTTP server
- GET/POST route handling
- JSON responses
import { createServer } from "std/http"
function main() { var app = createServer() app.get("/", (req, res) => { res.json({ message: "Hello, Chuks!" }) }) app.listen(8080)}Task Tracker CLI
Section titled “Task Tracker CLI”A command-line task manager that reads and writes JSON files. No server, no database — just the language fundamentals.
What you’ll learn:
- File I/O with
std/fsandstd/json - Enums for task status
- Error handling with try/catch
- Working with arrays and maps
Intermediate
Section titled “Intermediate”URL Shortener
Section titled “URL Shortener”A URL shortening service with Redis-backed storage, input validation, and rate limiting.
What you’ll learn:
- Redis integration (
chuks_redis) - Middleware (rate limiting, validation)
cryptoandbase64for short code generation- Package management with
chuks install
User Service
Section titled “User Service”A full REST API with MongoDB, JWT authentication, and a clean service-layer architecture.
What you’ll learn:
- CRUD operations with MongoDB (
chuks_mongodb) - JWT auth middleware
- Repository pattern with interfaces and abstract classes
- CORS, logging, and error handling middleware
spawn/awaitfor async database calls
Real-Time Chat
Section titled “Real-Time Chat”A WebSocket chat server with channels for message broadcasting across connected clients.
What you’ll learn:
- WebSockets (
chuks_websocket) - Channels for concurrent message passing
spawnfor per-client handler tasks- Broadcast patterns and connection lifecycle
AI Chat Agent
Section titled “AI Chat Agent”An AI-powered chat agent with RAG (retrieval-augmented generation), tool calling, and streaming responses.
What you’ll learn:
- LLM integration (
chuks_ai) — OpenAI, Anthropic, Google, and more - Agent framework (
chuks_agent) with tool definitions - RAG pipeline (
chuks_rag) with vector search - Streaming HTTP responses
Advanced
Section titled “Advanced”Job Scheduler
Section titled “Job Scheduler”A background job scheduler with Redis-backed queues, cron triggers, and parallel worker pools.
What you’ll learn:
- Cron scheduling (
chuks_cron) - Redis job queues (
chuks_redis) spawnworker pools with graceful shutdown- Retry logic and dead-letter handling
Microservice Pair
Section titled “Microservice Pair”Two services communicating over gRPC, with OpenTelemetry tracing and NATS event streaming.
What you’ll learn:
- gRPC service definitions (
chuks_grpc) - Distributed tracing (
chuks_otel) - Event-driven architecture (
chuks_nats) - Dependency injection (
chuks_di)
Package Registry
Section titled “Package Registry”A package management backend with search, versioning, and a query builder DSL.
What you’ll learn:
- Query builder (
.where(),.orderBy(),.first(),.all()) - Full-text search with LIKE queries
- Entity/repository/service architecture
- Semantic versioning and duplicate detection
GraphQL API
Section titled “GraphQL API”A typed GraphQL server with resolvers, query/mutation support, and N+1 prevention.
What you’ll learn:
- GraphQL schema definition (
chuks_graphql) - Typed resolvers with generics
- DataLoader pattern for N+1 prevention
- Query and mutation handling
Run Any Example
Section titled “Run Any Example”Every project follows the same structure:
# Clone and rungit clone https://github.com/chuks-programming-language/<project-name>cd <project-name>chuks install # install dependencies (if any)chuks run # start the projectOr compile to a native binary:
chuks build # produces an optimized AOT binary./build/<project-name>Want to see a specific example? Open an issue and let us know.