Built with Remix.run
Structure:
... remix generated code
./prisma/
./utils/
./app/models
/./app/utils/
Folder where prisma schema and migrations are stored
Folder where scripts are stored. Currently, there's one script that generates model types file to be used later by Typescript
Script that reads ./app/models/
directories and generates a APP_MODELS
type
Folder where models and validations are built. When running npm run dev
, this template generates a file called models.ts
which is built by reading the directories within ./app/models/
to be imported by ./app/utils/
and provide Typescript code suggestions.
File that exports prisma middlewares defined by each model (can be automated). This is used by ./utils/db.server.ts
which imports middlaewareHooks
and adds it to Prisma middleware.
Functions that validates/format request input data based on models schema (yup.validate
). It also resolves errors to a object that has Typescript autocomplete based on Generics.
Files that exports user.prisma.ts
types and middleware
File that declares yup schema, prisma middleware and User types.
Folder that contains types and helpers for the remix application.
A copy of db.server.ts
from remix/jokes
File that provides types and functions to add typescript support based on generics (inspired on express)
File that provides types and functions to add typescript support based on generics (inspired on express)