Fully featured Repository Pattern with Typescript and native PostgreSQL driver

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Sonar - Write Clean JavaScript Code. Always.
  • InfluxDB - Access the most powerful time series database as a service
  • repository-pattern-example

    All source code can be found here. Also for fans of functional programming, which I am, I prepared my own version in folders/files with the prefix fp.

  • node-pg-migrate

    Node.js database migration management for Postgresql

    Why PG? For the clarity of the article to a large circle of developers, the entire explanation will be built by PostgreSQL and PG package. And in a real project, the database schema will change over time, and in order to be able to perform migrations, we will use Node PG migrate.

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • fastify

    Fast and low overhead web framework, for Node.js

    I suggest to start explain how it is work in real project from main.ts file. For routing I like to use fastify. But for example we will use architecture with repositories > handlers layers. For real project you need to use repositories > services > handlers layers for easier code maintainability in future. All repository calls need to be proxied by services, no direct calls repositories in handlers must not be.

  • PostgreSQL

    PostgreSQL client for node.js.

    Why PG? For the clarity of the article to a large circle of developers, the entire explanation will be built by PostgreSQL and PG package. And in a real project, the database schema will change over time, and in order to be able to perform migrations, we will use Node PG migrate.

  • Apache HBase

    Apache HBase

    For this type of systems PostgreSQL not best solution, and for a number of reasons like lack of replication out of the box. And we strictly must not have «Vendor lock», and therefore also did not take modern SQL databases like Amazon Aurora. And end of the ends the choice was made in favor Cassandra, for this article where we will talking about low-lever implementation of Repository Pattern it is not important, in your case it can be any unpopular database like HBase for example.

  • Sonar

    Write Clean JavaScript Code. Always.. Sonar helps you commit clean code every time. With over 300 unique rules to find JavaScript bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts