Project: Leight Viv
Welcome
This project is a collection of fullstack libraries and concepts which should drastically simplify development of quite any application.
Everything done in this project is highly opinionated, but also quite versatile, so one could alter basically anything.
One of the base concepts this project uses is MCP
see more in docs which can simplify a lot of stuff in basically any project.
Stack
Here are main parts the whole collection is built on top. You can find other pieces, but those are worth mentioning.
Next.js
Because Next.js (opens in a new tab) is incredibly simple, but also powerful framework, we got you covered with default support for some stuff.
Prisma
Prisma (opens in a new tab) is the ultimate database tool providing typings for database model. Leight implements some tools which separate and simplifies usage of prisma.
With MCP
in mind, everything has Zod schema (opens in a new tab) generated by the great tool of this guy (opens in a new tab): zod-prisma-types (opens in a new tab).
Zod
Zod (opens in a new tab) is incredible piece of software which changes thinking of Interfaces
to thinking of Schemas
; so everything you have should have a Schema
, so you can validate all the data
and also generated TypeScript stuff from it!
Zustand
Every application needs state management (opens in a new tab). So Leight implements set of packages which simplifies work with Zustand, provides Context Providers and set of generated hooks.
tRPC
We're talking about fullstack here, so tRPC (opens in a new tab) is the only choice we have. There is built-in support for generating procedures to simplify accessing Source with just only one generated method.
Mantine UI
Because writing styles manually is quite ineffective and expensive, there is support for Mantine (opens in a new tab) with some wrapped components.
esbuild
Building is done in two steps: one is esbuild (opens in a new tab) handling transpilation, second TSC (opens in a new tab) for types generation; also, a package is exported to simplify this process for you.
TypeScript
It's an opinion, but... there is no other choice: the project is built on top of TypeScript (opens in a new tab) and heavily uses types to make you live a lot easier. Ok, there are some tradeoffs, but who cares.
Motivation
All the time new app is created, there is a lot of stuff repeatedly created, a lot of same concepts, data fetching, mutations and so on.
This collection aims to make kind of "standard" which offloads thinking of "how to get data", "how to sort data", creating tables, forms, connecting them to the backend and a lot of other stuff.
So here we're: you can pick some tools, you can use a whole collection and simplify your developer life a lot by generating pieces of repeated code, having everything typed and so on.
Maturity
You see this as yet another project. You're right.
But it was quite long time in development and it's used in some projects, concepts and API
of the whole collection is quite polished today and you can use whatever
piece you want/need. The overall goal is to provide best practices over the best libraries available on the current market.
This collection may be seen as an inspiration, how you can do things in a quite a nice way - not simple, because you can use thousands of lines of code to do relatively simple thing, but it's worth it, because at least - you will not repeat yourself :).