Copy A Repository Or Merge All Repositories
A powerful web application that allows users to efficiently manage GitHub repositories by either forking individual repositories or merging multiple repositories into a single repository with organized folder structure.
Deploy CAROMAR to Netlify with one click:
- Secure GitHub Personal Access Token integration
- User profile validation and display
- Token storage for session persistence
- Search repositories by GitHub username
- Support for both personal and other users' repositories
- Comprehensive repository information display
- Language detection and visual indicators
- Interactive repository grid with checkboxes
- Bulk selection controls (Select All/Deselect All)
- Real-time selection counter and status updates
- Fork each selected repository individually to your GitHub account
- Preserves original repository structure and history
- Batch processing with progress tracking
- Error handling for failed forks
- Creates a new destination repository and provides validated, credential-free local git commands to add each selected repo as its own folder
- Each source repository becomes a main folder
- Maintains separation while creating unified access
- Custom naming for the merged repository
- Real-time progress bars during operations
- Detailed status messages
- Comprehensive results display with success/error reporting
- Direct links to newly created repositories
- Responsive design for desktop and mobile devices
- Modern, clean interface with GitHub-inspired styling
- Intuitive workflow with step-by-step guidance
- Error notifications and success confirmations
- Per-token and per-IP rate limiting on every API route
- Prototype-pollution guard on all request bodies
- Configurable CORS origin allowlist (
ALLOWED_ORIGINS) - Content-Type enforcement on state-changing endpoints
- See SECURITY.md for the full policy
- Node.js (v18 or higher)
- npm (v9 or higher)
- GitHub Personal Access Token
-
Clone the repository:
git clone https://github.com/Universal-Standard/CAROMAR.git cd CAROMAR -
Install dependencies:
npm install
-
Set up environment variables (optional):
cp .env.example .env # Edit .env with your configuration -
Validate deployment configuration:
npm run validate
-
Start the application:
npm start
-
Open your browser: Navigate to
http://localhost:3000
For development with auto-restart on file changes:
npm run devOption 1: One-Click Deploy
- Click the "Deploy to Netlify" button above
- Configure your site name
- Deploy!
Option 2: Manual Deploy with CLI
# Install Netlify CLI
npm install -g netlify-cli
# Login to Netlify
netlify login
# Deploy
netlify deploy --prodOption 3: GitHub Integration
- Push to GitHub
- Connect repository in Netlify Dashboard
- Automatic deployments on every push
π See Netlify Deployment Guide for detailed instructions
- Visit the CAROMAR web application
- Click "Create Personal Access Token" to generate a GitHub token
- Enter your token and click "Validate Token"
- Your GitHub profile will be displayed once validated
- Enter a GitHub username (yours or another user's)
- Click "Search Repositories" to load their repositories
- Browse the repository grid with detailed information
Choose between two operation modes:
Fork Individual Repositories:
- Select repositories you want to fork
- Each will be forked individually to your account
- Maintains original repository structure
Merge into Single Repository:
- Select multiple repositories to combine
- Enter a name for the merged repository
- Creates the destination repository and provides local/manual merge steps for adding each selected repo as a folder
- Select your desired repositories using checkboxes
- Use "Select All" or "Deselect All" for bulk operations
- Click the "Execute" button to start the process
- Monitor progress with real-time status updates
- View detailed results of the operation
- Access direct links to newly created repositories
- For merge operations, complete the provided local/manual git steps before treating the merge as finished
- Review any errors or issues encountered
To use CAROMAR, you need a GitHub Personal Access Token:
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click "Generate new token (classic)"
- Select appropriate scopes:
- β
repo(for repository access) - β
user(for user information)
- β
- Copy the generated token
- Enter it in the CAROMAR application
Security Note: Your token is stored locally in your browser and used only for GitHub API calls. It's never sent to external servers.
The application provides several REST API endpoints:
GET /api/user- Get authenticated user informationGET /api/validate-token- Validate GitHub token and permissions
GET /api/search-repos- Search repositories for a userPOST /api/fork-repo- Fork a specific repositoryPOST /api/create-merged-repo- Create merged repositoryGET /api/repo-content- Get repository content preview
POST /api/analyze-repos- Analyze repository statisticsPOST /api/compare-repos- Compare multiple repositories
GET /api/health- Health check endpointGET /api/metrics- Performance metrics
π See API Documentation for detailed API documentation
- HTML5, CSS3, Vanilla JavaScript
- EJS templating engine
- Responsive design
- Real-time progress tracking
- Node.js (v18+)
- Express.js
- Serverless-ready architecture
- RESTful API design
- Netlify Functions (Serverless)
- Netlify CDN (Static assets)
- GitHub REST API v3 integration
- Jest (Testing)
- ESLint (Linting)
- Nodemon (Development)
CAROMAR/
βββ .github/
β βββ ISSUE_TEMPLATE/ # Bug/feature report templates
β βββ PULL_REQUEST_TEMPLATE.md
β βββ workflows/
β βββ ci.yml # Lint, test, and deployment validation
β βββ codeql.yml # Static security analysis
βββ docs/ # Full documentation set
β βββ README.md # Documentation index
β βββ guides/ # quickstart.md, setup.md, development.md
β βββ deployment/ # netlify.md, environment.md
β βββ api/ # endpoints.md
βββ public/ # Static assets (served from CDN)
β βββ css/
β β βββ style.css # Application styling
β β βββ icons-fallback.css # Icon fallbacks
β βββ js/
β β βββ app.js # Simplified reference frontend
β β βββ enhanced-app.js # Full-featured frontend (used in production)
β βββ robots.txt # SEO crawler rules
β βββ sitemap.xml # SEO sitemap
βββ views/
β βββ index.ejs # Main HTML template
βββ functions/
β βββ server.js # Netlify serverless wrapper
βββ utils/
β βββ analytics.js # Repository analytics
β βββ comparison.js # Repository comparison
β βββ logger.js # Logging utility
β βββ validation.js # Input validation
β βββ performance.js # Performance monitoring
β βββ security.js # Security utilities (rate limiting, sanitization, CORS)
βββ scripts/
β βββ validate-deployment.js # Pre-deploy validation
β βββ monitor-deployment.js # Post-deploy health monitoring
βββ tests/
β βββ app.test.js
β βββ merge-contract.test.js
β βββ security.test.js
β βββ server.test.js
β βββ token-security.test.js
β βββ utils.test.js
βββ server.js # Express application
βββ package.json # Dependencies & scripts
βββ package-lock.json
βββ netlify.toml # Netlify configuration
βββ .nvmrc # Node version
βββ jest.config.js
βββ eslint.config.js
βββ .env.example
βββ .gitignore
βββ README.md # This file
βββ CHANGELOG.md
βββ CONTRIBUTING.md
βββ SECURITY.md
βββ LICENSE
npm start # Start production server
npm run dev # Start development server with auto-reload
npm test # Run tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Generate coverage report
npm run lint # Check code quality
npm run lint:fix # Fix linting issues
npm run build # Build for production
npm run validate # Validate deployment configuration
npm run monitor # Health-check a deployed instance
npm run predeploy # Pre-deployment checks (lint + test)# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Watch mode for development
npm run test:watchWe welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π See CONTRIBUTING.md for detailed guidelines
Quick Links:
- Quick Start Guide - Get started in 5 minutes
- Setup Guide - Detailed installation instructions
- Development Guide - Architecture and development
- API Documentation - Complete API reference
- Netlify Deployment - Deploy to Netlify
- Environment Config - Configuration guide
Project Documentation:
- CONTRIBUTING.md - Contribution guidelines
- SECURITY.md - Security policy
- CHANGELOG.md - Version history
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
-
Check Documentation:
-
Search Issues:
- Check existing issues
-
Create New Issue:
- Report a bug
- Include error messages and steps to reproduce
- GitHub Discussions: Ask questions and share ideas
- Issue Tracker: Report bugs and request features
- GitHub API for repository management capabilities
- Netlify for serverless hosting platform
- Font Awesome for icons
- Express.js for backend framework
- Modern web standards for responsive design
β
Production Ready
β
Deployment Tested
β
Fully Documented
β
Security Hardened (rate limiting, prototype-pollution guard, CORS allowlist, and CSP wired in and exercised by tests β see CHANGELOG.md)
Built with β€οΈ by Universal-Standard