Appearance
Folder Structure
The folder structure of the CDR is as follows:
bash
<project-name>
├── README.md
├── index.html
├── package.json
├── public
│ └── vite.svg
├── src
│ ├── api.ts
│ ├── app
│ │ ├── api
│ │ │ └── index.ts
│ │ ├── controller
│ │ │ ├── Root.tsx
│ │ │ └── index.ts
│ │ ├── data
│ │ ├── index.ts
│ │ ├── model
│ │ ├── routes
│ │ │ └── Routing.tsx
│ │ ├── service
│ │ │ ├── actions.ts
│ │ │ └── index.ts
│ │ └── views
│ │ ├── RootView.tsx
│ │ ├── css
│ │ │ └── style.css
│ │ └── index.ts
│ ├── main.tsx
│ ├── middleware.ts
│ ├── resources
│ │ ├── assets
│ │ ├── configs
│ │ │ ├── application.dev.ts
│ │ │ ├── application.prod.ts
│ │ │ ├── application.template.ts
│ │ │ ├── application.test.ts
│ │ │ └── application.ts
│ │ └── css
│ │ └── index.css
│ ├── store.ts
│ └── vite-env.d.ts
├── tsconfig.json
├── tsconfig.node.json
└── vite.config.ts
16 directories, 28 files
<project-name>
├── README.md
├── index.html
├── package.json
├── public
│ └── vite.svg
├── src
│ ├── api.ts
│ ├── app
│ │ ├── api
│ │ │ └── index.ts
│ │ ├── controller
│ │ │ ├── Root.tsx
│ │ │ └── index.ts
│ │ ├── data
│ │ ├── index.ts
│ │ ├── model
│ │ ├── routes
│ │ │ └── Routing.tsx
│ │ ├── service
│ │ │ ├── actions.ts
│ │ │ └── index.ts
│ │ └── views
│ │ ├── RootView.tsx
│ │ ├── css
│ │ │ └── style.css
│ │ └── index.ts
│ ├── main.tsx
│ ├── middleware.ts
│ ├── resources
│ │ ├── assets
│ │ ├── configs
│ │ │ ├── application.dev.ts
│ │ │ ├── application.prod.ts
│ │ │ ├── application.template.ts
│ │ │ ├── application.test.ts
│ │ │ └── application.ts
│ │ └── css
│ │ └── index.css
│ ├── store.ts
│ └── vite-env.d.ts
├── tsconfig.json
├── tsconfig.node.json
└── vite.config.ts
16 directories, 28 files
Project Root
The project root contains the following files:
README.md
: The project's README file.index.html
: The project's HTML entry point.package.json
: The project's package.json file.public
: The project's public folder.src
: The project's source folder.tsconfig.json
: The project's TypeScript configuration file.tsconfig.node.json
: The project's TypeScript configuration file for Node.js.vite.config.ts
: The project's Vite configuration file.
Public Folder
The public folder contains the following files:
vite.svg
: The project's Vite logo.
Source Folder
The source folder contains the following files:
api.ts
: This file contains theApi
or Server or Firebase which is injected into thestore
to the middleware.store.ts
: This file contains theredux store
.middleware.ts
: This file contains themiddleware
which is injected into thestore
.main.tsx
: This file contains themain
function which is the entry point of the application.resources
: This folder contains theresources
of the application.app
: This folder contains theapp
of the application.
Resources Folder
The resources folder contains the following files:
assets
: This folder contains theassets
of the application.configs
: This folder contains theconfigs
of the application.css
: This folder contains thecss
of the application.
App Folder
The app folder contains the following files:
api
: This folder contains theapi
for the app or the module.controller
: This folder contains thecontroller
for the app or the module. A Controller is a React Component that is responsible for getting data from the store and passing it to the View.views
: This folder contains theviews
for the app or the module. A View is a React Component that is responsible for rendering the UI.model
: This folder contains themodel
for the app or the module. A Model is a TypeScript interface that is responsible for validating the Data Structure.service
: This folder contains theservice
for the app or the module. A Service is The Middleware that is responsible for getting data from the API and exposing aData (Action)
to the Controller.routes
: This folder contains theroutes
for the app or the module. A Route is a React Component that is responsible for rendering the UI based on route. The Route is rendered any where in the View.data
: This folder contains thedata
for the app or the module. A Data is a Redux Slice that is responsible for storing the data in the store.