/rust-typescript-mono

A monorepo template for rust + SQLX + POEM + TS + Next.JS + Mantine v7

Primary LanguageTypeScript

Turborepo starter

This is a turborepo starter that does the following:

  • Sets up a nextjs frontend in apps/fe
  • Sets up a Rust backend in apps/be. This rust backend uses sqlx + poem + poem-openapi

What's inside?

This Turborepo includes the following packages/apps:

Apps and Packages

  • fe: a Next.js app with Mantine and Tailwind.css.
  • be: a Rust app with Poem,Poem-OpenAPI and SQLX
  • ui: a stub Mantine component library.
  • eslint-config-custom: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • tsconfig: tsconfig.jsons used throughout the monorepo
  • types: Rust library using Typeshare to share type logic between be and the typescript apps. One source of truth for your types.

Each package/app is 100% statically typed.

Prerequisite

Do use 100% of the stuff provided in this repo, you need the following installed:

  • Rust
  • pnpm
  • sqlx-cli
  • typeshare-cli

This is a non-exhaustive list. More stuff might be required. 🤷🏾‍♂️

Build

To build all apps and packages, run the following command:

cd my-turborepo
pnpm build

Develop

To develop all apps and packages, run the following command:

cd my-turborepo
pnpm dev