Skip to content

About

A modern and responsive plant exploration website where users can discover different plants, explore their details, and learn more about nature through an engaging and user-friendly interface. ๐ŸŒฟ๐ŸŒฑ

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

5 Commits

Folders and files

Repository files navigation

๐ŸŒฟ Plants & Trees

A modern and responsive Plant & Trees Exploration Website where users can discover different plants, explore plant information, and learn more about nature through an engaging and user-friendly interface.

The project is built with React, TypeScript, and Vite and focuses on practicing modern React concepts such as API data fetching, Suspense, the use() API, reusable components, TypeScript interfaces, and dynamic rendering.


๐ŸŒ Live Project

๐Ÿš€ Live Website: https://plants-trees.netlify.app/

๐Ÿ“ฆ GitHub Repository: https://github.com/Rumi-Parvez/Plants-Trees


Plant & Trees Exploration Website banner


๐ŸŒฑ Project Overview

Plants & Trees is a frontend web application designed to provide an easy and visually engaging way to explore plant information.

The application retrieves plant data from an external API and dynamically displays the information using reusable React components.

Users can explore plant cards containing important information such as:

  • ๐ŸŒฟ Plant name
  • ๐Ÿ–ผ๏ธ Plant image
  • ๐Ÿ“ Plant description
  • ๐Ÿท๏ธ Plant category
  • ๐Ÿ’ฐ Plant price

The project combines a nature-focused visual design with modern React development practices.


โœจ Main Features

๐ŸŒฟ Plant Exploration

Explore different plants through dynamically generated plant cards.

๐ŸŒ External API Integration

Plant information is loaded from an external API instead of using only static local data.

โšก React Suspense

The project uses React Suspense to handle asynchronous data loading and provide a better loading experience.

๐Ÿ”„ React use() API

The React use() API is used to read the API promise and access the resolved plant data.

๐Ÿ’€ Loading Skeleton

A skeleton loading interface is displayed while plant data is being loaded.

๐Ÿงฉ Reusable Components

The application is divided into reusable React components to keep the code organized and maintainable.

๐Ÿ›ก๏ธ TypeScript Type Safety

Plant data and component props are defined using TypeScript interfaces.

๐ŸŽจ Modern UI

The project uses a clean, nature-focused interface with modern CSS styling, glassmorphism effects, borders, blur effects, and rounded cards.

๐Ÿ“ฑ Responsive Layout

The interface is designed to provide a smooth experience across different screen sizes.

๐Ÿ“Œ Fixed Navigation

The navigation header remains accessible while users browse the page.


๐Ÿ› ๏ธ Technologies Used

Frontend

  • โš›๏ธ React
  • ๐Ÿ”ท TypeScript
  • โšก Vite
  • ๐ŸŒ HTML5
  • ๐ŸŽจ CSS3

React Concepts

  • Functional Components
  • Props
  • Component Composition
  • Suspense
  • React use()
  • Promise-based Data Fetching
  • Dynamic Rendering
  • Reusable Components

TypeScript Concepts

  • Interfaces
  • Type Annotations
  • Typed Props
  • Promise Types
  • API Response Types

๐Ÿ“ฆ Dependencies

The project uses the following main dependencies:

Runtime Dependencies

react
react-dom

Development Dependencies

@types/node
@types/react
@types/react-dom
@vitejs/plugin-react
oxlint
typescript
vite

For the exact versions, please check the project's package.json file.


๐ŸŒ API Integration

The project retrieves plant information from the Programming Hero Plants API.

API Endpoint

https://openapi.programming-hero.com/api/plants

The API provides plant information such as:

id
image
name
description
category
price

The API response is handled using TypeScript types before being rendered through React components.


๐Ÿงฉ React Component Structure

The project separates different responsibilities into reusable components.

App.tsx

The main application component.

Responsibilities include:

  • Creating the API promise
  • Providing the promise to the API component
  • Handling the loading state with Suspense
  • Rendering the main application layout

api.plants.tsx

Responsible for receiving and resolving the plant API data.

It uses React's:

use()

API to read the resolved promise and dynamically render plant information.


plants.tsx

Responsible for displaying individual plant information.

Each plant card can contain:

Plant Image
Plant Name
Plant Description
Plant Category
Plant Price

header.tsx

Contains the website navigation.

The navigation provides access to different sections of the website.


type.ts

Contains TypeScript interfaces used throughout the project.

Example:

export interface plantsType {
  id: number;
  image: string;
  name: string;
  description: string;
  category: string;
  price: number;
}

๐Ÿ“ Project Structure

Plants-Trees/
โ”‚
โ”œโ”€โ”€ public/
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ assets/
โ”‚   โ”‚   โ”œโ”€โ”€ hero.png
โ”‚   โ”‚   โ”œโ”€โ”€ react.svg
โ”‚   โ”‚   โ””โ”€โ”€ vite.svg
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ componets/
โ”‚   โ”‚   โ”œโ”€โ”€ api.plants.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ header.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ header.css
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ””โ”€โ”€ planets/
โ”‚   โ”‚       โ””โ”€โ”€ plants.tsx
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ App.css
โ”‚   โ”œโ”€โ”€ App.tsx
โ”‚   โ”œโ”€โ”€ index.css
โ”‚   โ”œโ”€โ”€ main.tsx
โ”‚   โ””โ”€โ”€ type.ts
โ”‚
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ .oxlintrc.json
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ tsconfig.app.json
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ tsconfig.node.json
โ”œโ”€โ”€ vite.config.ts
โ””โ”€โ”€ README.md

๐Ÿ’ป How to Run Locally

Follow these steps to run the project on your local machine.

1. Clone the Repository

git clone https://github.com/Rumi-Parvez/Plants-Trees.git

2. Navigate to the Project

cd Plants-Trees

3. Install Dependencies

npm install

4. Start the Development Server

npm run dev

After starting the development server, Vite will provide a local URL, normally:

http://localhost:5173

Open that URL in your browser.


๐Ÿš€ Production Build

To create an optimized production build:

npm run build

To preview the production build locally:

npm run preview

๐Ÿ” Code Quality

The project uses Oxlint for code-quality checking.

Run:

npm run lint

This helps identify potential code-quality and linting issues.


โณ Loading Experience

The project provides a dedicated loading experience using React Suspense.

While the API request is being resolved, skeleton-style loading cards are displayed instead of leaving the page blank.

This improves the perceived user experience and demonstrates how asynchronous UI can be handled with modern React.


๐ŸŽจ UI & Design

The project uses a nature-inspired visual style.

Design Characteristics

  • ๐ŸŒฟ Nature-focused theme
  • ๐ŸŒ‘ Dark interface
  • ๐ŸชŸ Glassmorphism-inspired cards
  • โœจ Backdrop blur effects
  • ๐Ÿ”ฒ Rounded corners
  • ๐Ÿ“ CSS Grid layout
  • ๐Ÿ“Œ Fixed navigation
  • ๐Ÿ–ผ๏ธ Large plant imagery
  • ๐Ÿ“ฑ Responsive structure
  • ๐ŸŽฏ Clean visual hierarchy

๐Ÿ“ฑ Responsive Design

The website is designed to work across different devices, including:

  • ๐Ÿ’ป Desktop
  • ๐Ÿ’ป Laptop
  • ๐Ÿ“ฑ Tablet
  • ๐Ÿ“ฑ Mobile

The plant cards use a grid-based layout to organize content efficiently.


๐ŸŽฏ Project Objectives

This project was created to practice and demonstrate:

  • React development
  • TypeScript with React
  • API integration
  • Asynchronous data fetching
  • Promise handling
  • React Suspense
  • React use()
  • Component-based architecture
  • Reusable components
  • TypeScript interfaces
  • Dynamic rendering
  • Loading-state design
  • CSS Grid
  • CSS Flexbox
  • Modern CSS
  • Vite development workflow
  • Code quality with Oxlint

๐Ÿ”ฎ Future Improvements

The project can be extended with additional functionality such as:

  • ๐Ÿ” Advanced plant search
  • ๐Ÿท๏ธ Plant category filtering
  • ๐Ÿ“„ Individual plant details pages
  • โค๏ธ Favorite plants
  • ๐ŸŒฑ Plant care guides
  • ๐Ÿ’ง Watering information
  • โ˜€๏ธ Sunlight requirements
  • ๐ŸŒก๏ธ Growing conditions
  • ๐Ÿ“Š Advanced filtering
  • ๐Ÿ”Ž Search by plant name
  • ๐ŸŒ™ Light/Dark theme switching
  • ๐Ÿ“ฑ Further mobile UI improvements
  • โš ๏ธ Better API error handling
  • ๐Ÿ”„ Retry functionality when API requests fail

๐Ÿ”— Relevant Links

๐ŸŒ Live Website

https://plants-trees.netlify.app/

๐Ÿ“ฆ GitHub Repository

https://github.com/Rumi-Parvez/Plants-Trees

๐ŸŒฟ Plant API

https://openapi.programming-hero.com/api/plants


๐Ÿ‘จโ€๐Ÿ’ป Developer

Rumi Parvez

Full-Stack Developer & Software Engineer

I am passionate about building modern, responsive, scalable, and user-focused web applications. I enjoy learning new technologies, solving development problems, and turning ideas into functional digital experiences.

GitHub

https://github.com/Rumi-Parvez


โญ Support

If you like this project, feel free to:

  • โญ Star the GitHub repository
  • ๐Ÿด Fork the repository
  • ๐Ÿ› Report issues
  • ๐Ÿ’ก Suggest improvements

Your support and feedback are always appreciated!


๐Ÿ“„ License

This project was created for learning and development purposes.

About

A modern and responsive plant exploration website where users can discover different plants, explore their details, and learn more about nature through an engaging and user-friendly interface. ๐ŸŒฟ๐ŸŒฑ

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages