Skip to content

simbld/3DBROS

Repository files navigation

Nest Logo

Docker Configuration

This project is fully containerized with Docker, allowing for consistent development and deployment environments. The Docker setup includes services for both the frontend (Next.js) and backend (Nest.js), as well as MongoDB and PostgreSQL databases.

Services in Docker Compose

Next.js (Frontend) : A React-based frontend framework configured to run in a dedicated Docker container

Nest.js (Backend) : A progressive Node.js framework for building server-side applications, running in its own container

MongoDB : A NoSQL database used for storing non-relational data, running in a separate Docker container

PostgreSQL : A powerful, open-source relational database system, running in another Docker container

Running the Application with Docker

To start all services simultaneously, simply use Docker Compose from the root of the project:

docker-compose up -d

This command will build (if necessary) and start all the containers defined in the

docker-compose.yml file. The "-d"

flag runs the containers in detached mode, leaving the terminal free for other commands.

Accessing the Services

The Next.js frontend is accessible at http://localhost:3001 (or the port mapped in your docker-compose.yml)

The Nest.js backend can be accessed at http://localhost:4001 (or the mapped port)

MongoDB is available on the default port 27018 (as mapped in docker-compose.yml)

PostgreSQL database is accessible on port 5433 (or the port you have configured)

Stopping the Services

To stop all running services, use the following command:

docker-compose down

This command stops and removes the containers, networks, and volumes created by

docker-compose up

3DBROS-app

For start FRONTEND and BACKEND simultaneously

"scripts": {
    "dev": "concurrently \"npm run dev --prefix front\" \"npm run start:dev --prefix back\"",
    "start": "concurrently \"npm run start --prefix front\" \"npm run start --prefix back\"",
    "lint": "concurrently \"npm run lint --prefix front\" \"npm run lint --prefix back\"",
    "test": "concurrently \"npm run test --prefix front\" \"npm run test --prefix back\"",
    "build": "concurrently \"npm run build --prefix front\" \"npm run build --prefix back\""
  },

FRONT

The front-end of this project is built using the following technologies:

  • React
  • TypeScript
  • Nextjs
  • Axios
  • Jest and React Testing Library

BACK

The back-end of this project is built using the following technologies:

  • Nestjs
  • Jest

FRONT-END

Test

To run the front-end tests, navigate to the front-end folder and run the following command:

In packages.json :

  "scripts": {
    "test": "jest",
    "test:watch": "jest --watch",
    "test:coverage": "jest --coverage",
    "..."
  }
npm test

This will run the tests using Jest and React Testing Library.

Build

"scripts": {
"build": "next build",
"..."
},
npm build

Dev

"scripts": {
"dev": "next dev",
"..."
}
npm run dev

BACK-END

Test

To run the backend tests, navigate to the backend folder and run the following command:

npm test

This will run the tests using Jest.

Build

"scripts": {
  "...",
  "build": "tsc -p tsconfig.json"
},
npm build

Dev

"scripts": {
  "start:dev": "nest start --watch",
  "..."
}
npm run start:dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors