Skip to content

vim-jay/shopifyze-user-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shopyfize User Service

Table of Contents

Overview

The User Service is a core component of the Shopyfize application, responsible for user authentication and authorization. Built using Java and Spring Boot, this service utilizes modern technologies and practices to ensure a secure and efficient user experience.

Technologies Used

  • Java
  • Spring Boot
  • Maven
  • Postgres
  • Docker
  • JUnit
  • Mockito
  • Spring Security
  • JWT (JSON Web Tokens)
  • Spring Data JPA
  • Hibernate

Features

  • User Login: Users can log in to the application using their credentials.
  • Token-Based Authentication: This service implements token-based authentication, ensuring secure user sessions.
  • Spring Authorization Server: The service is configured to use Spring Authorization Server, enhancing the security and management of user permissions.

Integration with product-service

The user-service interacts with a separate product-service, which serves as a repository for products. To access product data, users must be authenticated and authorized by the user-service, ensuring that only valid users can retrieve information.

Getting Started

Prerequisites

  • Docker
  • Maven
  • Postgres

Installation

  1. Clone the repository:
    git clone <repository-url>
    cd shopyfize-user-service
  2. Set the environmental variable for USER_SERVICE_SECRET: This variable is used to sign the JWT tokens generated by the service. You can set this variable to any string value of your choice. In a Unix-based system, you can run:
    export USER_SERVICE_SECRET=your_secret_string
    In a Windows system, you can run:
     [System.Environment]::SetEnvironmentVariable('USER_SERVICE_SECRET', 'your_secret_string', [System.EnvironmentVariableTarget]::User)
  3. Build the application:
    mvn clean install
  4. Running the application:
    • After building, the JAR file can be found in target/ directory
    • You can run the jar with following command
    java -jar target/shopyfize-user-service-<version>.jar
  5. Access the application at http://localhost:8080/auth/

Contributing

Contributions are welcome! Please submit the pull request or open an issue to discuss changes

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages