Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProductStore

ProductStore is a microservices-based application designed to manage products, clients, and sales. It leverages a combination of Java Spring Boot services and a Next.js frontend, orchestrated using Docker Compose for seamless development and deployment.

To demonstrate security, the first user created can perfor CRUD operations while the rest of the users can just buy products.

Project Structure

  • product-service: Handles product-related operations.
  • client-service: Manages client information and interactions.
  • sale-service: Processes sales transactions and related logic.
  • next-products-app: Frontend application built with Next.js.
  • docker-compose.yml: Defines and manages multi-container Docker applications.

Getting Started

Prerequisites

Ensure you have the following installed on your system:

Installation

  1. Clone the repository:

    git clone https://github.com/ChrystianMSC/ProductStore.git
    cd ProductStore
  2. Build and start the services:

    docker-compose up --build

This command will build the Docker images and start all the services defined in the docker-compose.yml file.

Them you can move to the next-products-app directory in another terminal and run:

npm i
npm run dev
  1. Access the application:

    Ensure these ports are not occupied by other applications.

Development

To work on individual services:

  1. Navigate to the desired service directory:

    cd product-service
  2. Run the service locally:

    ./mvnw spring-boot:run

Repeat the above steps for client-service and sale-service as needed.

  1. For the frontend application:

    cd next-products-app
    npm install
    npm run dev

This will start the Next.js development server on http://localhost:3000.

Testing

Each service includes its own set of tests. To run tests for a specific service:

  1. Navigate to the service directory:

    cd product-service
  2. Execute the tests:

    ./mvnw test

Repeat for other services as needed.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages