The objective of this project is to show how to create a fullstack app with Rust, Nuxt, gRPC, and TypeScript.
The pain of keeping types in sync between frontend and backend is a problem that I personally wanted to solve. I'm not a fan of "isomorphic" javascript frameworks (Next, Nuxt), mainly because I don't want to write servers in Javascript.
This allows me to write the backend in Rust and the frontend in Nuxt without sacrificing type safety and ergonomics.
- Backend: Rust with gRPC server using Tonic and Prost
- Frontend: Nuxt.js/Vue.js with TypeScript using ConnectRPC
- Communication: gRPC with Protocol Buffers
- Tonic: A gRPC implementation for Rust built on async/await
- Prost: Protocol buffer implementation for Rust with serialization support
- Tonic-Web: Enables gRPC-Web for browser compatibility
- ConnectRPC: Type-safe gRPC-Web client for TypeScript
- Buf: Protocol buffer toolchain for code generation
- Generated TypeScript types: Automatically generated from
.protofiles
Install the following dependencies:
bun installStart all services in development mode:
bun run devOr run services individually:
# Backend API server
bun run dev:backend
# gRPC server
bun run dev:grpc
# Frontend development server
bun run dev:frontend