MDN/Development/CompatibilityTables/Infrastructure: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Start with development section)
(No difference)

Revision as of 19:55, 5 February 2016

Here's a schema for the browsercompat.org services:

Micro-services-architecture.png

The BrowserCompat (bc) components are:

  • MDN - primary consumer of compatibility data
  • Authentication - end-user authentication services
  • C&M GUI - Contribution and moderation interface
  • Tables renderer - for MDN and other services
  • Data Explorer - to browse compatibility data
  • Data API - primary data data source
  • Importer - Scrapes data from MDN and injects into Data API
  • BrowserCompat DB - stores current compatibility data
  • Importer DB - stores extra import data
  • API documentation - describes data schema, other parts

Development

A local development copy of MDN is not required for BC development. MDN is backed by the mozilla/kuma project. Development is done using a local VM that provides many of the production services. See the installation documentation for details.

For development, it is easiest to create local Django accounts backed by username and password. ``./manage.py createsuperuser`` can be used to create a superuser account with access to the Django admin.

The C&M interface is backed by the mdn/browsercompat-cm project. It is running Ember.js, with the ember-cli project. Developers will need to install the dependencies, including Node.js, Bower, ember-cli, and PhantomJS. See the README.md for details.

The Tables Render is still in planning, and the project has not started. A prototype renderer is implemented in KumaScript, in the EmbedCompatTable macro.

The Data Explorer is part of the mdn/browsercompat project code base, and requires a local install of the Data API for development.

The Data API is in the mdn/browsercompat project. It is a Django project. Developers will need to install a Python development environment, and optionally will need PostgreSQL, Memcached, and Redis installed. See the Installation documentation for details.

The Importer is part of the mdn/browsercompat project code base, and requires a local install of the Data API for development.

The BrowserCompat DB can be a PostgreSQL database (recommended) or a SQLite database. It requires the Data API to setup the schema and populate the data. Compatibility data is periodically exported to the mdn/browsercompat-data project, and can be used to populate a developer's database.

The Importer DB is currently part of the BrowserCompat DB. Local development may require a lengthy scraping of the MDN site.

The API documentation is hosted at browsercompat.readthedoc.org, and sourced in the [https://github.com/mdn/browsercompat mdn/browsercompat project. Documentation developers will need to install the Data API to build documents locally, but won't need to populate it with compatibility data.