PharmaSync is a modern, premium SaaS platform built for wholesale pharmaceutical inventory management. It streamlines operations between Central Administration and registered Pharmacies/Clinics (Sellers) by providing secure role-based dashboards, precise unit-conversion logic, and order management.
- React.js (Vite) for lightning-fast UI rendering
- Tailwind CSS for a responsive, modern, "startup-grade" design system
- Framer Motion for smooth, professional micro-animations
- React Router for seamless Single Page Application (SPA) navigation
- Lucide React for minimalist iconography
- Node.js & Express.js for a robust RESTful API
- Prisma ORM for type-safe database querying and schema modeling
- Neon PostgreSQL for serverless, high-performance database storage
- JWT (JSON Web Tokens) stored in HTTP-only cookies for secure authentication
- Bcrypt.js for strong password hashing
-
Role-Based Access Control (RBAC)
- Administrators: Access to complete inventory controls, product management, and order fulfillment.
- Sellers (Pharmacies/Clinics): Access to personalized dashboards, catalog browsing, and quotation generation.
- Dedicated Registration flows for both Roles.
-
Precision Inventory & Unit Conversion
- Implements a strictly decoupled "Single Source of Truth" database structure using the PostgreSQL
Decimaltype to prevent floating-point calculation errors. - Automatically normalizes quantities to Base Units (
grams,milliliters) during transactions while allowing users to interact via familiar units (kg,L).
- Implements a strictly decoupled "Single Source of Truth" database structure using the PostgreSQL
-
Production Ready (Vercel)
- Pre-configured
vercel.jsonrouting for React Router SPAs. - Dynamic CORS configuration explicitly designed for Vercel's serverless Edge network and preview domains.
- Pre-configured
git clone <your-repository-url>
cd <repository-directory>cd server
npm install- Create a
.envfile in the/serverdirectory:
PORT=5000
DATABASE_URL="your_neon_postgresql_url"
JWT_SECRET="your_secure_random_secret"- Initialize the Database:
npx prisma generate
npx prisma db push- Start the backend server:
npm run dev
# or npm startOpen a new terminal window:
cd client
npm install- Create a
.envfile in the/clientdirectory:
VITE_API_URL="http://localhost:5000"- Start the frontend development server:
npm run devThis project is configured for one-click deployment on Vercel.
- Backend: Set the Root Directory to
/server. Set the Build Command tonpm run postinstall(which triggersprisma generate). Add your.envvariables. - Frontend: Set the Root Directory to
/client. AddVITE_API_URLpointing to your Vercel Backend URL.