bluelobster-userbase_package
v0.2.56
Published
User Management
Readme
Welcome to User Base Package!
Project Structure
- src/entities - contains definition of an entity always follow the lowercase files names in the entity generation (typeorm entity generator)
- src/repository - contains controllers which handles database calls of an entity
- src/services - contains high level controllers which handles API calls
- src/utils - contains common utility functions used throughout the project
Error Handling
- every error has error code associated with it
- while sending error message to the client we have to send the error in user's language
- getErrors method returns array of errors with translation in the given language
- if the error is not in the user's language getErrors method returns array of errors in english
API
get countries - to get list of all countries getTimezoneAreas to get list of timezone string along with country code getTimezone - return current time in UTC and requested timezone along with offset
Depends
Authenticate against the registry with:
npm adduser --registry http://npm.ascent24.io:4873
Publish the package with:
npm publish --access=private --registry http://npm.ascent24.io:4873
Now when you want to install the package:
mkdir my-project cd my-project
mkdir node_modules
npm install --registry http://npm.ascent24.io:4873 @ascent24/userbase_package
Procedure to import the user management
- create a database with the using create_table.sql
- in the project have must typeorm connection
- the typeorm and pg packages are not included in this package so must install by your self
- import the server.ts file from the user management with the variables ManagementRoutes and ManagementEntities
- add ManagementRoutes in to the express route initialization
- If you need override any api method -> call override api function before adding routes
- add ManagementEntities in to the typeorm connections
- add exclude path in your jwt exclude path
- add a initial cache into the starting of the server
- env file must have the below mentioned variables
- GET_IP_DETAILS
- JWT_KEY
- JWT_EXPIRY_SECONDS
- redis is used for logout checking
- REDIS_PORT
- REDIS_HOST
- CAPTCHASECRET
- in server file add a jwt validation
- user error handle to from this package
- need Firebase Authentication add a firebase Encrepted data into org settings
- aslo enable IS_FIREBASE_ENABLED=true
- and add RSA_FIREBASE_KEY for
- want to add a rsa public key into env RSA_FIREBASE_KEY
Project name : userbase_package
- git url : https://gitsource.ascent24.io/project_template/userbase_package/-/tree/master
Staging
- Staging Server : based on project
- Staging DB name : based on project
- Staging Link: based on project
Production
- Production Server : based on project
- Production DB name : based on project
- Production Link: based on project
Have the updated code pushed to git ? pushed date ?
- yes, 09-12-2021
Download to your machine and Check if its running ?
- yes. it's running
API given ? either Postman or Thunderclient ?
- yes
API added to git ?
- yes
Any Specific Project related details :
it have two version 0 and 1
0 working on live 1 some email_template table field is different from version 0
Document :
- Audio :
- Photo :
