Learner Model GQL
Learner Model GQL is a project based on a microservices architecture using GraphQL
Getting Started
Installation
For development with learner-model-gql it is required to have installed:
- Node.js v16.x, which can be installed in different ways based on the platform, or you can visit nodejs.org
- Docker for local database usage and testing, Docker Desktop can be used in macOS or Windows
- Git version control system
For Windows based systems, you might need to use tools like Cmder to be able to use bash-like commands.
Development
This project requires pnpm, which is a dependency manager for Node.js, which you can install by following the instructions on pnpm.io/installation.
Assumming you already have access to the confidential Auth0 Credentials
-
Inside the cloned repository, run
pnpm i
to install all the required dependencies -
Run
pnpm db:local
, this will start a local postgres database in the port5789
, which can be used for development and its required for automated testing. -
In the root of the cloned repository, an empty
.env
should be present, you have to manually modify it to look something like:DATABASE_URL=postgresql://postgres:postgres@localhost:5789/postgresAUTH0_DOMAIN=learner-model-gql.us.auth0.comAUTH0_CLIENT=___AUTH0_SECRET=___ADMIN_USER_EMAIL=put_your_email_here@gmail.comThe
AUTH0
environment variables have to changed based on the confidential credentials, theDATABASE_URL
can be adapted to point to an external database if required, andADMIN_USER_EMAIL
should be changed to set the starting admin user. -
After the local database is running and the
.env
is filled, runpnpm migrate
, which will run the migrations on the local database. -
Run
pnpm dev
. The gateway's Altair GraphQL Client is going to be available athttp://localhost:8080/altair
, and administration client will be available athttp://localhost:4010
.