Skip to content

Latest commit

 

History

History
158 lines (96 loc) · 5.65 KB

folders-architecture.mdx

File metadata and controls

158 lines (96 loc) · 5.65 KB
title Folders Architecture

import { FileTree, Icon } from "@astrojs/starlight/components"; import WorkInProgress from "../../components/WorkInProgress.astro"; import FileTreeItem from "../../components/FileTreeItem.astro"; import FileTreeTitle from "../../components/FileTreeTitle.astro";

- - - - - - - - - - - - - - - - - - - - - - - - - - -

GitHub configuration files for GitHub actions, PR templates and README assets.

[Storybook](https://storybook.js.org/) configuration files.

VS Code workspace settings. The extensions.json file contains some recommended extensions for the project.

End-to-end tests folder for Playwright tests.

Prisma folder for database schema and seed scripts.

Prisma generator and client blocs are defined in the /schema/main.prisma file.

All other schema files organize related models / enum together. For example, in /schema/user.prisma you will be able to find all models / enum related or used by a User model, like VerificationToken model or UserRole enum.

Static assets served as-is (images, icons, robots.txt, etc.).

Main application source code.

React generic UI components. In this folder, all components should be "dumb", focus on UI rendering and without business logic. These components should be documented in Storybook.

This folder contains all emails templates created with react-email.

Environment variables and validation utilities.

All business features for client code or code shared between client and server.

React generic hooks that can be use accross the application.

Layout components and page wrappers.

Global configuration for client libraries or libraries shared between client and server. If you need a configuration only on the server side, use the src/server/config folder.

Folder which contains all the translations files. Use i18n Ally VS Code extension for help on this part 😅.

Tanstack Start router folder, all the routes of the application are declared in this folder. See the Tanstack Start documentation for more details.

All the code for the server ONLY code.

Global styles, Tailwind config, or CSS utilities.

Unit and integration tests.

Global TypeScript types available accross all the code base without imports.

Top-level React providers (context, theme, query client, etc.).

Generated route tree file (auto-generated, don’t edit manually).

Router configuration and setup.

This file is LOCAL and should NEVER be tracked on GIT. All sensitive information should be set in this .env file by each developers.

This file IS tracked on GIT, make sure that you NEVER put sensitive information in this file. All sensitive information should be set in the .env. This file show an example of the .env that a new developer on the project can duplicate to create their own .env file.

GIT hooks created with Lefthook.

Vite build and dev server configuration.

Vitest configuration for unit and integration tests.