A Node template that follows the Clean Architecture principles and encourages established practices.

Overview

Clean Architecture Template

A Node template that follows the Clean Architecture principles and encourages established practices.

Features

  • TypeScript first
  • Dependency injection via Awilix
  • CQRS (Command Query Responsibility Segregation)
  • High test coverage (unit, integration and functional tests)
  • Automatic error handling
  • Logging
  • Versioned APIs
  • Swagger
  • Prisma ORM

Getting Started

  1. Install the latest Node.js LTS
  2. Install Docker and ensure that it is running
  3. Create .env file cp .env.example .env
  4. Install project dependencies by running yarn install
  5. Start Docker (local Postgres instance) docker-compose up -d
  6. Create database npx prisma migrate deploy
  7. Start development server yarn start
  8. Navigate to Swagger ( http://localhost:3000/api-docs)

Scripts

Build production bundle

yarn build

Lint project (eslint)

yarn lint

Start development server

yarn start

Run all tests

yarn test

Run unit tests

yarn test:unit

Run functional tests (API tests)

yarn test:functional
Comments
  • Add test coverage metrics to jest config and add github action(s) to ensure them

    Add test coverage metrics to jest config and add github action(s) to ensure them

    This is beyond the code strictly speaking, but would be a decent idea to add a test coverage requirement (matching the current coverage level) to the jest configuration.

    Then adding a github action to require the coverage is met in pull requests.

    Optionally, adding another action, that will update the coverage levels to the current level when merged.

    opened by tracker1 1
  • ci: pipeline and badges

    ci: pipeline and badges

    I have added a CI pipeline which does the following:

    1. Installs dependencies
    2. Runs linting
    3. Runs tests (starts and stops a Docker container)
    4. Synchronises the code coverage report to Code Climate

    I have also updated the documentation and added badges:

    • License badge
    • Test coverage
    • Maintainability score
    • Package vulnerabilities
    opened by JamieLivingstone 0
  • [Snyk] Upgrade @prisma/client from 3.13.0 to 3.14.0

    [Snyk] Upgrade @prisma/client from 3.13.0 to 3.14.0

    Snyk has created this PR to upgrade @prisma/client from 3.13.0 to 3.14.0.

    merge advice :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 103 versions ahead of your current version.
    • The recommended version was released 21 days ago, on 2022-05-10.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by snyk-bot 0
  • [Snyk] Upgrade express from 4.17.3 to 4.18.0

    [Snyk] Upgrade express from 4.17.3 to 4.18.0

    Snyk has created this PR to upgrade express from 4.17.3 to 4.18.0.

    merge advice :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 1 version ahead of your current version.
    • The recommended version was released 21 days ago, on 2022-04-25.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by snyk-bot 0
  • [Snyk] Upgrade awilix from 7.0.1 to 7.0.2

    [Snyk] Upgrade awilix from 7.0.1 to 7.0.2

    Snyk has created this PR to upgrade awilix from 7.0.1 to 7.0.2.

    merge advice :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 1 version ahead of your current version.
    • The recommended version was released 21 days ago, on 2022-04-11.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by snyk-bot 0
  • [Snyk] Upgrade @prisma/client from 3.11.1 to 3.12.0

    [Snyk] Upgrade @prisma/client from 3.11.1 to 3.12.0

    Snyk has created this PR to upgrade @prisma/client from 3.11.1 to 3.12.0.

    merge advice :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 76 versions ahead of your current version.
    • The recommended version was released 21 days ago, on 2022-04-05.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by snyk-bot 0
  • chore: upgrade winston from 3.6.0 to 3.7.2

    chore: upgrade winston from 3.6.0 to 3.7.2

    Snyk has created this PR to upgrade winston from 3.6.0 to 3.7.2.

    merge advice :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 2 versions ahead of your current version.
    • The recommended version was released 21 days ago, on 2022-04-04.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by snyk-bot 0
Owner
Jamie Livingstone
Jamie Livingstone
About Folder pattern for express rest api starterkit clean architecture, easy to scalable and easy to maintenance.

Express Rest Api Clean Architecture The following is a folder pattern for express rest api starterkit structure pattern that I usually use, so if you

Restu Wahyu Saputra 50 Dec 20, 2022
Express Graphql Clean Architecture

Folder pattern for express graphql starterkit clean architecture, easy to scalable and easy to maintenance, explore documentation for more about this starterkit https://typegraphql.com

Restu Wahyu Saputra 10 Aug 14, 2022
Postgres Node.js Express TypeScript application boilerplate with best practices for API development.

Node TypeScript Boilerplate Postgres Developer Ready: A comprehensive template. Works out of the box for most Node.js projects. This project is intend

Chirag Mehta 9 Aug 28, 2022
Component-based node server architecture that is dockerized and ready for deployment

Introduction Component based node server architecture that is dockerized and ready for deployment Installation clone the repo and then cd NODE-SERVER

Ahmed Mashhour 2 Jan 24, 2022
:fire: A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices.

Start your next react project in seconds A highly scalable, offline-first foundation with the best DX and a focus on performance and best practices Cr

react-boilerplate 28.9k Jan 7, 2023
A MERN boilerplate repository with RBAC feature, following all production best practices.

Welcome to the RBAC MERN Boilerplate project A MERN boilerplate repository with RBAC feature, following all production best practices. In this reposit

Foyzul Karim 268 Dec 27, 2022
Node Express Template (NET.ts) - a small template project which help you to speed up the process of building RESTful API

Node Express Template (NET.ts) - a small template project which help you to speed up the process of building RESTful API

Przemek Nowicki 26 Jan 4, 2023
React Native Boilerplate - The Boilerplate contains all the basic packages, common components and, prebuilt code architecture

The Boilerplate contains all the basic packages, common components and, prebuilt code architecture. It will save developer's project setup time.

MindInventory 36 Dec 26, 2022
This is a template project demonstrating how the MERN stack(Mongo, Express, React, Node) can be used, here we have the back end implementation and there is the React implementation as the front end

Versão em português MERN stack This is a template project demonstrating how the MERN stack(Mongo, Express, React, Node) can be used, here we have the

Douglas Samuel Gonçalves 2 Jan 22, 2022
Template repo for any node.js project

App Name The project uses: ESLint для линтинга кода, используется свой styleguide основанный на airbnb стандарте. prettier для форматирования кода. hu

Konstantin Aleksandrov 1 Dec 20, 2021
👩🏻‍💻 Developer Ready: A comprehensive template. Works out of the box for most Node.js projects.

node-typescript-boilerplate ????‍?? Developer Ready: A comprehensive template. Works out of the box for most Node.js projects. ???? Instant Value: All

IAD S.r.l. 6 Dec 15, 2022
@code-collabo's node-mongo API boilerplate template (typescript)

@code-collabo's node-mongo API boilerplate template (typescript) This is the manual download option for the API boilerplate template generated by @cod

Code Collabo 2 May 31, 2022
A professional front-end template for building fast, robust, and adaptable web apps or sites.

HTML5 Boilerplate HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites. This project is t

H5BP 53.8k Dec 28, 2022
A simple Vue3, Nuxt3 and Tailwind3 Starter Template

Nuxt 3 + Tailwind CSS 3 Starter This is a minimal starter template for Nuxt 3 projects with Tailwind CSS 3. It includes a simple template pages/index.

Rizkhal 1 Feb 11, 2022
Next Boilerplate was created to be a template for starting NextJS projects with pre-configured settings like Linters, Test Setup, Storybook and Commit Hooks.

Next Boilerplate was created to be a template for starting NextJS projects with pre-configured settings like Linters, Test Setup, Storybook and Commit Hooks.

Claudio Orlandi 4 Feb 22, 2022
A template repository for Deno, GraphQL, and Svelte projects

Svelte is an innovative approach to frontend software development, the component model, and reactivity features creates simplistic approach to some hard problems. Svelte runs on the front end and is known as a Single Page Application.

hyper 15 Dec 20, 2022
DEPRECATED - A front-end template that helps you build fast, modern mobile web apps.

Deprecation Note Mobile Boilerplate is no longer maintained. Please use HTML5 Boilerplate as a decent starting point for your project. Mobile Boilerpl

H5BP 3.9k Dec 14, 2022
A cli tool to generate cra-template from current create-react-app project.

Create Cra Template A cli tool to generate cra-template from current create-react-app project. Create Cra Template Templates cra-template-popular cra-

Yoki 23 Aug 18, 2022
A generic template for starting Web3 Projects

Redwood WARNING: RedwoodJS software has not reached a stable version 1.0 and should not be considered suitable for production use. In the "make it wor

Dennison Bertram 18 Jun 28, 2022