Coder Social home page Coder Social logo

s0j0hn / typescript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weareopensource/typescript

0.0 0.0 0.0 18.23 MB

:computer: TypeScript - Boilerplate Back : Express, Jwt, Mongo, Sequelize (Draft)

License: Other

JavaScript 3.04% Dockerfile 0.21% HTML 0.69% Shell 0.77% TypeScript 95.29%

typescript's Introduction

Build Status Drone Coveralls Status Code Climate Dependabot badge Known Vulnerabilities Docker Pulls

๐ŸŒ WeAreOpenSource Node + Typescript - Beta

๐Ÿ“– Presentation

This project is a Node stack that can be ran as a standalone BackEnd. Or in a fullstack with another repo of your choice (ex: Vue, Swift).

Quick links :

๐Ÿ’ป Node / Express / Mongoose - Sequelize Orm

๐Ÿ“ฆ Technology Overview

Subject Informations
Available
Architecture Layered Architecture : everything is separated in layers, and the upper layers are abstractions of the lower ones, that's why every layer should only reference the immediate lower layer (vertical modules architecture with Repository and Services Pattern)
Server Node >= v14 LTS
Express - body-parser - compression - CORS - method-override
gulp 4 - nodemon
DataBase Mongo 4.x LTS - mongoose - User, Crud, Seed, Gridf upload, Options (auth, ssl ..)
Sequelize - PostgreSQL, MySQL, SQLit 4.x (option - crud Task example)
JOI - Models & Repository for database code abstraction
Testing Jest - SuperTest - Coverage & Watch
example of mocha with gulp available
Security passport-jwt - JWT Stateless
bcrypt - zxcvbn - Passwords
SSL - Express / Reverse Proxy (must be activated, otherwise => plain text password)
API jsend - Default answer wrapper (helper) : status, message, data or error
Helper: default errors handling : formatted by the controller, Custom ES6 errors for other layers
Upload Mongo gridfs - mongoose-gridfs - Multer - Sharp - Image stream example, all contentType, image video ..
Logs winston - morgan custom example available
CI Travis CI - Drone.io
Linter ESLint - ecmaVersion 10 (2019)
Developer Coveralls - Code Climate - Dependency status - Dependabot - Snyk
standard-version / semantic-release - commitlint - commitizen - @weareopensource/conventional-changelog
Dependencies npm
Deliver Docker & Docker-compose
In reflexion
Documentation Swagger
Docco
Developer uses v8's builtin debug and inspect options
API evolution & version guideline

๐ŸŽ‰ Features Overview

Core

  • User : classic register / auth or oAuth(microsoft, google) - profile management (update, avatar upload ...)
  • User data privacy : delete all - get all - send all by mail
  • Admin : list users - get user - edit user - delete user

Examples

  • Tasks : list - get - add - edit - delete
  • Files Uploads : get stream - add - delete - get image stream & sharp operations

๐Ÿ“Œ Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

๐Ÿ’ฅ Installation

It's straightforward (you can use yarn if you want)

git clone https://github.com/weareopensource/node.git && cd Node
npm i

๐Ÿƒ Running Your Application

Development

  • npm start or npm run serve to run a dev server. Available at http://localhost:3000/.

Production

  • npm run prod to run a prod server. Available at http://localhost:3000/

others

  • debug : npm run debug
  • test : npm test
  • test Watch : npm run test:watch
  • test Coverage : npm run test:coverage
  • seed development= npm run seed:dev
  • seed Production = npm run seed:prod
  • seed Dump Mongo (Dev Team sample) = npm run seed:mongodump be careful to not upload sample in public repo
  • seed Restore Mongo (Dev Team sample) = npm run seed:mongorestore create or update data based on _id, no purge
  • seed Drop Mongo = npm run seed:mongodrop
  • generate SSL certs : npm run generate:sslCerts
  • lint : npm run lint
  • commit : npm run commit
  • release : npm run release -- --first-release standard version, changelog, tag & choose version number : -- --release-as 1.1.1
  • release:auto : GITHUB_TOKEN=XXXXX npm run release:auto semantic release, changelog, tag, release require repositoryUrl conf in package.json

๐Ÿณ Docker Way

docker

  • docker run --env WAOS_NODE_db_uri=mongodb://host.docker.internal/WaosNodeDev WAOS_NODE_host=0.0.0.0 --rm -p 3000:3000 weareopensource/node

if you want to build yourself : docker build -t weareopensource/node .

docker-compose

  • docker-compose up

Configuration

The default configuration is : config/defaults/development.js The other configurations : config/defaults/*.js overwrite the default configuration, you can create your own.

We take into account all system environment variables defined under the form WAOS_VUE_<path_toVariable>. A script turns under the hood those system environment variables into an object, infering paths from the varialbles name, merged to the configuration defined on config/defaults to regenerate the config.

So configuration avalable on config/defaults/development file are overidable. You can for instance define the app name by defining those system environment variables :

WAOS_NODE_app_title='my app =)'

โœ๏ธ Contribute

๐Ÿ“œ History

This work is based on MEAN.js and more precisely on a fork of the developers named Riess.js. The work being stopped we wished to take it back, we want to create updated stack with same mindset "simple", "easy to use". The toolbox needed to start projects, but not only with Node and Angular ...

๐ŸŒ We Are Open Source, Who we are ?

Today, we dreams to create Backs/Fronts, aligns on feats, in multiple languages, in order to allow anyone to compose fullstack on demand (React, Angular, VusJS, Node, Nest, Swift, Go). Feel free to discuss, share other kind of bricks, and invite whoever you want with this mindset to come help us.

๐Ÿ“‹ Licence

Packagist

๐Ÿ‘ช Main Team

  • Pierre Brisorgueil

Github Twitter Youtube Instagram Linkedin

Feel free to help us ! :)

Blog Slack Discord Mail

typescript's People

Contributors

dependabot-preview[bot] avatar pierrebrisorgueil avatar s0j0hn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.