Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aumsoni2002/npm-registry-explorer
A React-based NPM Registry Explorer showcasing featured packages, dynamic search functionality, and detailed package views. Built with React Router, TypeScript, and TailwindCSS, it demonstrates modern web development practices with clean UI, reusable components, and seamless navigation.
https://github.com/aumsoni2002/npm-registry-explorer
npm npm-registry-api react react-hooks react-router tailw typescript
Last synced: 28 days ago
JSON representation
A React-based NPM Registry Explorer showcasing featured packages, dynamic search functionality, and detailed package views. Built with React Router, TypeScript, and TailwindCSS, it demonstrates modern web development practices with clean UI, reusable components, and seamless navigation.
- Host: GitHub
- URL: https://github.com/aumsoni2002/npm-registry-explorer
- Owner: aumsoni2002
- Created: 2024-12-10T03:02:32.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2024-12-10T03:25:48.000Z (about 1 month ago)
- Last Synced: 2024-12-10T04:20:36.570Z (about 1 month ago)
- Topics: npm, npm-registry-api, react, react-hooks, react-router, tailw, typescript
- Language: TypeScript
- Homepage: https://aumsoni2002.github.io/NPM-Registry-Explorer/
- Size: 191 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NPM Registry Explorer
Welcome to the **NPM Registry Explorer**, a React-based web application designed to explore and display packages from the NPM registry. This project demonstrates the use of **React Router** for seamless navigation, along with clean, responsive UI components. It's a great addition to your portfolio showcasing modern web development practices.
## 🚀 Features
### 🌟 Home Page
- Displays **featured packages** fetched from the NPM registry.
- Provides quick access to detailed views of these packages.### 🔍 Search Functionality
- Integrated search bar in the header to find NPM packages by name or keyword.
- Displays a list of matching packages with descriptions, keywords, and actions.### 📦 Package Details
- A dedicated page for each package with in-depth information:
- **Name** and **description**
- **License type**
- Author details
- Number of maintainers### ⚙️ Advanced Features
- **Dynamic Routing**: Implemented with `React Router` to enable:
- Browsing individual package details (`/packages/:name`)
- Searching packages (`/search?term=your_query`)
- **Reusable Components**: Modular components such as `SearchInput`, `Header`, and `PackageListItem` ensure scalability and maintainability.
- **State Management**: Managed search inputs and navigation using `useState` and `useNavigate`.## 🛠️ Technologies Used
- **React**: For building the UI.
- **React Router**: For implementing routing and navigation.
- **TypeScript**: To add type safety and better development experience.
- **TailwindCSS**: For responsive and modern styling.
- **NPM Registry API**: For fetching package data.## 🗂️ File Structure
```plaintext
src/
├── api/ # API-related functionality
│ ├── queries/ # API query files
│ │ ├── getFeaturedPackages.ts # Fetches featured packages
│ │ ├── getPackage.ts # Fetches details for a single package
│ │ └── searchPackages.ts # Performs a search for packages
│ └── types/ # Type definitions for API responses
│ ├── packageDetails.ts # Type for package details
│ └── packageSummary.ts # Type for package summary
├── components/ # Reusable UI components
│ ├── Header.tsx # Header component with navigation and search
│ ├── PackageListItem.tsx # List item for displaying package summary
│ └── SearchInput.tsx # Search input component
├── pages/ # Page components for routing
│ ├── Root.tsx # Root layout with shared elements
│ ├── details/ # Package details page
│ │ ├── DetailsPage.tsx # Component for displaying package details
│ │ └── detailsLoader.ts # Loader for fetching package details
│ ├── home/ # Home page
│ │ ├── HomePage.tsx # Home page component
│ │ └── homeLoader.ts # Loader for fetching featured packages
│ └── search/ # Search results page
│ ├── SearchPage.tsx # Component for displaying search results
│ ├── searchLoader.ts # Loader for fetching search results
│ └── searchResults.tsx # (Optional) Component for individual search results
├── App.tsx # Main application entry component
├── main.tsx # Application bootstrap and router setup
└── index.css # Tailwind CSS for styling```
## 📸 Screenshots
### Home Page
![image](https://github.com/user-attachments/assets/b7fe6f0b-842e-4ccb-98b1-c3a6870e085b)### Search Results
![image](https://github.com/user-attachments/assets/19e2417f-1b78-46dc-a2de-ed9fee222ae2)### Package Details
![image](https://github.com/user-attachments/assets/3f9c3b5f-4612-4f8d-ae6c-f5eae433571d)