Skip to content

Latest commit

Β 

History

History
348 lines (299 loc) Β· 17.8 KB

File metadata and controls

348 lines (299 loc) Β· 17.8 KB

🌟 Contributing to SortVision 🌟

Help us improve SortVision and make sorting algorithms more visual and intuitive!

Contributions Welcome Platform GitHub Issues Pull Requests License: MIT


πŸ› οΈ How to Contribute

1. Fork the Repository

  • Click the Fork button on the top-right corner of the repository page to create your copy.

2. Clone Your Fork

  • Clone the forked repository to your local machine:
    git clone https://github.com/<your-username>/SortVision.git
  • Replace <your-username> with your GitHub username.

3. Create a New Branch

  • Create a branch for your feature or bug fix:
    git checkout -b feature-name
  • Use a meaningful branch name (e.g., improve-ui, fix-bug-xyz).

4. Make Changes

  • Implement your changes in the codebase.
  • Ensure your code follows best practices and is well-documented.
  • Run tests and verify everything is working.

5. Commit Your Changes

  • Stage and commit your changes:
    git add .
    git commit -m "Describe your changes (e.g., Improved animation speed)"

6. Push to Your Branch

  • Push the changes to your forked repository:
    git push origin feature-name

7. Submit a Pull Request

  • Go to the original repository and click New Pull Request.
  • Select your branch, provide a detailed description of your changes, and submit the pull request.

πŸ“‚ Project Structure

Below is the complete overview of the SortVision project structure:

SortVision/
β”œβ”€ .github/                    # GitHub specific configurations
β”‚  β”œβ”€ ISSUE_TEMPLATE/          # Templates for GitHub issues
β”‚  β”‚  β”œβ”€ bug_report.md         # Bug report template
β”‚  β”‚  β”œβ”€ config.yml            # Issue template configuration
β”‚  β”‚  β”œβ”€ documentation.md      # Documentation request template
β”‚  β”‚  β”œβ”€ feature_request.md    # Feature request template
β”‚  β”‚  └─ performance.md        # Performance issue template
β”‚  β”œβ”€ dependabot.yml           # Dependabot configuration
β”‚  └─ pull_request_template.md # PR template
β”œβ”€ .gitignore                  # Git ignore configuration
β”œβ”€ CODE_OF_CONDUCT.md          # Community code of conduct
β”œβ”€ CONTRIBUTING.md             # Contribution guidelines (this file)
β”œβ”€ LICENSE                     # MIT license file
β”œβ”€ README.md                   # Project documentation
β”œβ”€ SECURITY.md                 # Security policy and reporting
└─ SortVision/                 # Main application directory
   β”œβ”€ .env.example             # Environment variables template
   β”œβ”€ Dockerfile               # Docker containerization config
   β”œβ”€ api/                     # API endpoints
   β”‚  └─ gemini.js             # Gemini AI API integration
   β”œβ”€ components.json          # Component configuration
   β”œβ”€ docker-compose.yml       # Docker Compose configuration
   β”œβ”€ eslint.config.js         # ESLint configuration
   β”œβ”€ jsconfig.json            # JavaScript configuration
   β”œβ”€ next.config.mjs          # Next.js configuration
   β”œβ”€ nginx.conf               # Nginx configuration
   β”œβ”€ package-lock.json        # NPM package lock
   β”œβ”€ package.json             # NPM package definition
   β”œβ”€ pnpm-lock.yaml           # PNPM package lock
   β”œβ”€ postcss.config.mjs       # PostCSS configuration
   β”œβ”€ public/                  # Public static assets
   β”‚  β”œβ”€ code/                 # Algorithm implementations in multiple languages
   β”‚  β”‚  β”œβ”€ bubble/            # Bubble Sort implementations
   β”‚  β”‚  β”‚  β”œβ”€ c/              # C implementation
   β”‚  β”‚  β”‚  β”œβ”€ cpp/            # C++ implementation
   β”‚  β”‚  β”‚  β”œβ”€ csharp/         # C# implementation
   β”‚  β”‚  β”‚  β”œβ”€ dart/           # Dart implementation
   β”‚  β”‚  β”‚  β”œβ”€ golang/         # Go implementation
   β”‚  β”‚  β”‚  β”œβ”€ haskell/        # Haskell implementation
   β”‚  β”‚  β”‚  β”œβ”€ java/           # Java implementation
   β”‚  β”‚  β”‚  β”œβ”€ javascript/     # JavaScript implementation
   β”‚  β”‚  β”‚  β”œβ”€ julia/          # Julia implementation
   β”‚  β”‚  β”‚  β”œβ”€ kotlin/         # Kotlin implementation
   β”‚  β”‚  β”‚  β”œβ”€ lua/            # Lua implementation
   β”‚  β”‚  β”‚  β”œβ”€ php/            # PHP implementation
   β”‚  β”‚  β”‚  β”œβ”€ pseudocode/     # Pseudocode representation
   β”‚  β”‚  β”‚  β”œβ”€ python/         # Python implementation
   β”‚  β”‚  β”‚  β”œβ”€ r/              # R implementation
   β”‚  β”‚  β”‚  β”œβ”€ ruby/           # Ruby implementation
   β”‚  β”‚  β”‚  β”œβ”€ rust/           # Rust implementation
   β”‚  β”‚  β”‚  β”œβ”€ scala/          # Scala implementation
   β”‚  β”‚  β”‚  β”œβ”€ swift/          # Swift implementation
   β”‚  β”‚  β”‚  └─ typescript/     # TypeScript implementation
   β”‚  β”‚  β”œβ”€ bucket/            # Bucket Sort implementations (same language structure)
   β”‚  β”‚  β”œβ”€ heap/              # Heap Sort implementations (same language structure)
   β”‚  β”‚  β”œβ”€ insertion/         # Insertion Sort implementations (same language structure)
   β”‚  β”‚  β”œβ”€ merge/             # Merge Sort implementations (same language structure)
   β”‚  β”‚  β”œβ”€ quick/             # Quick Sort implementations (same language structure)
   β”‚  β”‚  β”œβ”€ radix/             # Radix Sort implementations (same language structure)
   β”‚  β”‚  └─ selection/         # Selection Sort implementations (same language structure)
   β”‚  β”œβ”€ devTools/             # Developer tools directory
   β”‚  β”‚  β”œβ”€ core.js            # Core utilities and initialization
   β”‚  β”‚  β”œβ”€ device-info.js     # Device detection and information
   β”‚  β”‚  β”œβ”€ index.js           # Main entry point for debug tools
   β”‚  β”‚  β”œβ”€ monitoring.js      # Performance monitoring utilities
   β”‚  β”‚  β”œβ”€ performance.js     # Performance metrics tracking
   β”‚  β”‚  └─ ui.js              # Debug UI components and panel
   β”‚  β”œβ”€ favicon.svg           # Site favicon
   β”‚  β”œβ”€ google12e2679e2ea95334.html # Google site verification
   β”‚  β”œβ”€ manifest.json         # PWA manifest
   β”‚  β”œβ”€ mobile.css            # Mobile-specific styles
   β”‚  β”œβ”€ og-image.png          # Open Graph image for sharing
   β”‚  β”œβ”€ robots.txt            # Search engine crawling instructions
   β”‚  β”œβ”€ sitemap.xml           # Site map for search engines
   β”‚  β”œβ”€ splash.svg            # App splash screen
   β”‚  β”œβ”€ sw.js                 # Service worker for offline support
   β”‚  └─ twitter-image.png     # Twitter card image
   β”œβ”€ scripts/                 # Build and utility scripts
   β”‚  └─ generate-sitemap.js   # Sitemap generator
   β”œβ”€ server/                  # Backend server directory
   β”‚  └─ index.js              # Express server for API proxy
   β”œβ”€ src/                     # Source code directory
   β”‚  β”œβ”€ App.css               # App-level styles
   β”‚  β”œβ”€ App.jsx               # Main App component
   β”‚  β”œβ”€ algorithms/           # Sorting algorithm implementations
   β”‚  β”‚  β”œβ”€ bubbleSort.jsx     # Bubble sort implementation
   β”‚  β”‚  β”œβ”€ bucketSort.jsx     # Bucket sort implementation
   β”‚  β”‚  β”œβ”€ heapSort.jsx       # Heap sort implementation
   β”‚  β”‚  β”œβ”€ index.js           # Algorithm exports
   β”‚  β”‚  β”œβ”€ insertionSort.jsx  # Insertion sort implementation
   β”‚  β”‚  β”œβ”€ mergeSort.jsx      # Merge sort implementation
   β”‚  β”‚  β”œβ”€ quickSort.jsx      # Quick sort implementation
   β”‚  β”‚  β”œβ”€ radixSort.jsx      # Radix sort implementation
   β”‚  β”‚  └─ selectionSort.jsx  # Selection sort implementation
   β”‚  β”œβ”€ app/                  # Next.js App Router directory
   β”‚  β”‚  β”œβ”€ [[...slug]]/       # Dynamic catch-all route
   β”‚  β”‚  β”‚  β”œβ”€ client.jsx      # Client-side component
   β”‚  β”‚  β”‚  └─ page.jsx        # Page component with SEO metadata
   β”‚  β”‚  β”œβ”€ favicon.svg        # App favicon
   β”‚  β”‚  β”œβ”€ globals.css        # Global CSS styles
   β”‚  β”‚  └─ layout.jsx         # Root layout component
   β”‚  β”œβ”€ components/           # UI components
   β”‚  β”‚  β”œβ”€ MobileOverlay.jsx  # Mobile device support
   β”‚  β”‚  β”œβ”€ SEOContent.jsx     # SEO content component
   β”‚  β”‚  β”œβ”€ SortingVisualizer.jsx # Main visualization component
   β”‚  β”‚  β”œβ”€ chatbot/           # AI Chatbot components
   β”‚  β”‚  β”‚  β”œβ”€ ChatAssistant.jsx # Main chatbot component
   β”‚  β”‚  β”‚  β”œβ”€ ChatButton.jsx  # Chat button trigger
   β”‚  β”‚  β”‚  β”œβ”€ ChatModal.jsx   # Chat modal dialog
   β”‚  β”‚  β”‚  β”œβ”€ assistantEngine.js # AI engine logic with offline knowledge
   β”‚  β”‚  β”‚  └─ index.js        # Chatbot exports
   β”‚  β”‚  β”œβ”€ feedback/          # User feedback system
   β”‚  β”‚  β”‚  β”œβ”€ FeedbackButton.jsx # Feedback button
   β”‚  β”‚  β”‚  β”œβ”€ FeedbackForm.jsx # Feedback form
   β”‚  β”‚  β”‚  β”œβ”€ FeedbackModal.jsx # Feedback modal
   β”‚  β”‚  β”‚  β”œβ”€ githubService.js # GitHub integration for feedback
   β”‚  β”‚  β”‚  β”œβ”€ index.js        # Feedback exports
   β”‚  β”‚  β”‚  └─ locationService.js # Location detection service
   β”‚  β”‚  β”œβ”€ panels/            # UI panels directory
   β”‚  β”‚  β”‚  β”œβ”€ ConfigPanel.jsx # Configuration panel
   β”‚  β”‚  β”‚  β”œβ”€ ContributionPanel.jsx # Contribution information panel
   β”‚  β”‚  β”‚  β”œβ”€ DetailsPanel.jsx # Algorithm details panel
   β”‚  β”‚  β”‚  β”œβ”€ MetricsPanel.jsx # Performance metrics panel
   β”‚  β”‚  β”‚  β”œβ”€ config/         # Configuration components
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ AlgorithmSelector.jsx # Algorithm selection
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ ArraySizeControl.jsx # Array size controls
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ ComplexityInfo.jsx # Complexity information display
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ ControlButtons.jsx # Control buttons (play/pause/reset)
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ SpeedControl.jsx # Animation speed control
   β”‚  β”‚  β”‚  β”‚  └─ index.js     # Config component exports
   β”‚  β”‚  β”‚  β”œβ”€ contributions/  # Contribution-related components
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ guide/       # Contribution guides
   β”‚  β”‚  β”‚  β”‚  β”‚  β”œβ”€ BestPractices.jsx # Best practices guide
   β”‚  β”‚  β”‚  β”‚  β”‚  β”œβ”€ ContributeGuide.jsx # How to contribute guide
   β”‚  β”‚  β”‚  β”‚  β”‚  β”œβ”€ QuickReferences.jsx # Quick reference guide
   β”‚  β”‚  β”‚  β”‚  β”‚  └─ index.js  # Guide component exports
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ index.js     # Contribution component exports
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ overview/    # Contribution overview
   β”‚  β”‚  β”‚  β”‚  β”‚  β”œβ”€ ContributorList.jsx # List of contributors
   β”‚  β”‚  β”‚  β”‚  β”‚  β”œβ”€ ContributorStats.jsx # Contributor statistics
   β”‚  β”‚  β”‚  β”‚  β”‚  β”œβ”€ RepositoryHealth.jsx # Repository health metrics
   β”‚  β”‚  β”‚  β”‚  β”‚  └─ index.js  # Overview component exports
   β”‚  β”‚  β”‚  β”‚  └─ ssoc/        # SSOC leaderboard system
   β”‚  β”‚  β”‚  β”‚     β”œβ”€ ExportButton.jsx # Data export functionality
   β”‚  β”‚  β”‚  β”‚     β”œβ”€ LeaderboardList.jsx # Leaderboard display
   β”‚  β”‚  β”‚  β”‚     β”œβ”€ LeaderboardRow.jsx # Individual row component
   β”‚  β”‚  β”‚  β”‚     β”œβ”€ config.js # Configuration settings
   β”‚  β”‚  β”‚  β”‚     β”œβ”€ exportService.js # Export service logic
   β”‚  β”‚  β”‚  β”‚     β”œβ”€ githubService.js # GitHub API integration
   β”‚  β”‚  β”‚  β”‚     └─ index.js  # SSOC exports
   β”‚  β”‚  β”‚  β”œβ”€ details/        # Detail components
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ AlgorithmDetails.jsx # Algorithm detail display
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ AlgorithmInfo.jsx # Algorithm information
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ AlgorithmSelector.jsx # Algorithm selection
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ DataPanel.jsx # Data display panel
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ FunFact.jsx  # Fun facts about algorithms
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ InteractiveTip.jsx # Interactive tips
   β”‚  β”‚  β”‚  β”‚  β”œβ”€ LanguageSelector.jsx # Programming language selector
   β”‚  β”‚  β”‚  β”‚  └─ index.js     # Detail component exports
   β”‚  β”‚  β”‚  β”œβ”€ index.js        # Panel component exports
   β”‚  β”‚  β”‚  └─ metrics/        # Metric components
   β”‚  β”‚  β”‚     β”œβ”€ AlgorithmComparison.jsx # Algorithm comparisons
   β”‚  β”‚  β”‚     β”œβ”€ CurrentRunMetrics.jsx # Current run metrics
   β”‚  β”‚  β”‚     β”œβ”€ RankingCard.jsx # Algorithm ranking display
   β”‚  β”‚  β”‚     β”œβ”€ TestControls.jsx # Testing controls
   β”‚  β”‚  β”‚     β”œβ”€ WinnerSummary.jsx # Algorithm comparison results
   β”‚  β”‚  β”‚     └─ index.js     # Metric component exports
   β”‚  β”‚  β”œβ”€ settings/          # Application settings
   β”‚  β”‚  β”‚  β”œβ”€ SettingsButton.jsx # Settings button
   β”‚  β”‚  β”‚  β”œβ”€ SettingsForm.jsx # Settings form
   β”‚  β”‚  β”‚  β”œβ”€ SettingsModal.jsx # Settings modal
   β”‚  β”‚  β”‚  └─ index.js        # Settings exports
   β”‚  β”‚  β”œβ”€ sortingVisualizer/ # Visualization components
   β”‚  β”‚  β”‚  β”œβ”€ AudioControls.jsx # Audio control components
   β”‚  β”‚  β”‚  β”œβ”€ PerformanceMetrics.jsx # Performance display
   β”‚  β”‚  β”‚  β”œβ”€ SortingControls.jsx # Sorting control buttons
   β”‚  β”‚  β”‚  β”œβ”€ SortingHeader.jsx # Visualization header
   β”‚  β”‚  β”‚  β”œβ”€ SortingVisualizer.jsx # Main visualizer
   β”‚  β”‚  β”‚  └─ index.js        # Visualizer component exports
   β”‚  β”‚  β”œβ”€ ui/                # UI component library
   β”‚  β”‚  β”‚  β”œβ”€ VolumeControl.jsx # Volume control component
   β”‚  β”‚  β”‚  β”œβ”€ badge.jsx       # Badge component
   β”‚  β”‚  β”‚  β”œβ”€ button.jsx      # Button component
   β”‚  β”‚  β”‚  β”œβ”€ card.jsx        # Card component
   β”‚  β”‚  β”‚  β”œβ”€ input.jsx       # Input component
   β”‚  β”‚  β”‚  β”œβ”€ select.jsx      # Select dropdown component
   β”‚  β”‚  β”‚  β”œβ”€ slider.jsx      # Slider component
   β”‚  β”‚  β”‚  └─ tabs.jsx        # Tabs component
   β”‚  β”‚  └─ visualizations/    # Visualization components
   β”‚  β”‚     β”œβ”€ ArrayVisualization.jsx # Array visual representation
   β”‚  β”‚     └─ index.js        # Visualization component exports
   β”‚  β”œβ”€ context/              # React Context providers
   β”‚  β”‚  └─ AlgorithmState.jsx # Algorithm state management
   β”‚  β”œβ”€ hooks/                # Custom React hooks
   β”‚  β”‚  └─ useAudio.js        # Audio management hook
   β”‚  β”œβ”€ index.css             # Global styles
   β”‚  β”œβ”€ lib/                  # Library utilities
   β”‚  β”‚  └─ utils.js           # Shared utility functions
   β”‚  └─ utils/                # Utility modules
   β”‚     β”œβ”€ audioEngine.js     # Audio engine for sound effects
   β”‚     β”œβ”€ seo.js             # SEO optimization utilities
   β”‚     β”œβ”€ soundEffects.js    # Sound effect definitions
   β”‚     └─ themeUtils.js      # Theme management utilities
   └─ vercel.json              # Vercel deployment configuration

πŸ“ Key Areas for Contributors:

🎯 Algorithm Development (src/algorithms/ & public/code/)

  • Visualization Logic: Implement step-by-step algorithm execution in JSX files
  • Multi-Language Support: Add implementations in 20+ programming languages
  • Algorithm Optimization: Improve performance and add new sorting algorithms

πŸ€– AI Features (src/components/chatbot/)

  • Knowledge Base: Expand algorithm knowledge in assistantEngine.js
  • Query Understanding: Improve natural language processing
  • Response Generation: Enhance contextual responses

πŸ“Š Data Visualization (src/components/panels/)

  • Metrics Display: Enhance performance tracking and comparison
  • UI Panels: Improve user interface components
  • Interactive Elements: Add new interactive features

πŸ”§ Developer Experience (public/devTools/)

  • Performance Monitoring: Enhance debugging tools
  • Device Detection: Improve cross-platform compatibility
  • Development Utils: Add new developer utilities

🌐 Backend Integration (server/ & api/)

  • API Development: Expand server capabilities
  • External Services: Add new integrations
  • Data Management: Improve data handling

Why This Structure?

  • πŸš€ Scalable β†’ Modular design supports easy feature additions
  • πŸ”§ Maintainable β†’ Clear separation of concerns
  • 🎯 Educational β†’ Comprehensive algorithm implementations
  • 🀝 Collaborative β†’ Well-organized for team development
  • 🌍 Accessible β†’ Multi-language support for global learning

🀝 Code of Conduct

By contributing to this project, you agree to abide by our Code of Conduct. Be respectful, inclusive, and collaborative in all interactions.


πŸ’‘ Tips for Contributing

  1. Check the Issues tab for open feature requests or bug reports.
  2. Keep your commits small and focused on a single change.
  3. Avoid committing unnecessary files.
  4. Regularly sync your fork with the main repository:
    git pull upstream main

πŸ› οΈ Need Help?

If you have any questions:

  1. Open an Issue in the repository.
  2. Contact the maintainers via the repository discussion section.

Thank you for contributing to SortVision! πŸŽ‰ Let's make sorting visual, interactive, and fun! πŸš€