Skip to content
In Development · Full-Stack System

Breit Med Inventory

A production-grade medical inventory management system with normalized APIs, secure authentication, and scalable full-stack architecture

Medical Inventory preview

Project Overview

What It Is

Breit Med Inventory is a full-stack medical inventory management platform designed to manage medicines, suppliers, warehouses, purchases, and sales with strict data integrity and reliability.

Why It Was Built

Medical and pharmaceutical inventory systems require precision, traceability, and consistency. This project prioritizes correctness and maintainability over superficial UI features.

Problem Solved

Many inventory systems break under real-world usage due to weak backend validation, unstable API contracts, and unstructured frontend data handling.

System Capabilities

💊

Medicine Management

CRUD operations for medicines with category mapping and structured metadata handling.

🏭

Supplier Management

Create, update, and manage suppliers using normalized API responses and defensive update flows.

🏬

Warehouse Operations

Warehouse-level inventory tracking with contact details, activation status, and location data.

📦

Purchase & Sales Orders

Structured purchase and sales order workflows connecting suppliers, warehouses, and stock movement.

🔐

JWT Authentication

Secure authentication system with token-based authorization and protected API routes.

🔄

Normalized Data Layer

Frontend normalization layer that converts raw backend responses into UI-safe, predictable data.

Architecture Snapshot

Frontend

Strongly typed frontend focused on predictable state management and controlled data flow.

ReactTypeScriptViteTailwind CSSReact Context

Backend

RESTful backend with clear routing, service separation, and authentication middleware.

GoGin FrameworkJWTREST APIs

Database

Relational database schema designed for transactional safety and data consistency.

MySQLNormalized TablesForeign Keys

API Layer

Stable API layer with Axios interceptors, error handling, and request normalization.

Axios ClientAPI NormalizersInterceptorsError Handling

System Design

Service-oriented architecture focused on debuggability, scalability, and maintainability.

Service LayerRepository PatternDTO SeparationScalable Architecture

Tech Stack

Frontend

• React
• TypeScript
• Vite
• Tailwind CSS

Backend

• Go
• Gin
• JWT Authentication

Database

• MySQL
• Relational Schema

State Management

• React Context
• Custom Hooks

Architecture

• Normalization Layer
• CRUD Patterns

Challenges & Learnings

Backend–Frontend Mismatch

Problem: Backend responses were not frontend-ready, leading to empty UI states despite successful API calls.

Solution: Implemented a normalization layer to adapt backend responses before storing them in global state.

Learning: Frontend systems should never consume raw backend data directly in production applications.

Infinite API Requests

Problem: Incorrect useEffect dependencies caused repeated API calls and backend overload.

Solution: Introduced guarded initial fetch logic using useRef to ensure one-time data loading.

Learning: Understanding React’s rendering and effect lifecycle is critical for stable data fetching.

Unsafe Update Operations

Problem: Backend update endpoints failed when receiving empty or zero-value fields.

Solution: Added frontend payload adapters to send only meaningful fields, mimicking PATCH behavior.

Learning: Defensive frontend engineering is essential when backend contracts are imperfect.

Target Users

Pharmacies

Accurate medicine and stock tracking

Medical Distributors

Supplier and warehouse coordination

Healthcare Startups

Scalable inventory infrastructure

Developers

Reference for real-world CRUD architecture

Outcome & Impact

Achievements

  • ✓ Implemented complete CRUD flows across multiple entities
  • ✓ Built a normalized and stable frontend data layer
  • ✓ Integrated secure JWT-based authentication
  • ✓ Stabilized API communication through frontend adapters

Why This Matters

Breit Med Inventory demonstrates the ability to design and build reliable enterprise-grade systems where correctness, stability, and maintainability are prioritized over superficial features.