saveinmed/marketplace
2026-01-01 15:39:53 -03:00
..
src Add tests for auth and theme contexts 2026-01-01 15:39:53 -03:00
.env.example refactor: move seeder to api, improve coverage and security 2025-12-20 11:13:53 -03:00
.gitignore refactor: move seeder to api, improve coverage and security 2025-12-20 11:13:53 -03:00
deno.lock fix(marketplace): install dependencies and resolve vite/client type error 2025-12-22 14:55:12 -03:00
Dockerfile Update Dockerfiles and add website Dockerfile 2026-01-01 10:58:10 -03:00
index.html feat: apply logo, document database schema, update docs 2025-12-23 17:01:16 -03:00
MARKETPLACE.md feat: major implementation - seeder, payments, docs 2025-12-26 23:39:49 -03:00
package.json Add cart empty state 2025-12-23 12:03:47 -03:00
pnpm-lock.yaml docs: add DEVOPS guide and optimize Dockerfiles 2025-12-29 17:00:42 -03:00
postcss.config.cjs docs: adiciona documentação completa do projeto SaveInMed 2025-12-17 17:07:30 -03:00
README.md docs: add b2b gaps roadmap and test matrix 2026-01-01 15:20:48 -03:00
tailwind.config.ts docs: adiciona documentação completa do projeto SaveInMed 2025-12-17 17:07:30 -03:00
tsconfig.json fix(marketplace): exclude test files from production build 2025-12-22 00:35:28 -03:00
tsconfig.node.json docs: adiciona documentação completa do projeto SaveInMed 2025-12-17 17:07:30 -03:00
vite.config.d.ts feat(pagination): add pagination to all list endpoints 2025-12-20 08:37:59 -03:00
vite.config.js feat(pagination): add pagination to all list endpoints 2025-12-20 08:37:59 -03:00
vite.config.ts fix: seeder tables and marketplace api proxy configuration 2025-12-22 11:14:14 -03:00
vitest.config.ts feat(backend): add comprehensive test suite for 80% coverage 2025-12-20 07:43:56 -03:00

SaveInMed Marketplace Frontend

The Marketplace is the customer-facing B2B application where pharmacies purchase products from distributors.

🏗 Architecture

The frontend is built with React and Vite, utilizing a component-based architecture state management.

graph TD
    %% User
    User((User))

    %% Core
    subgraph "Application Core"
        App[App Root]
        Router[React Router]
        Store[Zustand Store]
        Query[TanStack Query]
    end

    %% Pages
    subgraph "Pages / Routes"
        LoginP[Login/Auth]
        HomeP[Home / Catalog]
        ProdP[Product Details]
        CartP[Shopping Cart]
        CheckoutP[Checkout]
        ProfileP[User Profile]
        OrdersP[Order History]
    end

    %% Feature Components
    subgraph "Smart Components"
        AuthForm[Auth Forms]
        ProdGrid[Product Grid]
        CartWidget[Cart Widget]
        PayWidget[Payment Widget]
        AddressForm[Address Manager]
    end

    %% API Layer
    subgraph "API Integration"
        API[API Client (Axios)]
        Backend[Backend API]
    end

    %% Flow
    User --> App
    App --> Router
    App --> Store
    
    Router --> LoginP
    Router --> HomeP
    Router --> ProdP
    Router --> CartP
    Router --> CheckoutP
    Router --> ProfileP
    Router --> OrdersP

    HomeP --> ProdGrid
    CartP --> CartWidget
    CheckoutP --> PayWidget
    CheckoutP --> AddressForm
    
    ProdGrid --> Store
    CartWidget --> Store
    PayWidget --> Store
    
    Store --> API
    Query --> API
    API --> Backend

    %% Styling
    style User fill:#f9f,stroke:#333,stroke-width:2px
    style Backend fill:#f87171,stroke:#333,stroke-width:2px
    style Store fill:#60a5fa,stroke:#333

🛠 Tech Stack

  • Framework: React 18 + Vite
  • Styling: TailwindCSS
  • State: Zustand + TanStack Query
  • Routing: React Router DOM
  • HTTP: Axios

📦 Key Modules

  • Authentication: JWT-based login and session management
  • Catalog: Virtualized product lists with search and filter
  • Checkout: Multi-step checkout with payment integration
  • Dashboard: User order history and status tracking

🧪 Tests

npm test

For the complete test matrix (with/without DB and Playwright), see: docs/TESTES.md