An example LTI tool built with Gleam. It demonstrates how to create a simple LTI tool that can be integrated with an LMS (Learning Management System) using the LTI (Learning Tools Interoperability) specification.
- Docker - A platform for developing, shipping, and running applications in containers.
- Docker Compose - A tool for defining and running multi-container Docker applications.
-
Clone the repository:
git clone https://github.com/Simon-Initiative/lti-example-tool cd lti-example-tool
-
Start the application using Docker Compose:
docker compose up
-
Open the application in your browser:
open http://localhost:8080
-
Register the tool with your LMS or Platform using the following parameters. If you are running the applications somewhere other than
localhost:8080
, make sure to update the URLs accordingly.
- Target Link URI:
http://localhost:8080/launch
- Client ID:
EXAMPLE_CLIENT_ID
- Login URL:
http://localhost:8080/login
- Keyset URL:
http://localhost:8080/.well-known/jwks.json
- Redirect URIs:
http://localhost:8080/launch
- Create a Registration in the tool with the relevant parameters from your LMS or Platform.
- Name:
Platform Name
- Issuer:
https://platform.example.edu
- Client ID:
EXAMPLE_CLIENT_ID
- Auth Endpoint:
https://platform.example.edu/lti/authorize
- Access Token Endpoint:
https://platform.example.edu/auth/token
- Keyset URL:
https://platform.example.edu/.well-known/jwks.json
- Deployment ID:
some-deployment-id
NOTE: This address must be a FQDN (Fully Qualified Domain Name) and will not work with another
localhost
application, since the tool will be running isolated in a container. You can usengrok
to expose your localhost platform to the internet if necessary -or- if you are running the example tool natively using the development instructions below, then you can uselocalhost
as the address.
- asdf - A version manager for multiple programming languages.
- Gleam - The programming language used for this project. Can be installed via
asdf
. - Node.js - The JavaScript runtime used for tailwind styles. Can be installed via
asdf
. - PostgreSQL - The database used for this project.
- watchexec - A tool to watch for file changes. Available
via
brew install watchexec
on macOS.
- Clone the repository:
git clone https://github.com/Simon-Initiative/lti-example-tool cd lti-example-tool
- Install tooling
asdf install
- Install npm dependencies:
This will install the tailwind used for styles.
npm install
- Install the dependencies:
gleam deps download
- Initialize the database:
gleam run -m lti_example_tool/database/migrate_and_seed setup
- Copy the example seeds file and edit it for automatic platform configuration:
cp seeds.example.yml seeds.yml
- Run the server and watch for changes:
watchexec --stop-signal=SIGKILL -r -e gleam gleam run
- Open the application in your browser:
open http://localhost:8080
# Run the project
gleam run
# Run the project and watch for changes
watchexec --stop-signal=SIGKILL -r -e gleam gleam run
# Reset the database
gleam run -m lti_example_tool/database/migrate_and_seed reset
# Run the tests
gleam test