ruyjfs / heimdallr

Best way to Single Sign On (SSO) made with Elixir for Identity and Access Management For Modern Applications and Services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Heimdallr (Your best Sigle Sign On with Elixir and JWT)

Run app

On local development

Observation!
If are using VSCode and extension ElixirLS: Elixir support and debugger. Make sure to disable this configuration. This get deps of your OS and replace of docker container, causing error of system.

Elixir LS: Fetch Deps
- [ ] Automatically fetch project dependencies when compiling

Run just DB

docker-compose -f db.yml up --build

Install dependencies

mix deps.get && cd assets && npm install && node node_modules/webpack/bin/webpack.js --mode development && cd ../

Run locally without Docker

mix start

Need a Database
Open browser on: localhost:4000

Run any command on container docker

Like ecto.migrate, to migrate database structure

docker exec -it heimdallr-api mix ecto.migrate

Run just a container without docker-compose, just a single container

docker run -it --rm --name elixir -p 4000:4000 -v "\$PWD":"/var/www" -w "/var/www" elixir:slim /bin/bash

To enter on this container

docker attach elixir

Another commands

MIX_ENV=dev mix phx.server # Run app with configuration for env.

iex -S mix phx.server #Run a IEX - CLI command of Elixir

mix phx.gen.context UserManager User users username:string password:string

mix local.hex --force

mix archive.install hex phx --force

mix archive.install hex phx_new --force


mix phx.gen.schema User users name:string email:string \
bio:string number_of_pets:integer

DB Commands

mix ecto.create #create database, run it on beginning of project.

mix ecto.gen.migration create_people # Generate a migrate for table

mix ecto.migrate # Migrate to DB existing migrate on project

Comands to create this project

mix phx.new heimdallr --no-html --no-webpack # with html and webpack

mix phx.new heimdallr --no-html --no-webpack # not have html and webpack

cd heimdallr # Enter on project path

mix phx.server # Run phoenix framework server

mix archive.install hex absinthe

mix archive.install hex absinthe_plug absinthe_ecto --force

mix archive.install hex comeonin

mix ecto.create

mix deps.get

Powered By:

  • Elixir (Language)
  • Pheonix (Framework)
  • Guardian (Auth)
  • Absynt (GraphQL)
  • Ecto (ORM)
  • Mix (Package Manager)
  • PostgreSQL (SGBD)
  • JWT / SSO
  • Socket.IO (Assync)

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with npm install inside the assets directory
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

About

Best way to Single Sign On (SSO) made with Elixir for Identity and Access Management For Modern Applications and Services


Languages

Language:Elixir 76.8%Language:CSS 12.9%Language:JavaScript 5.3%Language:HTML 3.1%Language:Shell 0.8%Language:SCSS 0.8%Language:Dockerfile 0.3%