/spring-boot-pos

Learning Spring Boot

Primary LanguageJava

Spring Boot POS Backend

screen products transactions

This is the backend repository for the React Tailwind POS project. The backend is built using Spring Boot, JPA, and PostgreSQL to handle product and transaction management.

Features

  • Spring Boot: A powerful framework to build production-ready applications.
  • JPA: Java Persistence API for easy data handling.
  • PostgreSQL: A robust and reliable relational database.

API Endpoints

  • Products: Fetch all products from the /products route.
  • Transactions: Fetch all transactions from the /transaction route.

Getting Started

Prerequisites

  • Java 11 or higher
  • PostgreSQL

Installation

  1. Clone the repository:
    git clone https://github.com/djiordhan/spring-boot-pos.git
  2. Navigate to the project directory:
    cd spring-boot-pos
  3. Configure PostgreSQL database in application.properties:
    spring.datasource.url=jdbc:postgresql://localhost:5432/your_database
    spring.datasource.username=your_username
    spring.datasource.password=your_password
    spring.jpa.hibernate.ddl-auto=update
  4. Build the project:
    ./gradlew clean build
  5. Run the application:
    ./gradlew bootRun

Usage

  • Fetch Products:
    GET /products
  • Fetch Transactions:
    GET /transaction