Skip to content

ttibensky/nodejs-react-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js + React.js Sample App

This repository is a showcase of various technologies, architectural principles and libraries. It utilizes:

  • languages:
  • frameworks
    • Nest.js because it has all the functionality we need, is fast, and well documented
    • React.js because it is one of the most widely used frontend frameworks and most companies requires to have experience with it
    • Vite for fast build, project startup and updates
  • architecture:
  • libraries:
    • @nestjs/mongoose and mongoose as an ODM for storing and retrieving data
    • @nestjs/swagger to generate API documentation from the code
    • class-validator to validate requests/user inputs before the data goes to the controllers
    • date-fns to make work with dates easier
    • purify-ts to provide a funcional (and more readable) way of handling and avoiding null values and nested conditions
    • uuid to generate IDs and primary keys for entities, commands, events and queries
    • Bootstrap and React Bootstrap UI kit, so we don't have to write our own components
    • React Query for easier communication between components
    • Axios for API calls
  • command line utilities:
    • Docker for stable environment
    • Task for easier command line usage

App Screencast

Requirements

Start the project

  • run task up
    • this will spin up all docker containers, imports database seed, runs npm i, so it might take a minute or two
    • if you wish to see the progess, run taks logs or tail logs of specific containers until everything is ready

Usage

  • run task down up logs to restart the project and start tailing logs from all containers

Web, API, Mongo Express

TODO

  • error handling (e.g. POST /jobs when a mongoose connection fails)
  • asynchronous command and event processing
  • correlation and causation ids
  • event sourcing
  • tests
  • add graphql (as an alterantive to REST API)
  • websockets (for auto-updates after creating/updating/deleting a job)

Resources

About

A sample project showcasing Node.js backend and React.js frontend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published