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 Website: https://plants-trees.netlify.app/
๐ฆ GitHub Repository: https://github.com/Rumi-Parvez/Plants-Trees
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.
Explore different plants through dynamically generated plant cards.
Plant information is loaded from an external API instead of using only static local data.
The project uses React Suspense to handle asynchronous data loading and provide a better loading experience.
The React use() API is used to read the API promise and access the resolved plant data.
A skeleton loading interface is displayed while plant data is being loaded.
The application is divided into reusable React components to keep the code organized and maintainable.
Plant data and component props are defined using TypeScript interfaces.
The project uses a clean, nature-focused interface with modern CSS styling, glassmorphism effects, borders, blur effects, and rounded cards.
The interface is designed to provide a smooth experience across different screen sizes.
The navigation header remains accessible while users browse the page.
- โ๏ธ React
- ๐ท TypeScript
- โก Vite
- ๐ HTML5
- ๐จ CSS3
- Functional Components
- Props
- Component Composition
Suspense- React
use() - Promise-based Data Fetching
- Dynamic Rendering
- Reusable Components
- Interfaces
- Type Annotations
- Typed Props
- Promise Types
- API Response Types
The project uses the following main dependencies:
react
react-dom
@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.
The project retrieves plant information from the Programming Hero Plants API.
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.
The project separates different responsibilities into reusable components.
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
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.
Responsible for displaying individual plant information.
Each plant card can contain:
Plant Image
Plant Name
Plant Description
Plant Category
Plant Price
Contains the website navigation.
The navigation provides access to different sections of the website.
Contains TypeScript interfaces used throughout the project.
Example:
export interface plantsType {
id: number;
image: string;
name: string;
description: string;
category: string;
price: number;
}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
Follow these steps to run the project on your local machine.
git clone https://github.com/Rumi-Parvez/Plants-Trees.gitcd Plants-Treesnpm installnpm run devAfter starting the development server, Vite will provide a local URL, normally:
http://localhost:5173
Open that URL in your browser.
To create an optimized production build:
npm run buildTo preview the production build locally:
npm run previewThe project uses Oxlint for code-quality checking.
Run:
npm run lintThis helps identify potential code-quality and linting issues.
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.
The project uses a nature-inspired visual style.
- ๐ฟ 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
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.
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
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
https://plants-trees.netlify.app/
https://github.com/Rumi-Parvez/Plants-Trees
https://openapi.programming-hero.com/api/plants
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.
https://github.com/Rumi-Parvez
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!
This project was created for learning and development purposes.
