Djinn are the elite of the jinn world. They are the most powerful. "Dj" vs "j" follows arabic vernacular of emphasizing letters influencing meaning of words
Portal/ - anything that allows interactions with outside world with the game. aka API Incantations/ - Spells for different user actions
- Conjure - Initiate data ingestion from this server from a given source
- Transmute - Normalize data sent by user requests or conjure requests to game values for database
- Evoke - Player abilities with side effects in/outside of our system e.g. saving to database
- Divination - Ways of reading player data and augmenting avatar images based on activity
- Rituals - Player habits thats are run on a schedule e.g. Did they complete their quests this week?
- Illusion - ZK stuffs TBD
Currently accept 2 ways to add environment variables to the project for repl and uberjar for local and production builds
- resources/env.edn (local support)
- export MY_ENV_VAR=myvar (local & prod support)
Important --
environ
will not pick up configuration settings from the project.clj when called from a compiled uberjar. So for any compiled code you produce with lein uberjar, you will want to set your configuration values via shell environment and/or system properties.
- Start the application:
lein repl
(require '[master-djinn.server :as server])
(server/-main)
to run server- Go to localhost:8888/ide for GraphiQL playground. Regular HTTP server runs at localhost:8000 but only used for web2 integrations at the moment, most everything gets routed through GraphQL queries and mutations.
- Load functions in as needed e.g.
- Run tests with
lein test
. Read the tests at test/master_djinn/service_test.clj.
To configure logging see config/logback.xml. By default, the app logs to stdout and logs/. To learn more about configuring Logback, read its documentation.
use ngrok http 8888
to expose local server to internet for OAuth callback testing and such. MUST update OAuth config on provider with new ngrok url.
- Start a new REPL:
lein repl
- Start your service in dev-mode:
(def dev-serv (run-dev))
- Connect your editor to the running REPL session. Re-evaluated code will be seen immediately in the service.
Docker container support
- Configure your service to accept incoming connections (edit service.clj and add ::http/host "0.0.0.0" )
- Build an uberjar of your service:
lein uberjar
- Build a Docker image:
sudo docker build -t master-djinn .
- Run your Docker image:
docker run -p 8000:8000 master-djinn
- Build and run your image:
capstan run -f "8080:8080"
Once the image it built, it's cached. To delete the image and build a new one:
capstan rmi master-djinn; capstan build
- migrate to deps.edn?
- Verify api requests via ETH wallet signatures (address that signed and the query they want executed) as an lacinia interceptor