Skip to content

Config based Node.js and PostgreSQL Web App Boilerplate/Scaffolding with custom RBAC and stream-based CSV upload and download mechanics. Auto generated Modules through superAdmin panel with features like for API documentation - swagger , for Automation test stack - Mocha and more. Please refer Solution statement from README below.

Notifications You must be signed in to change notification settings

matt212/Nodejs_Postgresql_VanillaJS_Fastify

Repository files navigation

Badges

Node.js Postgres Vanilla Fastify CI

CodeQL

GitHub Clones

contributions welcome

Tech stacks

NodeJS Postgres JavaScript Redis Sequelize Socket.io JWT Mocha Swagger

πŸš„ Problem Statement

redlime

πŸš€ Solution Statement- Key Outcomes
🍨 Objective

redlime

🍰 Mandates

redlime

🍦 Features/Functionalities : Conventional Levels

redlime

🍧 Features/Functionalities : Advanced Levels

redlime

🎫 Scope Statement

redlime

πŸ“‘ Platform Setup
πŸ•sh file Setup

chmod +x ./app/utils/serverSetup/primarySetup.sh

sed -i -e 's/\r$//' ./app/utils/serverSetup/> primarySetup.sh

chmod +x ./app/utils/serverSetup/secondarySetup.sh

sed -i -e 's/\r$//' ./app/utils/serverSetup/secondarySetup.sh

bash ./app/utils/serverSetup/primarySetup.sh

Please note if you have node/postgres/redis server installed in your instance/machine. Please comment the install information in primarySetup.sh file and then run this file

🍀app Setup

node,postgres, redis and app dependencies installation

bash ./app/utils/serverSetup/primarySetup.sh

bash ./app/utils/serverSetup/secondarySetup.sh

πŸ” mocha chai tests against 20,00,000 recordsets

npm run LoginEval or yarn LoginEval

npm run ModuleEval or yarn ModuleEval

🍟 app Run

npm run app or yarn app

🍩 app Usage

goto localhost:3012/employees

username : krennic and password:orson

select birthdate from dropdown and select date range any from 1982 to till date

🍜 app SuperAdmin Usage

goto localhost:3012/black-squadron

username : krennic and password:orson

for any other controls other than textbox it is mandatory

to enter PIPE "|" separator in textbox column for e.g genderid|gendername

🍘 API Documentation Usage(Swagger)

goto localhost:3012/getAccessToken

Click on Get AccessToken button and copy the newly generated Access Token

goto localhost:3013/api-docs/

Click on authorize and paste the access Token

πŸ’ˆ Walkthroughs : Features/Functionalities

πŸ‡ Dynamic pivot operation from Postgres with highchart implementation (Redis Cached)
pivot_final.mp4

🍊 Node.js stream based CSV download for more than 2 million recordsets from PostgresSQL with socket.io as progress feature
stream_based_2_million.mp4

πŸ‘ Automated Swagger for each Module created By build in scaffoding accessed at
http://localhost:3013/api-docs/

yarn enable-swagger

swagger.mp4

🍐 Basic dashboard operation
basic_dashboard.mp4

πŸ“ Boilerplate walkthrough with multi control(Radio and Checkbox-Data from respective db tables) with Automated mocha test Cases

redlime


🍏 Boilerplate walkthrough with multi control(Radio-Data from respective db table) with Automated mocha test Cases

redlime


πŸ€– Deliverables Timeline
πŸ₯‘ 2022

redlime

🌽 2021

redlime

πŸ„ 2020

redlime redlime

🍫 Releases
  • Release notes 23 July 2022

    Optimized Dynamic Multi Column , Multi Select filter from 5 secs to 16 ms for 2 million rows . My stack overflow solution

  • Release notes 21 July 2022

    base and pivot Operation optimized

    incremental load (pagination section loaded after report rendered) for base report

    incremental load (pagination section loaded after report rendered) for pivot report

  • Release notes 19 July 2022

    github actions Integrated CI-workflows with redis, postgres for automation mocha test cases

    Github Action - Automation mocha test cases

  • Release notes 18 July 2022

    Implemented basic dark theme

  • Release notes 17 July 2022

    Implemented Redis based Server-Side Caching for Pivot Operations

  • Release notes 1 July 2022

Superadmin scaffolding/ boilerplate Access URL http://localhost:3012/black-squadron

username : krennic and password:orson

for any other controls other than textbox it is mandatory

to enter PIPE "|" separator in textbox column for e.g genderid|gendername

  • Release notes 11 Feb 2021

    boilerplate for multiselect integration with radio and checkboxes completed

  • Release notes 09 Feb 2021

    Applied in boilerplate multi and single select Dynamic SQLConstruct with 360 degree coverage

  • Release notes 06 Feb 2021

    for boilerplate multi and single select static mapping for edit and default rendering case scenarios completed

  • Release notes 29 Jan 2021

    validations applied for bolierplate dynamic radio button and checkboxes with

  • Release notes 27 Jan 2021

    applied multi control for radio scaffolding

  • Release notes 20 Jan 2021

    For rbac test cases modularized

    yarn mroleEval

    yarn userroleEval

  • Release notes 9 Jan 2021

    For rbac user-Role Mapping module migrated to fastify with its 35 mocha chai test cases respectively

    yarn mroleEval

    yarn userroleEval

  • Release notes 22 Dec 2020

    Dynamic Bolierplate generation completed for dataType Strings , Integers and BigInt data types config based

    For rbac modname,muser modules migrated to fastify with their respective 43 and 63 mocha chai test cases

    For rbac role module migrated to fastify with its 43 mocha chai test cases yarn ModEval yarn roleEval

  • Release notes 21 Dec 2020

    73 Modular Mocha test cases against 20,00,000 recordset with 360 coverage including schema,NaN,Undefined,Multi Column Search,Multi Select,Pivot X and Y for pageSize and pageNo payload Validations

    yarn ModuleEval

  • Release notes 20 Dec 2020

    73 Modular Mocha test cases against 20,00,000 recordset with 360 coverage including schema,NaN,Undefined,Multi Column Search,Multi Select,Pivot X and Y for pageSize and pageNo payload Validations yarn ModuleEval

  • Release notes 11 Dec 2020

    basic login tests are written and can view and evaluated by running below command yarn LoginEval

  • Release notes 10 Dec 2020

    run yarn perfgraph in new shell run autocannon yarn customAutocannon when autocannon bench is completed go back to perfgraph shell and stop the shell (ctlrl+C) it will generate graph html link in same perfgraph shell

  • Release notes 7 Dec 2020

    made date filter optional with code refractoring by introducing disableDate=true arguement in API payload.

🚁 Project Statement

redlime

πŸ›°οΈ Architecture
🌯 Server Side
πŸ₯ Route Structure Module Operations

redlime

πŸ₯— Module View (EJS) Render

redlime

🍲 Module Load Operations

redlime

🍟 Multipurpose Features Operations

redlime

πŸ§† Groupby Operations

redlime

πŸ₯ž Create Operation

redlime

πŸ₯¨ Update Operations

redlime

πŸ₯– ETL Upload Operations

redlime

πŸ₯ ETL Download Operations

redlime

🍳 Api Cache Operations

redlime

πŸ₯™ Api Cache Operations-Drilldown

redlime

πŸ›Έ Client Side
✈️ View Structure and Page Operations

redlime

πŸ›©οΈ Page Load and Date Range Operations

redlime

πŸ›Ά Sort and Pagination Operations

redlime

πŸͺ‚ Filter Operations

redlime

β›΅ Create and Update Operations

redlime

⛴️ Field Validations

redlime

🚀 Field Validations-Event listeners

redlime

🀿 App Module-ActionFunctions

redlime

πŸ›· Pivot Operations

redlime

🏝️ ETL upload Operations

redlime

🍱 ETL download user Actions

redlime

🍣 ETL download Operations

redlime

🌯 Database Side
πŸ₯ RBAC-ERD

redlime

πŸ„ RBAC-Case Scenarios

redlime

🍍 Release Flow
πŸ₯₯ Nodejs Web App Env Release Mechanism Pt-1

redlime

πŸ’ Nodejs Web App Env Release Mechanism Pt-2

redlime

🍌 How to Release Node App

redlime

🌢️ Performance
πŸ§„ Normal Mode (API against 2 Million Rows )[requests:2000, concurrent:100]
normal_mode.mp4
πŸ₯‘ Cluster Mode (API against 2 Million Rows )[requests:2000, concurrent:100]
cluster_mode.mp4

🍱Reach out to me 🍝 🍀

Linkedin Profile

About

Config based Node.js and PostgreSQL Web App Boilerplate/Scaffolding with custom RBAC and stream-based CSV upload and download mechanics. Auto generated Modules through superAdmin panel with features like for API documentation - swagger , for Automation test stack - Mocha and more. Please refer Solution statement from README below.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published