Skip to content

NivaldoFarias/cms-poc

Repository files navigation

Summary

Content Management System PoC & Full Stack Software Engineering Playground

Built with

docker typescript turborepo commitlint stylelint

Table of Contents

Installation and Usage

Pre-requisites: Node.js ^18.12.0, Git ^2.33.0, MongoDB ^5.0.11

Download the zip file and extract it in the root of a new project folder by running these commands:

wget https://github.com/NivaldoFarias/content-management-system/archive/main.zip

Then run the following command to install the project's dependencies:

npm install

That's it! You can now start developing your TypeScript Project by running the command below. Happy coding!

npm run dev

Client and Server

The client and server are separated into two different folders, each containing their own Documentation and usage descriptions.

  • Client Next.js TypeScript React SASS
  • Server Node.js TypeScript Express MongoDB Mongoose JWT

Running inside Docker

Pre-requisites: Docker ^20.10.17, Docker Compose ^2.12.2

With the pre-requisites installed and the repository cloned or downloaded (see Installation and Usage), populate your local .env.dev file with the variables specified in the .env.example file (as well as a .env for Next.js to run properly).

Then run the following command to start the containers:

make start-development

If a new build is required, run the following command:

make build-development

To stop the containers, run the following command:

make stop-development

The development containers will run in the background, during which the following services will be available through the respective ports in your machine:

  • Production
    • 3000 - Client
    • 5000 - Server
    • 27017- Database
  • Development
    • 3001 - Client
    • 5050 - Server
    • 27027- Database

Clean Up

  • Prune Dangling Images: docker image prune
  • Prune Dangling and unused Images: docker volume prune -a
  • Prune system: docker system prune -a (add the --volumes flag to erase stored volumes)

Run Server Only

To run the server (and database) only, you can use the following command:

make start-server

If a new build is required, run the following command:

make build-server

To stop the containers, run the following command:

make stop-server