# moz-console
**Repository Path**: mirrors_mozilla/moz-console
## Basic Information
- **Project Name**: moz-console
- **Description**: Product Delivery Mozilla Web Console to administrate all Mozilla services from a united web interface
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-22
- **Last Updated**: 2026-03-07
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Mozilla web console
You're working on this new service/API, and at some point you'll have to create
a frontend for it. SO. BORING. So many decisions to take, (ugly) design to come
up with, choosing libs/frameworks/tooling.
Or you could follow the guidelines here to create a "moz console app", and not
have to bother with all of that.
Those guidelines are opinionated, but shouldn't be too much of a hassle. If
they are, please let us know.
## Creating a new app
We recommend using
[create-react-app](https://github.com/facebookincubator/create-react-app).
Even better, you can use the
[moz-console-react-scripts](https://www.npmjs.com/package/moz-console-react-scripts)
custom scripts that set you up to use [antd](http://ant.design/) and
[photon-ant](https://www.npmjs.com/package/photon-ant):
```sh
$ create-react-app foobar --scripts-version moz-console-react-scripts
$ cd foobar
$ yarn start
```
The idea is to have a root component that will be used by the moz console react
app. This root component will receive the following props:
- `urlPrefix`: the prefix to use with the router you chose (eg `foobar`,
meaning the url will look like `#/foobar/some/url/relevant/to/your/app`)
- `request`: if you want to benefit from the moz console login/permissions
management, you'll use `request` which is a thin wrapper around `fetch`
- `user`: a user object with some helpers like `isLoggedIn`, `username`, ...
## Hacking on the app locally
To run it locally, add the `moz-console` as a dependency:
```sh
$ yarn add moz-console
```
and use the `moz-console.Root` component in your entrypoint javascript file:
```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import {Root, request, user} from 'moz-console';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(