GithubHelp home page GithubHelp logo

anantajitjg / egyan Goto Github PK

View Code? Open in Web Editor NEW
47.0 7.0 18.0 1.55 MB

eGyan is a web application built with Node.js (Express) and Hasura (https://hasura.io/) Platform. It is a simple and effective eLearning app for everyone.

License: MIT License

JavaScript 41.20% CSS 12.97% HTML 13.93% PLSQL 31.79% Dockerfile 0.12%
elearning elearning-application nodejs hasura expressjs learning elearningapp elearning-system learning-app learning-system

egyan's Introduction

eGyan

eGyan is a web application built with Node.js (Express) and Hasura Platform. It is a simple and effective eLearning app for everyone.

Overview

This provides you with a great starting point for building a full-fledged eLearning application. In eGyan a user/student needs to register with a username and password for accessing the course content and to save his course progress. Courses are categorized based on activity- Active courses, completed courses, courses yet to be enrolled/Available Courses. Each courses are divided into separate modules. Each module contains different topics. Each topics are points based. So, students can accumulate points to collect different badges. This will make learning interesting! In order to collect points they have to mark each topic as completed!

eGyan Video

Setup

Initial Setup

Setup the Hasura CLI

The hasura CLI is a command line utility to help you get your backend setup quickly. It helps you create projects, manage clusters and manage microservices and explore APIs running on the cluster. The instructions for setup are available from here.

Login

Next, login or register by running the following command:

$ hasura login

This command will open up the browser and allow you to register with a new account (or login to your existing account).

Clone the project

Now, clone this project by running this command

$ hasura clone anantajitjg/egyan

Project Structure

The project (a.k.a. project directory) has a particular directory structure and it has to be maintained strictly, else hasura cli would not work as expected. A representative project is shown below:

.
├── hasura.yaml
├── clusters.yaml
├── conf
│   ├── authorized-keys.yaml
│   ├── auth.yaml
│   ├── ci.yaml
│   ├── domains.yaml
│   ├── filestore.yaml
│   ├── gateway.yaml
│   ├── http-directives.conf
│   ├── notify.yaml
│   ├── postgres.yaml
│   ├── routes.yaml
│   └── session-store.yaml
├── migrations
└── microservices
    ├── adminer
    │   └── k8s.yaml
    └── www
        ├── src/
        ├── k8s.yaml
        └── Dockerfile

hasura.yaml

This file contains some metadata about the project, namely a name, description and some keywords. Also contains platformVersion which says which Hasura platform version is compatible with this project.

clusters.yaml

Info about the clusters added to this project can be found in this file. Each cluster is defined by it's name allotted by Hasura. While adding the cluster to the project you are prompted to give an alias, which is just hasura by default. The kubeContext mentions the name of kubernetes context used to access the cluster, which is also managed by hasura. The config key denotes the location of cluster's metadata on the cluster itself. This information is parsed and cluster's metadata is appended while conf is rendered. data key is for holding custom variables that you can define.

Hasura cluster

We need a Hasura cluster where we can deploy our project. The instructions for creating a Hasura cluster are available from here.

Get cluster information and the microservices running

Inside your project directory, run:

$ hasura cluster status

common.js

Edit cluster name in common.js (microservices > www > src > public > js) with your current cluster name. For example, if the cluster name is flashiness71 (existing one), then

var cluster_name = "flashiness71";

Deploy the Project

$ git add .
$ git commit -m "some message"
$ git push hasura master

Once this project is deployed on to a hasura cluster, you will have eGyan app running at https://www.<cluster-name>.hasura-app.io

Accessing Console

Now that you have deployed the project on your cluster, you would want to manage the schema and explore APIs.

Access the api-console via the following command:

$ hasura api-console

This will open up Console UI on the browser. You can access it at http://localhost:9695

License

eGyan is open-sourced software licensed under the MIT license. See the LICENSE for more.

egyan's People

Contributors

anantajitjg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.