Skip to content

MyMel2001/NodeGit

Repository files navigation

NodeGit 🚀

A professional-grade, self-hosted Git frontend built with Node.js. NodeGit provides a streamlined interface for managing repositories, pull requests, and releases, with a strong focus on security and developer experience.

✨ Features

  • Git Hosting: Create and manage bare Git repositories on your own server.
  • Organizations: Create organizations to group repositories under a shared namespace. Organization names are protected against user namespace collisions. Creation is CAPTCHA-protected to prevent bot abuse.
  • Repository Transfer: Securely transfer repositories between your personal account and your organizations (or to other users) with CAPTCHA verification. Validates that destination accounts exist and prevents naming collisions.
  • Forking: Fork any public repository into your own account with a single click, preserving all history and branches.
  • Private Repositories: Mark repositories as private to restrict access. Private repos return 404 to unauthorized users to prevent enumeration. Git operations on private repos require Basic Authentication.
  • Pull Requests: Full PR workflow including web-based diffing and merging.
  • User Profiles & Search: View any user's or organization's public repositories. A global search bar filters repositories, users, and organizations by name.
  • README Rendering: Automatically detects and renders README.md files on the repository code view.
  • Security First:
    • CAPTCHA: Built-in verification for registration, login, organization creation, and repository transfers.
    • Encryption: Support for encryption-at-rest for database operations.
    • HTTPS: Native support for secure transit.
    • Basic Auth: Git-over-HTTP operations enforce authentication against user credentials for private repositories.
    • Secret Scanning: Automatic scanning for sensitive data in your codebase.
    • Dependency Scanning: Keep your project safe with automated dependency vulnerability checks.
  • CI/CD: Integrated GitHub Actions–compatible runner for automated job execution (Docker-ready).
  • Themeable UI: Beautiful, GitHub-esque light mode and a custom Lime-on-Black dark mode.
  • Release Management: Create and view repository tags and releases.
  • GitHub Import: Seamlessly import repository collections from GitHub into your personal account or an organization. Supports Personal Access Tokens (for private repos) or just a username/org name (for public repos). Features real-time streaming progress, rate-limiting, and full pagination. Mirrored repos can be converted to standalone repositories at any time.

🛠️ Tech Stack

  • Backend: Node.js, Express
  • Database: SQLite (via better-sqlite3 and quick.db)
  • Templating: EJS
  • Styling: Vanilla CSS (Custom design system)
  • Git: Native Git integration via child_process

🚀 Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • Git installed on the server

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/NodeGit.git
    cd NodeGit
  2. Install dependencies:

    npm install
  3. Configure environment:

    cp .env.example .env
    # Edit .env with your specific configuration
  4. Start the server:

    npm run dev

The application will be available at http://localhost:3000 (or the port specified in your .env).

⚙️ Configuration

The following environment variables can be configured in your .env file:

Variable Description Default
PORT Port the server listens on 3000
SESSION_SECRET Secret key for session management super-secret-git-frontend
DB_ENCRYPTION_KEY 32-character key for database encryption None

🔒 Security

  • CAPTCHA: The registration and login forms are protected by a custom server-side SVG CAPTCHA to prevent automated sign-ups.
  • HTTPS: To enable HTTPS, place key.pem and cert.pem in the root directory. NodeGit will automatically detect them and switch to a secure server.

📜 License

This project is licensed under the terms found in the LICENSE file.


Built with ❤️ by the NodeGit contributors.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors