Asuswrt-Merlin is published under the GPLv2 license. The source code is published on Github where it can be browsed from the web, or checked out using a git client. Note that there are two code repositories.
The current / new generation branch (starting with release 382.1):
The legacy branch (up to version 380.xx, no longer under active development):
Development is done in a Ubuntu-Linux 20.04 LTS virtual machine. Ubuntu 12.04 and 16.04 are other development environments known to work for compiling the firmware, but might require some adjustments. See the Wiki for guides on how to set up a build environment.
Note that some components are proprietary to various entities (Asus, Broadcom, Quantenna, Paragon Software, Tuxera, etc...). For these, the pre-compiled binary blobs are included in the repository, and the build system is able to make use of them to generate a fully working firmware.
Copyrights belong to their respective owners.