Git Product home page Git Product logo

frontend-app-admin-portal's Introduction

frontend-app-admin-portal

Build Status Codecov

Overview

frontend-app-admin-portal is a frontend that provides branded learning experiences as well as a dashboard for enterprise learning administrators.

Setting up a dev environment

The Short Story

  1. Set up docker devstack locally, and start the service containers (see https://github.com/openedx/devstack)

  2. Set up and run the edx-analytics-data-api (https://github.com/openedx/edx-analytics-data-api) locally

  3. Clone this repo and install npm requirements:

$ git clone [email protected]:edx/frontend-app-admin-portal.git
$ cd frontend-app-admin-portal
$ nvm use (if using nvm) OR install and switch to version of node/npm as per the .nvmrc file to avoid issues during npm install or npm start (and to use the same version of node/npm as used by team plus CI builds)
$ npm install
$ npm start # or "npm run start:with-theme" if you want edX branding

The application is now running and can be accessed in a web browser at http://localhost:1991/

Themes

By default, the core Paragon theme is installed and used with the npm start command. If you'd like to use the @edx/brand-edx.org theme, use the npm run start:with-theme command.

Sign-in and access

Sign in using the enterprise_openedx_operator created by running ./manage.py lms seed_enterprise_devstack_data in the lms shell. After sign-in, you may have to navigate back to localhost:1991.

In the lms django admin, click on "Enterprise Customers" then "Test Enterprise" (or the enterprise you're working with). Check the appropriate boxes to gain access to the appropriate admin screens.

The Longer Story

For the frontend-app-admin-portal to function properly locally, the following parts need to be set up:

  1. At least 1 enterprise customer should exist in edx-platform. This customer can be created using created by running ./manage.py lms seed_enterprise_devstack_data in the lms shell.
  2. edx-analytics-data-api needs data that would normally be piped from edx-platform via data pipelines

Enterprise Customer

The frontend-app-admin-portal displays information about enterprise customers in edx-platform, so you will need to create a customer in edx-platform. You can create a customer by doing the following:

  1. Navigate to http://localhost:18000/admin/enterprise/enterprisecustomer/
  2. Click "Add Enterprise Customer"
  3. Complete this form, at very least filling in the Name, Slug, and Site
  4. Click "Save"

Once created, make a note of the UUID field in the admin for the enterprise customer you created. This is needed to map the data in edx-platform to the data in edx-analytics-data-api.

Analytics-data-api Data Prep

Follow the instructions for how to get data into the edx-analytics-data-api in the repo README here: https://github.com/openedx/edx-analytics-data-api, using the UUID for the enterprise customer you just created.

Bringing it all together

At this point, if the LMS and data-analytics-api are running, you should then be able to:

  1. Run the frontend-app-admin-portal locally
$ npm install
$ npm start
  1. Login with credentials that you could log into your local edx-platform with

  2. See data displayed in the admin portal

Using local frontend libraries

In order to use a local version of a frondend library, such as Paragon, you must create a module.config.js file in the root directory of your repo. It should contain aliases that webpack will use to resolve modules locally rather than using the module in node_modules.

Sample module.config.js file:

module.exports = {
/*
  Modules you want to use from local source code.  Adding a module here means that when this app
  runs its build, it'll resolve the source from peer directories of this app.
  moduleName: the name you use to import code from the module.
  dir: The relative path to the module's source code.
  dist: The sub-directory of the source code where it puts its build artifact.  Often "dist".
*/
  localModules: [
    { moduleName: '@edx/brand', dir: '../brand-edx.org' },
    { moduleName: '@edx/paragon/scss/core', dir: '../paragon', dist: 'scss/core' },
    { moduleName: '@edx/paragon', dir: '../paragon', dist: 'dist' },
  ],
};

NB: In order for webpack to properly resolve scss imports locally, you must use a ~ before the import, like so: @import "~@edx/brand/paragon/fonts";

frontend-app-admin-portal's People

Contributors

adamstankiewicz avatar alex-sheehan-edx avatar khalilbsd avatar muhammad-ammar avatar georgebabey avatar taliaedx avatar kiram15 avatar saleem-latif avatar long74100 avatar binodpant avatar jaebradley avatar zamanafzal avatar brittneyexline avatar sameenfatima78 avatar irfanuddinahmad avatar renovate[bot] avatar iloveagent57 avatar manny-m avatar hammadahmadwaqas avatar brobro10000 avatar tj-tracy avatar marlonkeating avatar chavesj avatar christopappas avatar bbaker6225 avatar hasnain-naveed avatar macdiesel avatar muneebgh avatar jlajoie avatar edx-abolger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.