Skip to content

web3infra-foundation/mega

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Mega - is an unofficial open source implementation of Google Piper.

Mega is an unofficial open source implementation of Google Piper. It is a monorepo & monolithic codebase management system that supports Git. Mega is designed to manage large-scale codebases, streamline development, and foster collaboration.

What's the Piper?

Google Piper is a massive, centralized version control system that Google uses internally to manage their vast codebase. It is a monorepo, and a monolithic which mean is a single repository that contains all the source code for Google's software. It is designed to manage large-scale codebases, streamline development, and foster collaboration. It is built on top of Google's internal infrastructure and is designed to be highly scalable and efficient. More information on the Why Google Stores Billions of Lines of Code in a Single Repository.

Google Piper is not open source

Mega features

Mega is an unofficial open source implementation of Google Piper. And it has the following features:

Git compatible

Mega offers the ability to utilize Git with a monorepo. This allows for easy cloning or pulling of any monorepo folder into local filesystem as a Git repository, and seamless pushing of changes back.

Trunk-based Development

When it comes to managing large codebases in a centralized manner, trunk-based development is the way to go. More trunk-based Development information on the Trunk-Based Development.

Conventional Commits

Mega will support conventional commits, which are a set of rules for creating clear and concise commit messages. More information on the Conventional Commits.

Code Owners

Mega will support code owners, which are a set of rules for defining who owns a particular piece of code. More information on the Code Owners.

Decentralized Open Source Collaboration

For now, the entire open source community base on Git and GitHub. It's centralized model, and it's not suitable for growing speed of open source world. Mega is working on build a decentralized open source collaboration model with ZTM(Zero Trust Model) and decentralized social network like Nostr, Matrix and Mastodon.

Quick Try Monorepo Engine with Docker

For now, the monorepo engine could be deployed on your host machine or insulated into containers. For deploying through docker, follow the steps below:

  1. Pull docker images from Docker Hub
$ docker pull genedna/mega:mono-pg-0.1-pre-release
$ docker pull genedna/mega:mono-engine:0.1-pre-release
$ docker pull genedna/mega:mono-ui:0.1-pre-release
  1. Initialize for mono-engine and PostgreSQL
$ git clone https://github.com/web3infra-foundation/mega.git
$ cd mega
# Linux or MacOS
$ ./docker/init-volume.sh /mnt/data ./docker/config.toml
  1. Run the mono-engine and PostgreSQL with docker, and open the mono-ui in your browser with http://localhost:3000.
# create network
$ docker network create mono-network

# run postgres
$ docker run --rm -it -d --name mono-pg --network mono-network -v /tmp/data/mono/pg-data:/var/lib/postgresql/data -p 5432:5432 mono-pg:0.1-pre-release
$ docker run --rm -it -d --name mono-engine --network mono-network -v /tmp/data/mono/mono-data:/opt/mega -p 8000:8000 mono-engine:0.1-pre-release
$ docker run --rm -it -d --name mono-ui --network mono-network -e MEGA_INTERNAL_HOST=http://mono-engine:8000 -e MEGA_HOST=http://localhost:8000 -p 3000:3000 mono-ui:0.1-pre-release
  1. Try to upload a repository to mono-engine
$ git clone http://localhost:8000/project.git
$ cd project
$ git clone https://github.com/dagrs-dev/dagrs.git
$ sudo rm -r dagrs/.git
$ git add .
$ git commit -a -m"Initial the dagrs project"
$ git push
  1. Check the repository in UI Open the mono-ui in your browser with http://localhost:3000, and you will see the project folder.

Contributing

The mega project relies on community contributions and aims to simplify getting started. To develop Mega, clone the repository, then install all dependencies and initialize the database schema, run the test suite and try it out locally. Pick an issue, make changes, and submit a pull request for community review.

More information on contributing to Mega is available in the Contributing Guide.

Talk and Share

If you interested in Mega, you can make an appointment with us on Google Calendar to discuss your ideas, questions or problems, and we will share our vision and roadmap with you.

License

Mega is licensed under this Licensed: