This project uses React.js with Vite for the frontend, Express.js for the backend, and TurboRepo for monorepo management, facilitating rapid development of a scalable web application with streamlined collaboration and efficient server-client interactions.
Runs the app in the development mode.
Open https://localhost:5173 to view it in the browser. For API, you can access it in https://localhost:8000/api. The app will reload if you make edits.
Builds the app for production to the dist
folder for each project.
Runs the app in the production mode.
Run command on specific app (install package, run test, etc).
Run command on specific app with options.
Example : npm run seqeulize --workspace=api -- --db:migrate
- Always use conventional commit message when committing changes or creating pull request
- "Squash and Merge" your pull request to main branch
- Always use REST API naming convention
-
Use CamelCase for filenames:
- Begin filenames with a lowercase letter.
- For multiple words, capitalize the first letter of each subsequent word.
- Example:
index.js
,userModel.js
,dataAccess.js
-
Use Descriptive Names:
- Choose names that accurately describe the file's purpose or content.
- Avoid overly generic names like
utils.js
unless the file genuinely contains utility functions.
-
Follow Naming Conventions for Specific File Types:
- For configuration files, use names like
.env
,config.js
, orsettings.json
. - Use consistent naming for test files, such as appending
.test.js
or.spec.js
to the filename being tested. - Use
package.json
for the project's metadata and dependencies.
- For configuration files, use names like
-
Separate Concerns with File Naming:
- Follow a modular structure for different concerns (e.g.,
userController.js
,userService.js
,userModel.js
for a user-related module).
- Follow a modular structure for different concerns (e.g.,
-
Use Singular or Plural Naming:
- Choose a consistent convention for naming folders (e.g.,
models
ormodel
,routes
orroute
).
- Choose a consistent convention for naming folders (e.g.,
-
Avoid Special Characters and Spaces:
- Use hyphens (
-
) or underscores (_
) for separating words in folder names, but avoid spaces or special characters.
- Use hyphens (
-
Use Descriptive Names for Folders:
- Name folders according to their content or purpose (e.g.,
controllers
,services
,utils
,tests
,public
,views
, etc.).
- Name folders according to their content or purpose (e.g.,
-
Nested Folder Structure:
- Create a logical and organized folder structure based on the project's architecture.
- For larger projects, consider organizing files by features/modules (Feature-Based Structure) or layer-based (Layered Structure).