Hey There! πŸ™Œ 🀾 that ⭐️ button if you like this boilerplate.

Overview
Hey There! πŸ™Œ 
🀾 that ⭐️ button if you like this boilerplate. 

express-typescript

A boilerplate for Node.js App.

Contents

Global Requisites

  • node (>= 10.5.0)
  • tsc (>= 3.0.1)
  • typescript (>= 3.0.1)
  • mongoose (>= 3.6.2)
  • redis

App Structure

Note: I am mentioning only files/folders which you need to configure if required

β”œβ”€β”€ dist
β”œβ”€β”€ public
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ controllers
β”‚   β”‚   β”œβ”€β”€ Api
β”‚   β”‚   β”‚   β”œβ”€β”€ Auth
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Login.ts
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RefreshToken.ts
β”‚   β”‚   β”‚   β”‚   └── Register.ts
β”‚   β”‚   β”‚   └── Home.ts
β”‚   β”‚   β”œβ”€β”€ Auth
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ Logout.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ Register.ts
β”‚   β”‚   β”‚   └── Social.ts
β”‚   β”‚   β”œβ”€β”€ Account.ts
β”‚   β”‚   └── Home.ts
β”‚   β”œβ”€β”€ exception
β”‚   β”‚   β”œβ”€β”€ Handler.ts
β”‚   β”‚   └── NativeEvent.ts
β”‚   β”œβ”€β”€ interfaces
β”‚   β”‚   β”œβ”€β”€ models
β”‚   β”‚   β”‚   └── user.ts
β”‚   β”‚   └── vendors
β”‚   β”‚        β”œβ”€β”€ index.ts
β”‚   β”‚        β”œβ”€β”€ INext.ts
β”‚   β”‚        β”œβ”€β”€ IRequest.ts
β”‚   β”‚        └── IResponse.ts
β”‚   β”œβ”€β”€ middlewares
β”‚   β”‚   β”œβ”€β”€ CORS.ts
β”‚   β”‚   β”œβ”€β”€ CsrfToken.ts
β”‚   β”‚   β”œβ”€β”€ Http.ts
β”‚   β”‚   β”œβ”€β”€ Kernel.ts
β”‚   β”‚   β”œβ”€β”€ Log.ts
β”‚   β”‚   β”œβ”€β”€ Statics.ts
β”‚   β”‚   β”œβ”€β”€ StatusMonitor.ts
β”‚   β”‚   └── View.ts
β”‚   β”œβ”€β”€ models
β”‚   β”‚   └── User.ts
β”‚   β”œβ”€β”€ providers
β”‚   β”‚   β”œβ”€β”€ App.ts
β”‚   β”‚   β”œβ”€β”€ Cache.ts
β”‚   β”‚   β”œβ”€β”€ Database.ts
β”‚   β”‚   β”œβ”€β”€ Express.ts
β”‚   β”‚   β”œβ”€β”€ Locals.ts
β”‚   β”‚   β”œβ”€β”€ Passport.ts
β”‚   β”‚   β”œβ”€β”€ Queue.ts
β”‚   β”‚   └── Routes.ts
β”‚   β”œβ”€β”€ routes
β”‚   β”‚   β”œβ”€β”€ Api.ts
β”‚   β”‚   └── Web.ts
β”‚   β”œβ”€β”€ services
β”‚   β”‚   └── strategies
β”‚   β”‚        β”œβ”€β”€ Google.ts
β”‚   β”‚        β”œβ”€β”€ Local.ts
β”‚   β”‚        └── Twitter.ts
β”‚   └── index.ts
β”œβ”€β”€ views
β”‚   β”œβ”€β”€ includes
β”‚   β”œβ”€β”€ modals
β”‚   β”œβ”€β”€ pages
β”‚   β”œβ”€β”€ partials
β”‚   β”œβ”€β”€ static
β”‚   β”‚   β”œβ”€β”€ css/*.css
β”‚   β”‚   └── js/*.js
β”‚   └── layout.pug
β”œβ”€β”€ .env
β”œβ”€β”€ .gitignore
β”œβ”€β”€ nodemon.json
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ tsconfig.json
└── tslint.json

Install, Configure & Run

Below mentioned are the steps to install, configure & run in your platform/distributions.

# Clone the repo.
git clone https://github.com/rampage0131/express-typescript.git;

# Goto the cloned project folder.
cd nodets;
# Without Docker

# Note: It is assumed here that you have MongoDB running in the background and that you have created the database.

# Install NPM dependencies.
# Note: You can review the list of dependencies from the below link.
# https://github.com/faizahmedfarooqui/nodets/network/dependencies
npm install;

# Edit your DotEnv file using any editor of your choice.
# Please Note: You should add all the configurations details
# or else default values will be used!
vim .env;

# Run the app
npm run dev;
# With Docker

# Note: It is assumed here that you have Docker running in the background.

# Run the app in docker as a foreground process
docker-compose up

# Run the app in docker as a background process
docker-compose up -d

List of Routes

# Web Routes:

+--------+-------------------------+
  Method | URI
+--------+-------------------------+
  GET    | /
  GET    | /signup
  POST   | /signup
  GET    | /login
  POST   | /login
  GET    | /logout
  GET    | /account
  GET    | /auth/google
  GET    | /auth/google/callback
  GET    | /auth/twitter
  GET    | /auth/twitter/callback
  GET    | /status-monitor
+--------+-------------------------+

# API Routes:

+--------+-------------------------+
  Method | URI
+--------+-------------------------+
  POST   | /api
  POST   | /api/auth/login
  POST   | /api/auth/register
  POST   | /api/auth/refresh-token
+--------+-------------------------+

Screens

Home / Landing Page

Home / Landing Page

Note: This page has sub-sections, like about-us, contact-us & portfolio

LogIn Page

LogIn Page

Note: LogIn with Providers

SignUp Page

SignUp Page

Note: SignUp with Providers

Dashboard Page

Dashboard Page

With Dropdown Menu

Dashboard Page with Dropdown Menu

Page Not Found Page

Page Not Found Page

Note: In case the requested URI does not exist, app shows this page

Under Maintenance Page

Under Maintenance Page

Note: In case an error is generated, so instead of plain errors we can show the under maintenance page.

You might also like...

A boilerplate for ExpressJs projects configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses Mongodb.

A boilerplate for ExpressJs projects configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses Mongodb.

ExpressJs-Boilerplate An ExpressJs boilerplate configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses

Mar 8, 2023

Get the latest feed of GitHub Stars out there! 🌟 ⭐ ✨

Get the latest feed of GitHub Stars out there! 🌟  ⭐  ✨

GitHub Stars Feed Get the latest feed of GitHub Stars out there! ⭐ The GitHub Stars program thanks GitHub’s most influential developers and gives them

Oct 5, 2022

The best UI framework out there πŸ¦† In development πŸš€

The best UI framework out there πŸ¦† In development πŸš€

Noia UI Getting Started | Community | Creators | 🚧 Noia UI πŸš€ in development... 🚧 Getting Started # First clone this repository $ git clone https://

Mar 10, 2022

don't use ml if graph is there

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Dec 19, 2021

Solidity Quickstart is an extensive solidity guide for the solidity newbies out there.

πŸš€ Solidity Quickstart Solidity Quickstart is an extensive solidity guide for the solidity newbies out there. πŸ€” How does it work? All the guides rela

Aug 6, 2022

For some realizations of the title and thinking of the book Introduction to Algorithms, if there is something wrong, please correct me.

Introduction-to-Algorithms Introduce Origin of this library Some implementations of the topics in Introduction to Algorithms and some reflections on t

Jun 9, 2022

The website can be used to creat a new game and start adding players and there scores! πŸ™Œ

The website can be used to creat a new game and start adding players and there scores! πŸ™Œ

LeaderBoard Welcome! πŸ‘‹ This Website Allows you to creat your game and add your players score. ScreenShot 1 ScreenShot 2 ScreenShot 3 ScreenShot 4 :--

Aug 30, 2022

There can be more than Notion and Miro. Affine is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

There can be more than Notion and Miro. Affine is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

AFFiNE.PRO The Next-Gen Knowledge Base to Replace Notion & Miro. Planning, Sorting and Creating all Together. Open-source, Privacy-First, and Free to

Jan 9, 2023
Owner
J.D.
*** *** ** I - Love - Programing ** *** *** ===React, Next.js And Unity Engine===
J.D.
Create Bootstrap 5 Modal Box using JavaScript with custom title, description, button labels and custom YES button callback

Dynamic BS5 Modal Box Create Bootstrap 5 Modal Box using JavaScript with custom title, description, button labels and custom YES button callback Insta

null 5 Oct 23, 2022
Finally, a "back to top" button that behaves like a real elevator.

elevator.js Finally, a "back to top" button that behaves like a real elevator, by adding elevator music to quietly soothe the awkwardness that can ens

Tim Holman 6.6k Dec 27, 2022
Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. In this workshop, we'll look at some more advanced use cases when building Remix applications.

?? Advanced Remix Workshop Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. In this

Frontend Masters 167 Dec 9, 2022
Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. Get a jumpstart on Remix with this workshop.

?? Remix Fundamentals Build Better websites with Remix Remix enables you to build fantastic user experiences for the web and feel happy with the code

Frontend Masters 204 Dec 25, 2022
A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebWorker like neither of those.

Amuchina A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebW

Fabio Spampinato 9 Sep 17, 2022
A simple react project that contain a single page application (SPA) And a simple caculator to make some calculation and there is a section you can see some Math quotes. β“‚πŸ’―

A simple react project that contain a single page application (SPA) And a simple caculator to make some calculation and there is a section you can see some Math quotes. β“‚??

Reem janina 7 May 31, 2022
It's a scam app, you can hide evil code in it, it will evade 100% of anti-viruses. There is an electron interface for a better social-ing

Zcrypt Fake Miner Our Website https://dark-utilities.me ! How to build PS C:\Users\Admin> git clone https://github.com/Inplex-sys/zcrypt-fake-miner.gi

Inplex-sys 5 Oct 13, 2022
TRAB is a Chrome extension that gives you a single button to mark tweet as spam, and block the tweet's creator

TRAB - Tweet Reporter and Blocker TRAB is a Chrome extension that gives you a single button to do two things with a single click: Mark a Tweet as spam

Amit Ruparel 16 May 4, 2022
A Virtual Interactive Keyboard which replicates every key you press and a Text-Area in which everything is written and can be copied to the clipboard with a click of a button.

A Virtual Interactive Keyboard which replicates every key you press and a Text-Area in which everything is written and can be copied to the clipboard with a click of a button.

Devang Joshi 1 Mar 1, 2021