This repository contains the boilerplate for creating a full application using the Javascript Stack. The arhitecture is as following:
- The backend written with
Node.JSusingExpressas the web framework using an 3-Layer arhitectureSequlizeas the ORM for accessing thePostgressdatabaseInversify.JSfor IOC (inversion of control) used for putting all of this togetherPuppeteer&Cheerioused for scraping instagram in order to get certain pictures
- The frontend written with
Reactwhich includes- Simple authentication & authorization using
React Contexts - Form validation using
react-form-hooks
- Simple authentication & authorization using
- Docker which starts the backend, the frontend and docker with the proper environment variables and ports
-
There are 2 types of users,
InternalandExternalInternalusers are created at sign upExternalusers are created byInternalusers
-
Externalusers will have access to a simple notepad where they can write a title and description -
Internalusers- can create
Externalusers - can delete
Externalusers they created - can view the notes of the
Externalusers they created. The available info is:username,note description,note title,note last update
- can create
-
All the users (either created or registered) will feature an instagram image by finding the first picture that has the hashtag
#username(if available). -
At login the user has the option for the browser to remember the session or not.
-
run
docker-compose up. This will start the postgress db, will install deps and start the backend and build the frontend and start an nginx container with it's dist/ -
all the env variables can be seen in
docker-compose.yml, also they can be set using the.envfiles from both be and fe (see.env.example) -
in order to actually use the app you will need to run some migrations. So after starting the
dbdocker container (by runningdocker-compose up), docd backendand thennpm run migrate:up. This will esentially execute the necessary migrations. This will work only on the default, exposed5432port.