Skip to content

REST API boilerplate Notion clone written with Fastify, TypeScript and PostgreSQL

License

Notifications You must be signed in to change notification settings

LCcodder/fastify-typescript-boilerplate

Repository files navigation

Node.js and Fastify RESTful API boilerplate

NodeJS TypeScript Fastify Postgres Redis

Docker Postman Swagger GitHub Actions

REST API and Clean Architecture boilerplate/template written in Node.js and Fastify

This is notion-like note application backend and Clean Architecture boilerplate with registration, authorization, collaborating, etc. You can create note, add tags to it and filter your notes, add and remove collaborators, customize your profile. More about functional you can read here

Features

  • User registration and authorization by JWT
  • User's profile update
  • User password change
  • Note creation with tags and collaborators
  • Note edit
  • Receiving notes with pagination, update date sorting, tags filtering
  • Adding and removing collaborators

Dependency injection diagram

How to launch

To launch application tou need to install Docker and Docker Compose on your system

  1. Clone git repository and go to the directory
git clone https://github.com/LCcodder/NodeNotes
cd NodeNotes
  1. Edit environment variables in docker-compose.yaml as you want
  2. Run
docker compose up --build

pgAdmin panel

  1. Go to the http://localhost:5050
  2. Log in with email: admin@pgadmin.com and password: password
  3. Run
docker ps -a 
  1. Find and copy postgres container id
  2. Run
docker inspect <copied container id>
  1. Find IPAddress with 172 prefix and copy it
  2. Now add server in pgAdmin and paste copied IP in host input
  3. Complete all other inputs

Swagger API specification

WebApp supports Swagger OpenApi spec viewer

Use http://localhost:8080/documentation to go to the SwaggerUI page


Everything, including Postman tests, GitHub ci/cd, Docker compose and API itself was created and written by LCcodder