Software Heritage has developed an infrastructure to collect, preserve, analyze and present software in source code form.
You can learn how to use its public API. Instead of using the public archive, you might want to use a local installation while developing clients.
Contributions to Software Heritage’s own source code are very much welcome. You will need to take the time to setup a developer environment before you can start.