Skip to content

YetAnotherFactsEnjoyer/StockFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘
β•šβ•β•β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•
β•šβ•β•β•β•β•β•β•   β•šβ•β•    β•šβ•β•β•β•β•β•  β•šβ•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•     β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β•  β•šβ•β•β•β•šβ•β•β•

Full-stack inventory & procurement management platform

Java Spring Boot React TypeScript PostgreSQL Docker

🚧 Actively developed as a portfolio project targeting full-stack roles in Singapore.


What is StockFlow?

StockFlow is a business-oriented inventory and procurement platform built to feel like a real internal operations tool, not a tutorial clone. It is designed around the actual workflows teams need to manage products, suppliers, purchasing, and stock visibility in one place.

The project focuses on production-minded full-stack engineering:

  • clean REST API design
  • layered Spring Boot architecture
  • relational data modeling with PostgreSQL
  • typed frontend development with React + TypeScript
  • reusable CRUD patterns across modules
  • a UI that feels like an internal business system rather than a demo

Current Progress

StockFlow currently supports full product and supplier management across both backend and frontend.

Completed

  • Product CRUD
  • Supplier CRUD
  • Modal-based create/edit flows on the frontend
  • Auto-refreshing data tables without page reload
  • Layered backend structure with controller/service/repository separation
  • DTO + mapper + exception handling structure for supplier module

In progress

  • Product-to-supplier relationship
  • Search, filtering, and pagination
  • Purchase order domain modeling

Planned

  • JWT authentication
  • Role-based access control
  • Dashboard analytics
  • Audit logging
  • Dockerized deployment and CI/CD pipeline

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   React Frontend    │──HTTP──▢│   Spring Boot Backend    │──JPA───▢│  PostgreSQL β”‚
β”‚  TypeScript/Tailwind│◀──JSON──│  REST API + Spring Sec.  β”‚         β”‚  Database   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Backend layers

Controller  β†’  Service  β†’  Repository  β†’  Entity  β†’  PostgreSQL
(HTTP/JSON)    (Logic)     (Data access)  (DB map)

Frontend layers

Page  β†’  Modal/Form  β†’  Service  β†’  API
(UI)     (State)        (HTTP)      (Backend)

This pattern is intentionally repeated across modules so new business entities can be added consistently.


Tech Stack

Layer Technology
Frontend React 18, TypeScript, Tailwind CSS, Vite
Backend Java 17, Spring Boot 3.5, Spring Data JPA, Spring Validation
Database PostgreSQL 15
Security Spring Security, JWT (planned)
Build Maven, npm, Vite
DevOps Docker, Docker Compose, GitHub Actions (planned)
Testing JUnit 5, Postman

Features

Module Status
Product management (CRUD) βœ… Done
Supplier management (CRUD) βœ… Done
Product-supplier relationships πŸ”¨ In progress
Search, filter, pagination πŸ“‹ Planned
JWT authentication πŸ“‹ Planned
Role-based access (Admin / Manager / Staff) πŸ“‹ Planned
Purchase order workflow πŸ“‹ Planned
Stock updates & inventory history πŸ“‹ Planned
Dashboard analytics πŸ“‹ Planned
Audit logs πŸ“‹ Planned
Docker + CI/CD pipeline πŸ“‹ Planned

Product Module

The Product module is the first complete end-to-end feature and serves as the template for the rest of the system.

Implemented

  • Backend CRUD endpoints
  • Frontend data table
  • Add product modal
  • Edit product modal with pre-filled values
  • Delete product flow
  • Automatic table refresh after save/delete

Why it matters

This module established the reusable full-stack pattern used by the rest of the project:

Entity β†’ Repository β†’ Service β†’ Controller β†’ Page β†’ Modal

That pattern is now being reused for Suppliers and future modules like Purchase Orders.


Supplier Module

The Supplier module is the second complete CRUD feature and expands the project toward procurement workflows.

Implemented

  • Supplier entity and repository
  • Service layer with business logic
  • Request/response DTOs
  • Mapper layer
  • Custom not-found exception
  • Global exception handling
  • Frontend supplier table
  • Modal-based create/edit supplier form
  • Delete supplier flow
  • Automatic UI refresh after changes

Supplier fields

  • Name
  • Contact person
  • Email
  • Phone
  • Address

This module is the foundation for the upcoming product-supplier relationship and purchase order workflow.


Purchase Order Workflow

Planned workflow:

DRAFT  ──▢  SUBMITTED  ──▢  APPROVED  ──▢  RECEIVED
                β”‚
                └──▢  REJECTED

This module will eventually connect suppliers, products, order lines, approval states, and stock updates.


Roles & Permissions

Planned authorization model:

Action Admin Manager Staff
View products & suppliers βœ… βœ… βœ…
Create / edit products βœ… βœ… ❌
Manage suppliers βœ… βœ… ❌
Create purchase orders βœ… βœ… βœ…
Approve / reject orders βœ… βœ… ❌
View audit logs βœ… ❌ ❌
Manage users βœ… ❌ ❌

Project Structure

stockflow/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/main/java/com/stockflow/
β”‚   β”‚   β”œβ”€β”€ controller/        # REST endpoints
β”‚   β”‚   β”œβ”€β”€ dto/               # Request/response DTOs
β”‚   β”‚   β”œβ”€β”€ entity/            # JPA entities
β”‚   β”‚   β”œβ”€β”€ exception/         # Custom exceptions + global handler
β”‚   β”‚   β”œβ”€β”€ mapper/            # DTO/entity mapping
β”‚   β”‚   β”œβ”€β”€ repository/        # Spring Data JPA repositories
β”‚   β”‚   β”œβ”€β”€ service/           # Service contracts
β”‚   β”‚   β”œβ”€β”€ service/impl/      # Service implementations
β”‚   β”‚   └── security/          # JWT + Spring Security (planned)
β”‚   └── pom.xml
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/        # Reusable UI components and modals
β”‚   β”‚   β”œβ”€β”€ pages/             # Route-level pages
β”‚   β”‚   β”œβ”€β”€ services/          # API service layer
β”‚   β”‚   β”œβ”€β”€ types/             # TypeScript models
β”‚   β”‚   └── App.tsx
β”‚   └── package.json
β”‚
β”œβ”€β”€ docs/                      # Architecture notes and diagrams
β”œβ”€β”€ docker-compose.yml
└── README.md

API Endpoints

Products

Method Endpoint Description
GET /api/products Get all products
GET /api/products/{id} Get product by ID
POST /api/products Create a product
PUT /api/products/{id} Update a product
DELETE /api/products/{id} Delete a product

Suppliers

Method Endpoint Description
GET /api/suppliers Get all suppliers
GET /api/suppliers/{id} Get supplier by ID
POST /api/suppliers Create a supplier
PUT /api/suppliers/{id} Update a supplier
DELETE /api/suppliers/{id} Delete a supplier

Getting Started

Prerequisites

  • Java 17+
  • Node.js 18+
  • Maven
  • Docker & Docker Compose

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/stockflow.git
cd stockflow

2. Start PostgreSQL

docker compose up -d

3. Start the backend

cd backend
./mvnw spring-boot:run

Backend runs at http://localhost:8080

4. Start the frontend

cd frontend
npm install
npm run dev

Frontend runs at http://localhost:5173


Development Roadmap

Phase 1 β€” Core CRUD

  • Products
  • Suppliers
  • Product-supplier relationship

Phase 2 β€” Usability

  • Search
  • Filtering
  • Pagination
  • Better validation feedback

Phase 3 β€” Security

  • JWT login
  • Route protection
  • Role-based permissions

Phase 4 β€” Procurement

  • Purchase orders
  • Order line items
  • Approval workflow
  • Stock updates on receive

Phase 5 β€” Production polish

  • Dashboard analytics
  • Audit logs
  • Dockerized deployment
  • GitHub Actions pipeline
  • README/screenshots/demo polish

Why this project exists

This project is being built as a portfolio-quality system to demonstrate the difference between knowing a framework and being able to design a real application with it.

It is intentionally structured to show:

  • full-stack consistency
  • scalable feature organization
  • reusable CRUD patterns
  • enterprise-leaning backend design
  • thoughtful frontend state management

Author

Built by YetAnotherFactsEnjoyer

GitHub


Built with Java, Spring Boot, React, TypeScript, PostgreSQL, and Docker
```

A good commit for this would be:

docs(readme): update project status and add supplier module details

About

StockFlow is a full-stack inventory and procurement management platform built with Spring Boot, React, Tailwind CSS, and PostgreSQL, designed to streamline product tracking, supplier management, and purchase order workflows.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors