GithubHelp home page GithubHelp logo

roxnnyabarriosc / node-experience Goto Github PK

View Code? Open in Web Editor NEW

This project forked from digichanges/node-experience

0.0 0.0 0.0 4.08 MB

Hello! NExp (Node Experience) is a boilerplate for Node, which makes use of a Hexagonal architecture, in addition to all the power of TypeScript that combined allow a perfect cohesion thus achieving a clean and at the same time very powerful implementation.

License: MIT License

Shell 0.15% JavaScript 0.53% TypeScript 98.85% Makefile 0.15% Handlebars 0.06% HCL 0.14% Dockerfile 0.12%

node-experience's Introduction

Welcome to Node Experience!

CircleCI License: MIT

logo NExp

Basic Description

Hello! NExp (Node Experience) is a boilerplate for Node, which makes use of a Hexagonal architecture, in addition to all the power of TypeScript that combined allow a perfect cohesion thus achieving a clean and at the same time very powerful implementation.

Base project

https://github.com/DigiChanges/node-experience

Docs

Boilerplate Documentation

Boilerplate Documentation

Quick Start

We can run the project directly with docker compose and then bash where the basic commands to feed the database are located.

  1. Install dependencies. pnpm install.
  2. Copy .env.dev file to .env. (.env.dev it's a environment example file)
  3. Then execute STAGE=dev docker-compose up --build to up all containers.
  4. Basically generates an admin user, add roles with permission and get a bucket for minIO. docker-compose exec node bash dev.init.sh

Installation

First, install nexp-cli using npm (we assume you have pre-installed node.js).

npm install -g nexp-cli

Then generate your new project:

nexp-cli setPayload

Each module is divided by business domain:

  • Auth
  • File
  • Item
  • Notification

There are also two particular cases:

  • Config
  • Shared

The directory structures for business domains are as follows:

Folder structure of a module

├── Domain
│   ├── Entities
│   ├── Exceptions
│   └── Services
│   └── UseCases
├── Infrastructure
│   ├── Repositories
│   ├── Schema
│   └── Seeds
├── Presentation
│   ├── Commands
│   ├── Controllers
│   ├── Criterias
│   ├── Exceptions
│   ├── Handlers
│   ├── Middlewares
│   ├── Requests
│   └── Transformers
├── Tests
│   ├── Fixtures

Tip I know it may sound repetitive, but it is not a framework. NExp is a set of tools or libraries working together through a common structure. All structural code within this project is not fixed and can be changed freely.

Advantages

The advantages of using this boilerplate is to save time thinking about certain basic structures common to any project to make an API without having to get everything from scratch.

As it is only a boilerplate, you have the freedom to structure the code whatever you want.

Common structures found within this project are:

  • Basic authentication and authorization.
  • Filesystem with minIO, 100% S3 compatible.
  • Basic push Notification and Email.
  • TypeORM, MikroORM and Mongoose Integration.
  • Express and Koa integration.
  • Business logic independent of the HTTP and persistence libraries.
  • Esbuild compiler.

License

NExp is MIT licensed.

node-experience's People

Contributors

murzbul avatar semantic-release-bot avatar smartnetar avatar gaston3408 avatar roxnnyabarriosc avatar gavogar avatar dependabot[bot] avatar lucho10mdq avatar segoviadanielm avatar anne-tf avatar roxnnyabarrioscwingsoft 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.