Skip to content

whitestranger7/react-native-inspect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

React Native Inspect

A powerful CLI tool for analyzing React Native projects, generating comprehensive reports with recommendations and analysis. Get insights into your dependencies, security vulnerabilities, and React Native specific configurations with a beautiful, modern HTML report interface.

โœจ Features

  • ๐Ÿ“ฆ Advanced Dependency Analysis: Check for outdated packages, available updates, and major version changes
  • ๐Ÿ”’ Security Audit: Comprehensive vulnerability scanning with detailed reporting and severity levels
  • ๐Ÿ“Š Modern HTML Reports: Beautiful, responsive reports with drawer-based navigation and interactive elements
  • โš›๏ธ React Native Specific Analysis: Architecture detection, version compatibility, and New Architecture status
  • ๐Ÿ”ง Multiple Package Manager Support: Seamless integration with npm, yarn, and pnpm
  • ๐Ÿ“ฑ Mobile-First Design: Responsive report interface optimized for all devices
  • โŒจ๏ธ Keyboard Navigation: Quick navigation with keyboard shortcuts
  • ๐ŸŽจ Modern UI/UX: Clean, professional interface with smooth animations and intuitive design

๐ŸŽฏ HTML Report Features

The generated HTML report includes a modern drawer-based interface with:

  • ๐Ÿ“ฆ Dependencies Analysis (opens by default): Interactive table with outdated packages, update types, and NPM links
  • ๐Ÿ”’ Security Audit: Vulnerability breakdown with severity levels and detailed information
  • โš›๏ธ React Native: Architecture analysis, version compatibility, and configuration insights
  • ๐Ÿ“Š Summary: Project health overview with actionable recommendations

Navigation & Interactions

  • Drawer Navigation: Clean sidebar with section indicators and badges
  • Mobile Responsive: Collapsible drawer with touch-friendly interface
  • Keyboard Shortcuts: Ctrl/Cmd + 1-4 to switch sections, Escape to close mobile drawer
  • Interactive Tables: Sortable columns with hover effects and external links
  • Real-time Indicators: Live status badges and progress indicators

๐Ÿš€ Requirements

  • Bun runtime (v1.0.0 or higher)

๐Ÿ“ฆ Installation

Install Bun (if not already installed)

curl -fsSL https://bun.sh/install | bash

Recommended: Global Installation

npm install -g react-native-inspect

One-time Usage

npx react-native-inspect

๐Ÿ’ป Usage

Basic Analysis

# Analyze current directory
react-native-inspect

# Analyze specific project
react-native-inspect /path/to/project

What Happens During Analysis

  1. ๐Ÿ” Project Detection: Automatically detects package manager (npm/yarn/pnpm)
  2. ๐Ÿ“ฆ Dependency Analysis: Scans for outdated packages and categorizes update types
  3. ๐Ÿ”’ Security Audit: Runs vulnerability scan using lockfiles
  4. โš›๏ธ React Native Analysis: Detects RN project and analyzes architecture
  5. ๐Ÿ“Š Report Generation: Creates beautiful HTML report with all findings
  6. ๐ŸŒ Auto-Open: Automatically opens report in your default browser

Sample Output

๐Ÿ” React Native Inspect - Starting Analysis...
โœ“ All dependencies are up to date!
โš  Security audit found 3 vulnerabilities (0 critical, 1 high)
โœ“ React Native New Architecture is enabled
โœ“ Report generated: /path/to/react-native-inspect-report.html
โœ“ Report opened in browser
โœ… React Native Inspect completed successfully!

๐Ÿ—๏ธ Project Structure

src/
โ”œโ”€โ”€ cli/                          # CLI interface and commands
โ”‚   โ”œโ”€โ”€ commands/                 # Command implementations
โ”‚   โ”‚   โ”œโ”€โ”€ analyze.ts           # Project analysis orchestration
โ”‚   โ”‚   โ””โ”€โ”€ report.ts            # Report generation and browser opening
โ”‚   โ””โ”€โ”€ index.ts                 # CLI entry point and workflow
โ”œโ”€โ”€ core/                         # Core business logic
โ”‚   โ”œโ”€โ”€ analyzers/               # Analysis modules
โ”‚   โ”‚   โ”œโ”€โ”€ dependencies/        # Dependency and security analysis
โ”‚   โ”‚   โ”œโ”€โ”€ react-native/        # RN-specific analysis and architecture detection
โ”‚   โ”‚   โ””โ”€โ”€ security/            # Vulnerability scanning and audit
โ”‚   โ”œโ”€โ”€ report/                  # Report generation system
โ”‚   โ”‚   โ”œโ”€โ”€ generators/html/     # Modern HTML report generator
โ”‚   โ”‚   โ””โ”€โ”€ templates/           # HTML, CSS, and JS templates
โ”‚   โ”‚       โ”œโ”€โ”€ web/             # HTML template with drawer design
โ”‚   โ”‚       โ”œโ”€โ”€ styles/          # Modern CSS with responsive design
โ”‚   โ”‚       โ””โ”€โ”€ js/              # Interactive JavaScript features
โ”‚   โ””โ”€โ”€ project/                 # Project detection and parsing
โ”œโ”€โ”€ utils/                       # Shared utilities
โ”‚   โ”œโ”€โ”€ logger.ts               # Enhanced logging with colors
โ”‚   โ””โ”€โ”€ spinner.ts              # Progress indicators and status
โ”œโ”€โ”€ types/                       # TypeScript type definitions
โ””โ”€โ”€ tests/                      # Test suites

๐Ÿ—บ๏ธ Roadmap

โœ… Completed

  • Advanced package.json analysis with detailed outdated package detection
  • Comprehensive security audit integration with severity categorization
  • Modern HTML report generation with drawer-based navigation
  • React Native version compatibility and New Architecture analysis
  • Responsive design with mobile-first approach
  • Interactive tables with sorting and external links
  • Keyboard navigation and accessibility features
  • Auto-browser opening and cross-platform support

๐Ÿšง In Progress

  • Packages replacement recommendation for better options
  • Peer dependency analysis and compatibility checking
  • Performance recommendations based on bundle analysis
  • Migration guides and helpful documentation links
  • JSON and Markdown report formats
  • CI/CD integration and automated reporting

๐Ÿ”ฎ Planned

  • Custom report themes and branding options
  • Plugin system for custom analyzers
  • Historical analysis and trend tracking
  • Team collaboration features
  • Integration with popular development tools

๐Ÿ› ๏ธ Development

# Install dependencies
bun install

# Run in development mode
bun run dev

# Build for production
bun run build

# Run tests
bun test

๐Ÿค Contributing

We welcome contributions! Whether it's bug reports, feature requests, or code contributions, please check out our contributing guidelines and feel free to submit pull requests.

๐Ÿ“„ License

MIT License - see LICENSE file for details.


Built with โค๏ธ for the React Native community

๐Ÿ› Report Bug โ€ข โœจ Request Feature โ€ข ๐Ÿค Contribute

About

A powerful CLI tool for analyzing React Native projects, generating comprehensive reports with recommendations and analysis.

Resources

License

Contributing

Stars

Watchers

Forks