Skip to content

SourceCodeOER/sourcecode-front

Repository files navigation

Source Code - front-end

The new open source catalog of computer exercises

What is the meaning of this project ?

Like Open Educational Resources, Source Code offers educational teams the opportunity to collaborate on the issue of creating and sharing exercises. The latter consists of referencing IT resources, allowing a diverse audience to benefit from all contributions.

Before the setup !!

This application works with a database and an API. This provided by the Source Code API repo.

In order to build the setup for this project, you must ensure that you follow all the steps in the Source Code API.

To make Source Code works, you must enable the databases and run the application of the back-end part !

Requirements

  • NodeJS (at least v10)
  • That's all folks !

Build Setup

First, following your installation of the API, you have to set the environment variables in the config folder. Here's an explanation of each one.

# change the api server
API_SERVER=http://127.0.0.1:3000

# change the cdn server to search for files
CDN_SERVER=http://127.0.0.1:3000/files

Installation

# install dependencies
$ npm run install

# serve with hot reload at localhost:3333
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate

The core of this project is based on Nuxt.js to boost the app in the client side. For detailed explanation on how things work, check out Nuxt.js docs.

Integration testing & E2E testing

We use Cypress as the framework to test the application. Enter the following command to run Cypress and get the interface.

$ npm run cypress:open