2.9 KiB
Dental Manager - Starter
A monorepo setup to manage both Backend and Frontend of the Dental Manager application.
🚀 Getting Started
Follow the steps below to set up and run the project:
- Install dependency
npm install
- Generate Prisma, and its Types.
npm run db:generate
- Copy Environment Variables
Create .env files from the provided .env.example templates:
Change the required ones env in .env files.
npm run setup:env
- To Simply run all the app(Backend + Frontend).
npm run dev
- Or if want to run specfic app (either Backend or Frontend).
cd apps/Backend
npm run dev
or
cd apps/Frontend
npm run dev
This in a Turborepo. What's inside?
This Turborepo includes the following packages/apps:
Apps and Packages
docs: a Next.js app with Tailwind CSSweb: another Next.js app with Tailwind CSSui: a stub React component library with Tailwind CSS shared by bothwebanddocsapplications@repo/eslint-config:eslintconfigurations (includeseslint-config-nextandeslint-config-prettier)@repo/typescript-config:tsconfig.jsons used throughout the monorepo
Each package/app is 100% TypeScript.
Building packages/ui
This example is set up to produce compiled styles for ui components into the dist directory. The component .tsx files are consumed by the Next.js apps directly using transpilePackages in next.config.ts. This was chosen for several reasons:
- Make sharing one
tailwind.config.tsto apps and packages as easy as possible. - Make package compilation simple by only depending on the Next.js Compiler and
tailwindcss. - Ensure Tailwind classes do not overwrite each other. The
uipackage uses aui-prefix for it's classes. - Maintain clear package export boundaries.
Another option is to consume packages/ui directly from source without building. If using this option, you will need to update the tailwind.config.ts in your apps to be aware of your package locations, so it can find all usages of the tailwindcss class names for CSS compilation.
For example, in tailwind.config.ts:
content: [
// app content
`src/**/*.{js,ts,jsx,tsx}`,
// include packages if not transpiling
"../../packages/ui/*.{js,ts,jsx,tsx}",
],
If you choose this strategy, you can remove the tailwindcss and autoprefixer dependencies from the ui package.
Utilities
This Turborepo has some additional tools already setup for you:
- Tailwind CSS for styles
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting