akraskovski / product-management-system

Sample PIM system, providing the process of working with products

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Product Management System

Build Status

Web application produces the system, working with products, stocks and shops resources.


Server side technologies stack:

  • Java 8
  • Spring Boot (Security, Data Jpa, Web)
  • JWT (As a security base point)
  • Hibernate Jpa
  • PostgreSQL

Client: Angular 4.

Build tools:

  • Gradle
  • Webpack

Installing the project

Installing environment (You need Java 8 installed):

  1. Download Gradle

    Unpack and set path in the environment variable Path to foler /bin.

  2. Download PostgreSQL from official site or from docker hub: docker pull postgres:latest

  3. Download NodeJS with npm.

Building project

  1. Clone project from this repository.

  2. Start PostgreSQL, docker command: docker run --name postgres -v /opt/db/postgres:/var/lib/postgresql/data -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=root -e POSTGRES_DB=postgres -p 5432:5432 -d postgres

  3. Change(if needed) in application.properties project properties, exactly:

  • URL and port to your database
  • username
  • password
  • secret security key

Run backend:

  • Manually:
  1. Go to the server package cd server/

  2. Run the command gradle jar, java -jar build/libs/product-management-system.jar or just gradle bootRun

  • With docker:
  1. Go to server directory: cd server/

  2. Build server jar, using gradle command: gradle clean build

  3. Build an image: docker build -t pms-image .

  4. Start docker container: docker run --name pms-server --link postgres -p 8080:8080 -d pms-image

Run client:

  • In console, go to the project root root.
  • cd client/
  • npm i
  • npm start

Tests

To run server tests use command: gradle test

To run client tests go to client folder in project and use command:

  • npm run selen-update
  • npm run selen
  • npm run test

Debug

To debug the client use npm run server to run Webpack DevServer (port :3000)

Logging

  • Logs save to dir /server/log/pms/general.YYYY-MM-DD.log.

About

Sample PIM system, providing the process of working with products

License:Apache License 2.0


Languages

Language:Java 51.9%Language:TypeScript 24.2%Language:HTML 20.3%Language:XSLT 1.7%Language:CSS 1.5%Language:JavaScript 0.4%