# @georgiancollege/express-mvc

> Express MVC @ Georgian College

Latest version **1.1.3** (published 2024-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @georgiancollege/express-mvc
pnpm add @georgiancollege/express-mvc
yarn add @georgiancollege/express-mvc
bun add @georgiancollege/express-mvc
```

Provides the command `express-mvc`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2024-01-26 |
| First published | 2023-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 23 |
| Unpacked size | 355.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tom Tsiliopoulos |
| Maintainers | ifotn, tsiliopoulos |
| Keywords | georgian college, node, express, mvc, typescript, bootstrap, font awesome |

## Links

- npm: https://www.npmjs.com/package/@georgiancollege/express-mvc
- Repository: https://github.com/GeorgianCollege/express-mvc
- Homepage: https://github.com/GeorgianCollege/express-mvc#readme
- Issues: https://github.com/GeorgianCollege/express-mvc/issues
- npm.io page: https://npm.io/package/@georgiancollege/express-mvc

## Dependencies (23)

- [ejs](https://npm.io/package/ejs.md) ^3.1.9
- [hbs](https://npm.io/package/hbs.md) ^4.2.0
- [cors](https://npm.io/package/cors.md) ^2.8.5
- [debug](https://npm.io/package/debug.md) ^4.3.4
- [dotenv](https://npm.io/package/dotenv.md) ^16.3.1
- [jquery](https://npm.io/package/jquery.md) ^3.7.1
- [morgan](https://npm.io/package/morgan.md) ^1.10.0
- [express](https://npm.io/package/express.md) ^4.18.2
- [ts-node](https://npm.io/package/ts-node.md) ^10.9.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.1.1
- [mongoose](https://npm.io/package/mongoose.md) ^8.0.1
- [passport](https://npm.io/package/passport.md) ^0.6.0
- [bootstrap](https://npm.io/package/bootstrap.md) ^5.3.2
- [commander](https://npm.io/package/commander.md) ^11.1.0
- [http-errors](https://npm.io/package/http-errors.md) ^2.0.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^9.0.2
- [passport-jwt](https://npm.io/package/passport-jwt.md) ^4.0.1
- [cookie-parser](https://npm.io/package/cookie-parser.md) ^1.4.6
- [@popperjs/core](https://npm.io/package/@popperjs/core.md) ^2.11.8
- [passport-local](https://npm.io/package/passport-local.md) ^1.0.0
- [express-session](https://npm.io/package/express-session.md) ^1.17.3
- [passport-local-mongoose](https://npm.io/package/passport-local-mongoose.md) ^8.0.0
- [@fortawesome/fontawesome-free](https://npm.io/package/@fortawesome/fontawesome-free.md) ^6.4.2

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2024-01-26
- 1.1.2 — 2024-01-26
- 1.1.1 — 2023-11-25
- 1.1.0 — 2023-11-25
- 1.0.9 — 2023-11-25
- 1.0.8 — 2023-11-25
- 1.0.7 — 2023-06-19
- 1.0.6 — 2023-06-16
- 1.0.5 — 2023-06-14
- 1.0.4 — 2023-06-14
- 1.0.3 — 2023-06-14
- 1.0.2 — 2023-06-14
- 1.0.1 — 2023-06-14

## README

# @georgiancollege/express-mvc
This package uses a **MVC (Model-View-Controller)** design pattern for the site structure.

It was designed for students at **Georgian College** (https://www.georgiancollege.ca/) but is publicly available.

<br>

## Technologies used:
- NodeJS (https://nodejs.org/en)
- Express (https://expressjs.com/)
- TypeScript (https://www.typescriptlang.org/)
- Bootstrap (https://getbootstrap.com/)
- Font Awesome (https://fontawesome.com/)
- Mongoose (https://mongoosejs.com/)
- Passport (https://www.passportjs.org/)
- JWT (https://jwt.io/)

<br>

## Installation:
---
```
npm i @georgiancollege/express-mvc -g
```

<br>

## Usage:
---
```
> express-mvc <options> [folder]
```

- where **options** is installation options and **folder** is the installation folder. 

- if installation folder is **not** specified, then the express mvc site structure is scaffolded in the current folder.
### Current Installation Options:
---
- ```--api - scaffold an Express api that does not include views```
- ```--auth - adds authentication```
- ```--tsc - provide TypeScript support```
- ```--hbs - uses handlebars view engine```

- the default is a **JavaScript** MVC with no Authentication

<br>
<br>

## Post Installation:
- you will need to issue the following command to install the module dependencies:

```
> npm install 
```

- if you are using the TypeScript version you will need to transpile the ```.ts``` files to ```.js``` as Node and Express require JavaScript:

```
> npm run build
```

<br>

## MVC Site Structure (JavaScript version):
---
```
express-mvc-js
├── Client
│   ├── Assets
│   │   └── images
│   │       └── .gitkeep
│   ├── Content
│   │   └── app.css
│   └── Scripts
│       └── app.js
├── Server
│   ├── Config
│   │   └── app.js
│   ├── Controllers
│   │   └── index.js
│   ├── Models
│   │   └── user.js
│   ├── Routes
│   │   └── index.js
│   └── Views
│       ├── error.ejs
│       └── index.ejs
├── .env
├── .gitignore
├── package.json
└── server.js
```
---
### Notes:
- The **JavaScript** version uses the CommonJS module pattern (i.e., **```require```** statements)

<br>

## MVC Site Structure (JavaScript version with handlebars):
---
```
express-mvc-js-hbs
├── Client
│   ├── Assets
│   │   └── images
│   │       └── .gitkeep
│   ├── Content
│   │   └── app.css
│   └── Scripts
│       └── app.js
├── Server
│   ├── Config
│   │   └── app.js
│   ├── Controllers
│   │   └── index.js
│   ├── Models
│   │   └── user.js
│   ├── Routes
│   │   └── index.js
│   └── Views
│       ├── error.hbs
│       ├── index.hbs
│       └── layout.hbs
├── .env
├── .gitignore
├── package.json
└── server.js
```
---
### Notes:
- The **JavaScript with handlebars** version uses the CommonJS module pattern (i.e., **```require```** statements)

<br>

## MVC Site Structure (TypeScript version):
---
```
express-mvc-tsc
├── Client
│   ├── Assets
│   │   └── images
│   │       └── .gitkeep
│   ├── Content
│   │   └── app.css
│   └── Scripts
│       └── app.ts
├── Server
│   ├── Config
│   │   └── app.ts
│   ├── Controllers
│   │   └── index.ts
│   ├── Models
│   │   └── user.ts
│   ├── Routes
│   │   └── index.ts
│   └── Views
│       ├── error.ejs
│       └── index.ejs
├── .env
├── .gitignore
├── package.json
├── server.ts
└── tsconfig.json
```
---
### Notes:
- The **TypeScript** version uses the **esm module pattern** (i.e., **```import```** and **```export```** statements)

<br>

## MVC Site Structure (TypeScript version with handlebars):
---
```
express-mvc-tsc-hbs
├── Client
│   ├── Assets
│   │   └── images
│   │       └── .gitkeep
│   ├── Content
│   │   └── app.css
│   └── Scripts
│       └── app.ts
├── Server
│   ├── Config
│   │   └── app.ts
│   ├── Controllers
│   │   └── index.ts
│   ├── Models
│   │   └── user.ts
│   ├── Routes
│   │   └── index.ts
│   └── Views
│       ├── error.hbs
│       ├── index.hbs
│       └── layout.hbs
├── .env
├── .gitignore
├── package.json
├── server.ts
└── tsconfig.json
```
---
### Notes:
- The **TypeScript with handlebars** version uses the **esm module pattern** (i.e., **```import```** and **```export```** statements)

<br>

## API Site Structure (JavaScript version):
---
```
express-mvc-api-js
├── Server
│   ├── Config
│   │   ├── app.js
│   │   └── db.ts
│   ├── Controllers
│   │   └── movie.js
│   ├── Models
│   │   └── movie.js
│   └── Routes
│       └── index.js
├── .env
├── .gitignore
├── movies.json
├── package.json
└── server.js
```

<br>

## API Site Structure (TypeScript version):
---
```
express-mvc-api-tsc
├── Server
│   ├── Config
│   │   ├── app.ts
│   │   └── db.ts
│   ├── Controllers
│   │   └── movie.ts
│   ├── Models
│   │   └── user.ts
│   └── Routes
│       └── index.ts
├── .env
├── .gitignore
├── movies.json
├── package.json
├── server.ts
└── tsconfig.json
```
---
### Notes:
- We've include an example **Movie Model** that assumes you will be using **```mongoose```** to connect to **MongoDB**

<br>

## API Site Structure (JavaScript version) includes JWT Authentication:
---
```
express-mvc-api-auth-js
├── Server
│   ├── Config
│   │   ├── app.js
│   │   └── db.ts
│   ├── Controllers
│   │   ├── auth.js
│   │   └── movie.js
│   ├── Models
│   │   ├── movie.js
│   │   └── user.js
│   ├── Routes
│   │   ├── auth.js
│   │   └── index.js
│   └── Util
│       └── index.js
├── .env
├── .gitignore
├── movies.json
├── package.json
└── server.js
```

<br>

## API Site Structure (TypeScript version) includes JWT Authentication:
---
```
express-mvc-api-auth-tsc
├── Server
│   ├── Config
│   │   ├── app.ts
│   │   └── db.ts
│   ├── Controllers
│   │   ├── auth.ts
│   │   └── movie.ts
│   ├── Models
│   │   ├── movie.ts
│   │   └── user.ts
│   ├── Routes
│   │   ├── auth.ts
│   │   └── index.ts
│   └── Util
│       └── index.ts
├── .env
├── .gitignore
├── movies.json
├── package.json
├── server.ts
└── tsconfig.json
```
---
### Notes:

- Uses JWT Authentication

---
_Source: https://npm.io/package/@georgiancollege/express-mvc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
