Service to browse all contrib modules on drupal.org http://simplytest.me/ allows you to search all existing modules. I'm trying to implement a widget with the same functionality, but I'm stuck on how to browse all the projects on drupal.org... Can someone point me in the right direction? I found the module "project_browser", but can't seem to figure out how they accomplish it...
This excellent script written by rocketeerbkw will create a text file containing the name of every d.o contrib module, giving you everything you need to get started:

/**
 * Download a full list of all modules on drupal.org by using the API. More info
 * at https://www.drupal.org/about-drupalorg/api.
 */
$url = 'https://www.drupal.org/api-d7/node.json?type=project_module';
$modules = array();
do {
  print $url . PHP_EOL;
  $options = array(
    'http' =&gt; array(
      'user_agent' =&gt; 'get_list_of_modules.php from https://github.com/rocketeerbkw/drupal_function_stats',
      'header' =&gt; 'Accept: application/json',
    ),
  );
  $context = stream_context_create($options);
  $response = file_get_contents($url, false, $context);
  $data = json_decode($response);
  foreach ($data-&gt;list as $module) {
    $modules[] = $module-&gt;field_project_machine_name;
  }
  $url = isset($data-&gt;next) ? $data-&gt;next : FALSE;
  // The next links are always provided without a format [#2253947].
  // Formatless URLs are 301 redirected to format URLs but strip all query
  // query parameters [#2364755].
  $url = str_replace('node?', 'node.json?', $url);
} while ($url);
$file = fopen('project_usage.txt', 'w');
fwrite($file, implode("\n", $modules));
fclose($file);


An example output is here:

https://raw.githubusercontent.com/rocketeerbkw/drupal_function_stats/master/project_usage.txt

Once you've got that data the only tasks are deciding where/how to store it, and creating the UI to manage it.