Skip to content

Automate developer onboarding: paste a GitHub URL, get a working Docker environment in minutes. MERN stack + Docker automation

Notifications You must be signed in to change notification settings

aayush-1o/Onboarder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Onboarder

Automated Developer Environment Setup Tool

Transform hours of onboarding into minutes with intelligent automation

MIT License Node.js MongoDB React

FeaturesQuick StartAPI DocsRoadmap


📋 Project Status

Current Phase Day 6 Complete ✅
MVP Timeline 10 Days (60% Complete)
Tech Stack MERN Stack + Docker
Version 0.6.0 (Day 6)

🎯 The Problem

When developers join a new project, they waste hours on:

  • 🔧 Installing dependencies manually
  • ⚙️ Configuring development tools
  • 🐛 Debugging environment issues
  • 🔄 Getting the application to run locally

This shouldn't be so hard.

💡 The Solution

Onboarder automates the entire onboarding process:

graph LR
    A[Paste GitHub URL] --> B[Analyze Project]
    B --> C[Generate Docker Setup]
    C --> D[One-Click Run]
    D --> E[🎉 Ready to Code!]
    
    style A fill:#4CAF50
    style E fill:#2196F3
Loading
  1. 📋 Paste a GitHub repository URL
  2. 🔍 Analyze project structure and dependencies automatically
  3. 🐳 Generate Docker environment configuration
  4. ▶️ Run with a single click
  5. Code immediately in a working environment

✨ Key Features

Currently Implemented (Days 1-6)

Feature Description Status
🗂️ Project Management Create, track, and manage onboarding projects ✅ Complete
📦 Repository Cloning Clone GitHub repos with progress tracking ✅ Complete
🔄 Background Jobs Async processing with retry mechanism ✅ Complete
📊 Real-time Logs Track every step of the onboarding process ✅ Complete
🌐 REST API Full-featured API with 23+ endpoints ✅ Complete
💾 Workspace Management Organized file system with size limits ✅ Complete
🔍 Code Analysis Detect languages, frameworks, and dependencies ✅ Complete
🏷️ Tech Stack Detection Identify 20+ languages, 15+ frameworks ✅ Complete
📦 Dependency Parsing Parse npm, pip, maven, go, gem, composer, nuget ✅ Complete
🐳 Dockerfile Generation Auto-generate production-ready Dockerfiles ✅ Complete
📝 Multi-Stage Builds Optimized Docker images with security best practices ✅ Complete
🎼 Docker Compose Multi-service orchestration with databases & caches ✅ Complete
💾 Service Detection Auto-detect MongoDB, PostgreSQL, MySQL, Redis ✅ Complete

Coming Soon (Days 7-10)

Feature Description Timeline
🐳 Container Management Docker build & run commands Day 7
🎨 Web UI Visual interface for management Days 8-9
🚀 One-Click Launch Complete environment deployment Day 10

🛠️ Technology Stack

Backend

  • Node.js 18+ - Runtime
  • 🚂 Express.js - Web framework
  • 🍃 MongoDB - Database
  • 📦 Mongoose - ODM
  • 🔄 Axios - HTTP client
  • 🆔 UUID - Job tracking

Frontend

  • ⚛️ React 18 - UI library
  • Vite - Build tool
  • 🎨 Tailwind CSS - Styling
  • 🔌 Axios - API client
  • 🎯 React Router - Navigation

Infrastructure

  • 🐳 Docker - Containerization
  • 🎼 Docker Compose - Orchestration
  • 🔧 Git - Repository cloning
  • 📁 File System - Workspace management

🚀 Quick Start

Prerequisites

Ensure you have these installed:

Installation

# 1. Clone the repository
git clone https://github.com/aayush-1o/Onboarder.git
cd Onboarder

# 2. Install backend dependencies
npm install

# 3. Install frontend dependencies
cd frontend
npm install
cd ..

# 4. Set up environment variables
cp .env.example .env
# Edit .env and add your MongoDB URI and GitHub token (optional)

# 5. Start MongoDB (if using local instance)
mongod

Running the Application

Terminal 1 - Backend Server:

npm run dev
# Server runs on http://localhost:5000

Terminal 2 - Frontend (Optional for Day 1-3):

cd frontend
npm run dev
# Frontend runs on http://localhost:3000

Verify Installation

Test the backend API:

Invoke-RestMethod -Uri "http://localhost:5000/api/health"

Expected Response:

{
  "status": "OK",
  "message": "Onboarder Backend is running",
  "database": "Connected"
}

🎬 Quick Demo

Clone Your First Repository

# Create a new project
$body = '{"repoUrl": "https://github.com/octocat/Hello-World"}'
Invoke-RestMethod -Uri "http://localhost:5000/api/projects" `
  -Method POST -Body $body -ContentType "application/json"

# Response includes:
# - Project ID
# - Job ID for tracking
# - Clone status

Track Progress

# Check clone status (replace {id} with your project ID)
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/clone-status"

# Get workspace information
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/workspace"

See full testing guide: DAY3_TESTING_GUIDE.md

Day 4: Analyze Tech Stack (New!)

# After cloning, analysis runs automatically
# Get complete analysis results
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/analysis"

# Get just the tech stack summary
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/tech-stack"

# Get dependencies
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/dependencies"

Example Output:

{
  "primaryLanguage": "JavaScript",
  "languages": [
    { "name": "JavaScript", "percentage": 85.5 }
  ],
  "frameworks": ["Express.js", "React"],
  "databases": ["MongoDB"],
  "dependencies": 24
}

Supported Technologies:

  • Languages: JavaScript, TypeScript, Python, Java, Go, Ruby, PHP, C#, C++, Rust, Swift, Kotlin, and 8 more
  • Frameworks: Express, React, Next.js, Django, Flask, Spring Boot, Rails, Laravel, and 7 more
  • Package Managers: npm, pip, maven, gradle, go modules, gem, composer

See Day 4 testing guide: DAY4_TESTING_GUIDE.md

Day 5: Generate Dockerfile (New!)

# Dockerfile is auto-generated after analysis
# Get the generated Dockerfile
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/dockerfile"

# Get Docker configuration (port, env vars, etc.)
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/docker-config"

# Manually trigger Dockerfile generation
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/generate-dockerfile" -Method POST

Example Generated Dockerfile:

FROM node:18-alpine AS deps
WORKDIR /app
COPY package*.json ./
RUN npm ci

FROM node:18-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=deps /app/node_modules ./node_modules
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]

Features:

  • Multi-stage builds for minimal image size
  • 7 language templates: Node.js, Python, Java, Go, Ruby, PHP
  • Security: Non-root user, minimal base images
  • Health checks: Framework-specific endpoints
  • Auto-detection: Package managers (npm/yarn/pnpm), build tools

See Day 5 testing guide: DAY5_TESTING_GUIDE.md


📡 API Reference

Core Endpoints

Method Endpoint Description
GET /api/health System health check
POST /api/projects Create project & trigger clone
GET /api/projects List all projects (paginated)
GET /api/projects/:id Get project details
DELETE /api/projects/:id Delete project + cleanup

Cloning & Workspace

Method Endpoint Description
GET /api/projects/:id/clone-status Real-time clone progress
POST /api/projects/:id/reclone Re-clone repository
GET /api/projects/:id/workspace Workspace info & size

Code Analysis (Day 4)

Method Endpoint Description
GET /api/projects/:id/analysis Complete code analysis results
POST /api/projects/:id/analyze Trigger manual analysis
GET /api/projects/:id/dependencies Get dependency list
GET /api/projects/:id/tech-stack Get tech stack summary

router.get('/:id/tech-stack', asyncHandler(async (req, res) => {

Dockerfile Generation (Day 5)

Method Endpoint Description
GET /api/projects/:id/dockerfile Get generated Dockerfile content
POST /api/projects/:id/generate-dockerfile Manually trigger Dockerfile generation
PUT /api/projects/:id/dockerfile Update Dockerfile with custom content
GET /api/projects/:id/docker-config Get Docker config (port, env vars, volumes)

Logs & Status

Method Endpoint Description
GET /api/projects/:id/logs Build & operation logs
PATCH /api/projects/:id/status Update project status

Full API documentation: API_TESTING.md


📁 Project Structure

onboarder/
├── 📂 src/                     # Backend source code
│   ├── 📂 config/              # Configuration files
│   ├── 📂 middleware/          # Express middlewares
│   ├── 📂 models/              # MongoDB schemas
│   │   ├── Project.js          # Project model with clone tracking
│   │   └── BuildLog.js         # Build logs model
│   ├── 📂 routes/              # API route definitions
│   │   └── projectRoutes.js    # Project endpoints
│   ├── 📂 services/            # Business logic layer
│   │   ├── githubService.js    # GitHub API integration
│   │   ├── repoCloneService.js # ✨ Git cloning (Day 3)
│   │   ├── jobQueue.js         # ✨ Background jobs (Day 3)
│   │   ├── projectService.js   # ✨ Project orchestration (Day 3)
│   │   └── codeAnalysisService.js # ⚡ Code analysis (Day 4)
│   ├── 📂 parsers/             # ⚡ Dependency parsers (Day 4)
│   │   └── dependencyParser.js # Parse npm, pip, maven, etc.
│   ├── 📂 utils/               # Utility functions
│   │   ├── asyncHandler.js     # Async error handling
│   │   ├── fileSystem.js       # ✨ File operations (Day 3)
│   │   ├── languageDetector.js # ⚡ Language detection (Day 4)
│   │   └── frameworkDetector.js # ⚡ Framework detection (Day 4)
│   └── 📄 server.js            # Express app entry point
│
├── 📂 frontend/                # React frontend (WIP)
│   ├── 📂 src/
│   │   ├── 📂 components/      # Reusable UI components
│   │   ├── 📂 pages/           # Page components
│   │   ├── 📂 services/        # API service layer
│   │   └── 📄 App.jsx          # Main application
│   └── 📄 vite.config.js
│
├── 📂 workspace/               # ✨ Cloned repositories (Day 3)
│   ├── 📂 projects/            # Project workspaces
│   └── 📂 temp/                # Temporary files
│
├── 📄 workspace.config.js      # ✨ Workspace settings (Day 3)
├── 📄 .env.example             # Environment template
├── 📄 package.json             # Dependencies
└── 📄 README.md                # You are here!

🛣️ Development Roadmap

✅ Day 1: Foundation (Complete)

  • Project initialization & structure
  • Express.js backend setup
  • React + Vite frontend setup
  • MongoDB integration
  • Tailwind CSS styling

✅ Day 2: Backend API & Database (Complete)

  • MongoDB schemas (Project, BuildLog)
  • REST API endpoints
  • GitHub API integration
  • Input validation & error handling
  • API testing documentation

✅ Day 3: Repository Cloning (Complete)

  • Workspace directory management
  • Git repository cloning service
  • File system utilities
  • Background job queue system
  • Clone status tracking
  • API integration for workspace

✅ Day 4: Code Analysis (Completed)

  • Technology stack detection
  • Programming language identification (20+ languages)
  • Framework detection (15+ frameworks)
  • Dependency file parsing (7 ecosystems)

📋 Day 5: Dependency Management

  • Package.json analysis (Node.js)
  • Requirements.txt parsing (Python)
  • pom.xml/build.gradle (Java)
  • Gemfile (Ruby)
  • go.mod (Go)

🐳 Day 6-7: Docker Generation

  • Dockerfile template generation
  • Docker Compose configuration
  • Multi-service support
  • Environment variable handling

🎨 Day 8-9: Frontend UI

  • Project dashboard
  • Clone progress visualization
  • Log viewer interface
  • One-click setup button

🚀 Day 10: Final Integration

  • Container building
  • Container execution
  • End-to-end testing
  • Production deployment

⚙️ Configuration

Environment Variables

Create a .env file in the project root:

# Server Configuration
PORT=5000
NODE_ENV=development

# Database
MONGODB_URI=mongodb://localhost:27017/onboarder

# GitHub API (Optional - for enhanced features)
GITHUB_TOKEN=your_github_personal_access_token

# Frontend
FRONTEND_URL=http://localhost:3000

# Workspace Configuration (Day 3)
WORKSPACE_ROOT=./workspace
WORKSPACE_MAX_SIZE_MB=5000           # Max total workspace size
GIT_CLONE_TIMEOUT_MS=300000          # 5-minute clone timeout
MAX_CONCURRENT_JOBS=3                # Parallel clone jobs
JOB_RETRY_ATTEMPTS=2                 # Retry failed clones

Workspace Settings

Configure workspace behavior in workspace.config.js:

module.exports = {
  maxWorkspaceSizeMB: 5000,    // Total workspace limit
  maxProjectSizeMB: 1000,      // Per-project limit
  cleanupOlderThanDays: 30,    // Auto-cleanup threshold
  useShallowClone: false       // Enable for --depth 1 clones
};

🧪 Testing

Health Check

Invoke-RestMethod -Uri "http://localhost:5000/api/health"

Create Project

$body = '{"repoUrl": "https://github.com/facebook/react"}'
Invoke-RestMethod -Uri "http://localhost:5000/api/projects" `
  -Method POST -Body $body -ContentType "application/json"

Monitor Clone Progress

# Get clone status
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/clone-status"

# View workspace details
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/workspace"

# Check logs
Invoke-RestMethod -Uri "http://localhost:5000/api/projects/{id}/logs"

Complete test suite: DAY3_TESTING_GUIDE.md
API examples: API_TESTING.md


🎯 Use Cases

For Developers

  • 🚀 Quickly set up any project for contribution
  • 🔄 Test multiple projects without environment conflicts
  • 🧪 Create isolated development environments

For Teams

  • 👥 Standardize onboarding for new team members
  • 📦 Share reproducible development environments
  • 🔧 Reduce "works on my machine" issues

For Educators

  • 🎓 Set up classroom projects instantly
  • 📚 Provide students with ready-to-code environments
  • ✅ Ensure everyone has the same setup

🤝 Contributing

Contributions are welcome! This is a learning project built as part of a 10-day MVP challenge.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


👤 Author

Ayush


🙏 Acknowledgments

  • Built to solve the universal developer pain point: slow onboarding
  • Inspired by the need for faster, more reliable environment setup
  • Part of a 10-day MVP challenge to build production-ready tools

📊 Stats

Lines of Code API Endpoints Days Completed


⭐ Star this repo if you find it useful!

Version 0.3.0 (Day 3) • Last Updated: February 8, 2026

Report BugRequest Feature

About

Automate developer onboarding: paste a GitHub URL, get a working Docker environment in minutes. MERN stack + Docker automation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors