A progressive Node.js framework for building efficient and scalable server-side applications.
This is the repository of Nest.js Server Demo App. It contains most of the Exchange features.
Nest.js Demo Server App is developed with Nest.js in TypeScript.
/scripts/gen-module.sh # Create module template /src |__assets # Folder to store the project's image, SVG icon |__components # Folder containing all the shared components of the project |__hooks # The folder containing the project's custom hooks |__contexts # The folder containing the project's custom contexts |__i18n # Folder containing the project's multilingual configuration section |__libs # Folder containing custom libs |__modules # Folder contains subfolders which collectively group features and contents that serve a common business-related purpose |__redux |__persists # Folder of persist custom for each reducer |__reducers # Folder of redux reducers |__sagas # Folder of redux config saga |__stores # Config store |__services |event-bus.ts # File containing events sent in App |api-request.ts # File contains request api . methods |firebase.ts # File contains firebase-related configs for push notifications |socket.ts # File to handle the real time part related to socket IO |__storage # Folder contains functions to save and retrieve values from local storage |__themes # Folder config colors, fonts, sizes |__typings # Folder contains root interface |__utils # Folder contains common processing functions in App
The ./src/assets
folder contains all assets:
Folder | Description |
---|---|
/fonts |
This folder store all fonts |
/images |
This folder store all images |
/svgs |
This folder store all icons using |
The ./src/components
folder contains all common components:
Folder | Description |
---|---|
/base |
This folder contains original component of RN with custom props |
/loading |
This folder contains loading global |
/root |
This folder contains socket listener global |
/button |
This folder contains button common (ButtonHorizontal, etc) |
/image |
This folder contains image common (CircleImage, etc) |
The ./src/modules
folder contains subfolders which collectively group features and contents that serve a common business-related purpose. For instance, login is a module and user is another module. Each sub folder under module folder adapt to this universal folder structure:
Folder | Description |
---|---|
<module>/assets |
This folder is to store the image.ts file. Instructions of to add images can be found here. |
<module>/src |
This folder is to store all action, constant, saga, selector and logic related files of the module (utils), etc. |
<module>/tests |
This folder is to store all unit testing files of the module. |
<module>/translations |
This folder is to store all translation file for the module. |
<module>/typings |
This folder is to store the ambient types files of the module. |
<module>/views |
This folder is to store all screens and views file. |
Note: .x
or .x.x
indicates the latest stable minor version of that tool, e.g.: 1.x.x
> 1.62.3
Tool | Version | How to Check | How To Get |
---|---|---|---|
Nest.js | 9.x.x |
yarn |
|
Visual Studio Code | 1.x.x |
code --version |
brew install --cask visual-studio-code or https://code.visualstudio.com/Download |
Node | 18.x.x |
node -v |
brew install node@16 |
NVM | 0.39.1 |
nvm -v |
brew install nvm |
Yarn | 1.x.x |
yarn -v |
npm install --global yarn |
-
Grant permission file Sh (if not grant):
sudo chmod 755 ./scripts/gen-module.sh
-
Module name:
Home => home || Profile Setting => profileSetting
-
Run:
sudo chmod 755 ./scripts/gen-module.sh
=>Name Module
-
Create new branch
git checkout -b [feature|bugfix]/action_change
e.g.: This should be written entirely in lowercase with 2 mandatory prefixs
feature
orbugfix
git checkout -b feature/add_login_ui
-
Add file
git add .
orgit add specific_file.ts|tsx
e.g.:
git add .
-
Commit change
git commit -m "description of change..."
e.g.: This should be written entirely in lowercase
git commit "add login screen ui"
-
Push
git push
-
Create merge request
- Title of merge request: This should be the description of commit change and capitalize the first letter.
Add login screen UI
Additional workflow prerequisites:
- Node.js >= 16 (from brew or from Web)
- Nest.js
- yarn
- Check if you have all the dependencies and files in Prerequisites
- Clone the repository
- Check out to
main
branch - Launch terminal and
cd
to the project - Exec
yarn install
oryarn
to install NPM dependencies - start with
yarn dev
to join the Nest.js World! 🎉
Comming soon
Remember, you are writing test to guard your code against logic error and future regressions, not to chase test coverage!. However, make sure you cover all the edge cases!
Nest framework TypeScript starter repository.
yarn install
# development
yarn run start
# watch mode
yarn run start:dev
# production mode
yarn run start:prod
# unit tests
yarn run test
# e2e tests
yarn run test:e2e
# test coverage
yarn run test:cov
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed. 👦
Comming soon