GithubHelp home page GithubHelp logo

fgpe-erasmus / authorkit-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 5.0 1.0 2.85 MB

The API of a toolkit to author gamified activities to support programming learning. This is part of the Erasmus+ Project entitled Framework for Gamified Programming Education (FGPE).

License: GNU General Public License v3.0

Shell 0.29% Dockerfile 0.10% HTML 0.67% Python 0.04% TypeScript 95.73% CSS 0.15% Pug 3.01%
gamified-learning gamification-framework authoring toolkit nodejs nestjs api-rest docker typeorm

authorkit-api's Introduction

FGPE AuthorKit API

The API of a toolkit to author gamified activities to support programming learning. This is part of the Erasmus+ Project entitled Framework for Gamified Programming Education (FGPE).

Requirements

  • Node Version Manager n
  • Docker + Docker Compose
  • npm

Installation

$ npm install

Configuration

Copy file .env.example and name it .env.dev

Start Guide

Outside Docker containers

  • Create .env file cp .env.example .env and fill-in existing env variables
  • Install dependencies npm install
  • Start the app npm run start

Inside Docker containers

Just run already prepared bash script:

$ ./build

It will setup the project for you (building the Docker images, starting docker-compose stack). The NestJS app running in dev mode will be exposed on http://localhost (port 80)

For IDE autocompletion to work, run yarn on the host machine.

Working w/ the app

# Bring up the docker with api, database, ...
$ docker-compose up -d

# development
$ npm run start

# build
$ npm run build

# production mode
$ npm run prod

# fix lint errors
$ npm run lint:fix

Docker build

Build image

To build a docker image, execute:

$ ./build.sh

Test

# unit tests
$ docker exec -it nest npm run test

# e2e tests
$ docker exec -it nest npm run test:e2e

# test coverage
$ docker exec -it nest npm run test:cov

Environment Configuration

.env.example contains the configuration keys that must be set in .env.dev for development and/or .env.prod for production.

When using the build script, one of these is automatically cloned to .env. If you don't use the build script, please m

Swagger

To see all available endpoints visit http://localhost/docs

TypeORM integrated

TypeORM gives the possibility to use next db types: mysql, postgres, mariadb, sqlite, mongodb etc. Please look at docs for more details.

We are using postgres.

Acknowledgments

This software has been developed as a part of the Framework for Gamified Programming Education (https://fgpe.usz.edu.pl/) and FGPE Plus: Learning tools interoperability for gamified programming education (https://fgpeplus.usz.edu.pl/) projects which were co-funded by the Erasmus+ Programme of the European Union.

Framework for Gamified Programming Education project Erasmus+

License

License: GPL v3

authorkit-api's People

Contributors

arturroq avatar dependabot[bot] avatar emfelipe avatar josepaiva94 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

konradkur

authorkit-api's Issues

Refactor access control

Currently, access control rules for new entities involve the creation of a voter and ~30 lines of almost repeated code. I don't like this strategy anymore.

Develop access control guards mechanism (annotation-based) to protect endpoints, both through project-level roles and global roles.

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.