Skip to content

a unified system that powers, tracks, and optimizes every heartbeat of your pharmacy operations with clarity and intelligence.

License

Notifications You must be signed in to change notification settings

SynapStore/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

SynapStore

SynapStore is a modern, role-aware pharmacy and inventory management platform designed to connect store owners, suppliers, and administrators through a single coherent system. It focuses on correctness, traceability, and real-world operational flow rather than just CRUD abstractions.

The system is built to scale from a single pharmacy to a multi-store, multi-supplier network with strong data guarantees and event driven notifications.


Why SynapStore Exists

Most inventory systems fail not because of missing features, but because they ignore how businesses actually operate.

SynapStore is designed around real flows:

  • A user becomes a store owner by creating a store
  • A supplier independently registers and connects to stores
  • Inventory moves with purpose (sale, receipt, return, damage)
  • Every important action is visible, auditable, and notified

The goal is not dashboards. The goal is clarity and control.


Core Concepts

Roles That Actually Mean Something

SynapStore enforces role boundaries at both API and UI levels.

  • Super Admin System level control. User moderation, store oversight, supplier governance.

  • Admin Operational administration with restricted system access.

  • Store Owner Owns a store, manages inventory, accepts suppliers, handles reorders.

  • Supplier Connects to stores, uploads medicines, responds to reorders.

  • Manager / Staff / Read Only Granular permissions for day to day operations.

No role exists only in name. Every role maps to explicit permissions.


Store and Supplier Isolation

Each store and supplier is uniquely identified by a slug, enabling:

  • Dedicated dashboards /store/{slug}/dashboard /supplier/{slug}/dashboard

  • Public, unauthenticated preview pages with partial information

  • Clean URL sharing without exposing internal IDs


Key Features

Authentication and Access

  • OTP based authentication
  • Google OAuth for users and store owners
  • Explicitly blocked Google login for Admin and Supplier roles
  • JWT based session management
  • Store scoped context resolution on every request

Supplier to Store Workflow

  1. Supplier registers independently
  2. Supplier browses all available stores
  3. Supplier sends a connection request
  4. Store owner accepts or rejects
  5. Notifications sent via email and in-app system
  6. Supplier gains scoped access to the store

No silent access. No implicit trust.


Inventory Engine

  • Batch based inventory
  • Expiry tracking
  • FEFO compliance
  • Stock movements with explicit reasons
  • Damage and return handling
  • Supplier uploads via structured Excel templates

Inventory is treated as a ledger, not a counter.


Notifications System

  • Redis backed queue

  • Guaranteed delivery semantics

  • Email and in-app notifications

  • Event driven triggers for:

    • Supplier requests
    • Inventory uploads
    • Reorders
    • Alerts (low stock, expiry, violations)

This is a system, not a toast message.


Tech Stack

Backend

  • Node.js + Express
  • TypeScript
  • Prisma ORM
  • PostgreSQL
  • Redis (queues and notifications)
  • Zod for validation

Frontend

  • React
  • TypeScript
  • Modern state management
  • Role driven UI rendering
  • Slug based routing

Infrastructure

  • Docker for local services
  • Environment driven configuration
  • Clean separation of services

Project Structure

backend/
 ├─ src/
 │  ├─ routes/
 │  ├─ middleware/
 │  ├─ lib/
 │  ├─ services/
 │  └─ prisma/
 └─ index.ts

frontend/
 ├─ src/
 │  ├─ components/
 │  ├─ pages/
 │  ├─ state/
 │  └─ utils/

Structure favors discoverability over cleverness.


Design Principles

  • Explicit over implicit
  • Flows over features
  • Data integrity over speed shortcuts
  • Real business logic over demo logic
  • Systems should explain themselves through structure

Status

SynapStore is under active development. The architecture is stable, features are evolving, and scalability is a first-class concern.

This is not a demo project. It is being built to survive real usage.

About

a unified system that powers, tracks, and optimizes every heartbeat of your pharmacy operations with clarity and intelligence.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published