↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Build a full stack app with Rust, Next.js and Docker

The article explains how to build a simple full stack app with Next.js 14, Tailwind CSS, Rust, PostgreSQL, Docker, and Docker Compose. It starts from the database, moves to the Rust backend, and ends with the Next.js frontend.

Reading notes
#

  • The project uses a bottom-up approach, starting with the database and ending with the frontend.
  • The backend is written in pure Rust, without a framework, and uses Serde for serialization and deserialization.
  • The chosen database is PostgreSQL, running in a container with Docker.
  • Docker Compose brings together frontend, backend, and database in the same environment.
  • The backend exposes CRUD endpoints for users, with create, read, update, and delete.
  • The Rust application creates the users table if it does not already exist.
  • The Rust server listens on port 8080 and responds to simple TCP requests.
  • On the frontend, the author uses Next.js 14 with TypeScript and Tailwind CSS.
  • The frontend consumes the API with Axios and allows listing, creating, updating, and deleting users.
  • The article also shows how to package the backend and frontend with Docker for joint execution.