Architecture

Overview

The high-level architecture diagram below depicts the services that make up the RestauWants application.

Architecture Diagram Architecture Diagram

The following services are part of the RestauWants application:

  • Next.js: Provides the frontend and backend of the application.
  • MySQL: Stores relational data for the application.

Frontend

The frontend of the application is built using Next.js, a React framework. The frontend is responsible for rendering the user interface and handling user interactions. It communicates with the backend using server actions and tRPC.

Backend

The backend of the application is provided by Next.js serverless functions running the Node.js runtime. It is responsible for performing server actions, handling tRPC requests, and interacting with the MySQL database.

Database

The MySQL database stores relational data for the application, including user, review, and friendship data. The backend communicates with the database through the mysql2 driver and the Drizzle ORM.

Deployment

The Next.js service is deployed to Vercel. The MySQL service is deployed to Railway.