Giter Club home page Giter Club logo

dnd5e-graphql-api's Introduction

dnd5e-graphql-api

WIP: graphql api for DnD 5e built with Go

Instructions to run locally:

get, generate, build and run:

make all

Description:

A GraphQL API for Dungeons and Dragons 5th Edition written in Go. Support for a web app client user to sign up with an email and create a character. A user will be able to keep track of a their DnD 5E character information and access information about 5E race, class, spells, equipment etc.

Tools and packages:

  • graphql-go
  • gqlgen for schema-based generation of statically-typed models
  • mgo for mongodb

Considerations:

Domain Driven Design: a design pattern that revolves around the definition of domain entities and aggregates, and the decoupling of outside dependencies. The scale of this service is still small enough not to require heavily domain driven architecture but basic ideas like decoupling of infrastructure and persistence layers are still useful.

Document store. While a lot of the data is relational in nature (i.e. SubRace -> Race, etc.) there are a number of entities that can have arbitrary properties based on class/race/equipment etc. Also these could be updated as future versions of 5E are rolled out. Schema needs to be easily mutable.

Identity management: boilerplate auth flows. May consider splitting into a federation (since gqlgen has support for that with a config) and having a dedicated identity microservice.

Deployment: Google App Engine? Terraform + AWS? AWS Amplify also an option.

Goals:

  • public graphql api for dungeons and dragons 5th edition information
  • basic auth functionality
  • user profile management
  • character creation
  • character management

A public API of query-able Dungeons & Dragons 5th Edition entities (not exhaustive):

  • Race
  • Subrace
  • Class
  • ClassLevel
  • Subclass
  • Skills
  • AbilityScores
  • Equipment
    • Items
    • Weapons
  • Armor
  • Features

One of the goals of this project is to learn to write idiomatic, efficient Go. Hope to expand into writing my own CLI tools and contribute to open source down the line.

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.