Skip to content

Morshedul-developer/ai-model-hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AI Model Hub

A modern web application for browsing and managing AI models β€” built with React 19, Vite, Tailwind CSS, and DaisyUI.

Live Demo Portfolio GitHub Repo


πŸš€ Tech Stack

Technology Version Purpose
React ^19.2.5 UI library
Vite ^8.0.10 Build tool & dev server
Tailwind CSS ^4.2.4 Utility-first styling
DaisyUI ^5.5.19 Component library
React Toastify ^11.1.0 Toast notifications
@vitejs/plugin-react ^6.0.1 React fast refresh via Babel/Oxc

✨ Features

  • πŸ” Models Tab β€” Browse available AI models with card-based layout
  • πŸ›’ Cart Tab β€” Add models to cart and manage selections, with live count badge
  • ⚑ Suspense-based Lazy Loading β€” Models load asynchronously with a spinner fallback
  • 🎨 Gradient Tab UI β€” Active tab highlights with custom gradients (red-orange for Models, indigo-purple for Cart)
  • πŸ”” Toast Notifications β€” User-friendly feedback using React Toastify
  • πŸŒ— DaisyUI Light Theme β€” Clean, accessible UI out of the box

🎨 UI Highlights

πŸ—‚οΈ Tab Navigation with Gradient Active States

The tab switcher uses DaisyUI's tabs-box with radio inputs. Instead of relying on DaisyUI's default checked styling (which doesn't support gradients), each tab uses inline style props to conditionally apply gradient backgrounds based on the active tab state β€” making it fully controlled by React.

style={{
  background: activeTab === "Models"
    ? "linear-gradient(135deg, #ff416c, #ff4b2b)"
    : "transparent",
  color: activeTab === "Models" ? "white" : "inherit",
}}
  • Models tab β†’ Red-to-orange gradient (#ff416c β†’ #ff4b2b)
  • Cart tab β†’ Indigo-to-purple gradient (#6366f1 β†’ #8b5cf6)

⏳ Suspense with Async Data Loading

Models are fetched asynchronously and passed as a Promise to the <Models /> component. React's <Suspense> wraps the tab content and shows a DaisyUI spinner while the data resolves β€” no manual loading state needed.

<Suspense
  fallback={
    <div className="flex items-center justify-center h-64">
      <span className="loading loading-spinner loading-lg"></span>
    </div>
  }
>
  {activeTab === "Models" && <Models modelPromise={modelPromise} />}
  {activeTab === "Cart" && <Cart />}
</Suspense>

πŸ›’ Live Cart Badge

The Cart tab label dynamically shows the number of items currently in the cart, updating in real time as models are added or removed.

aria-label={`Cart (${modelCards.length})`}

πŸ”” Toast Notification System

React Toastify is used for non-intrusive feedback messages β€” triggered when a user adds or removes a model from the cart, keeping the UI clean without any modal interruption.


πŸ“± Fully Responsive Layout

Built mobile-first using Tailwind CSS utility classes. The card grid adapts gracefully across screen sizes, and the tab bar stays centered on all viewports.


πŸ“ Project Structure

ai-model-hub/
β”œβ”€β”€ public/
β”‚   └── favicon.svg
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.jsx          # App entry point
β”‚   β”œβ”€β”€ App.jsx           # Root component with tab logic & Suspense
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Models.jsx    # AI model card listing
β”‚   β”‚   └── Cart.jsx      # Cart view
β”‚   └── index.css         # Global styles
β”œβ”€β”€ index.html
β”œβ”€β”€ vite.config.js
β”œβ”€β”€ eslint.config.js
└── package.json

πŸ› οΈ Getting Started

Prerequisites

  • Node.js >= 18
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/Morshedul-developer/ai-model-hub.git

# Navigate into the project
cd ai-model-hub

# Install dependencies
npm install

πŸ“„ License

This project is private and not licensed for public distribution.


πŸ‘¨β€πŸ’» Author

Morshedul Khaer β€” Frontend Developer focused on building clean, responsive, and modern web experiences.

About

πŸ€– A React-based web app to explore and compare AI models. Built with Vite, Tailwind CSS v4 & DaisyUI.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages