HUB
Sign inSign up

acmweb/api

By acmweb

•Updated about 4 years ago

mstacm.org primary graphql api

Image
0

2.0K

acmweb/api repository overview

⁠api.mstacm.org

View Live⁠ | Report Bug⁠ | Request Feature⁠

api.mstacm.org⁠ is the primary Apollo GraphQL API⁠ that drives all database interactions from all frontend clients. Primary features include but are not limited to:

  • Payment Processing - Process arbitrary payments using Stripe⁠
  • Event Management - Create, modify, and delete ACM events
  • Permission - Scope-based permission system that allow for groups of permissions
  • JWT Authentication - Authenticate users with Auth0⁠ JWT tokens

⁠Table of Contents

⁠Getting Started

To get a local copy up and running follow these simple steps.

⁠Prerequisites
⁠Installation
  1. Clone the mstacm.org repository using Git Bash:
# Make sure to setup ssh keys on your github account
# https://help.github.com/en/articles/adding-a-new-ssh-key-to-your-github-account
git clone [email protected]:sigdotcom/mstacm.org.git
  1. Navigate to the api directory:
cd api
  1. Install necessary dependencies:
yarn install
  1. Copy the docker environment variables template into the docker environment file:
cp .docker/web.env.default .docker/web.env
  1. Start the docker containers using docker-compose:
docker-compose up
  1. If everything goes well, the last lines of output should look like:
>>> docker-compose up
# ... meaningless output ...
phoenix_web_1    | Server is running, GraphQL Playground available at:
phoenix_web_1    |
phoenix_web_1    |       http://localhost/graphql || http://localhost:4000/graphql
  1. Navigate to http://localhost/graphql⁠. NOTE: if you are using Docker on Windows 10 Home, you need to put the IP of your docker-machine instead of localhost. This is usually something like 192.168.99.100. The IP can be found by launching the Docker Quickstart Terminal and looking at the top of the terminal or by running:

    docker-machine inspect --format='{{.Driver.IPAddress}}' default
    

    If the IP is correct, You should see something like:

GraphQL Playground

⁠Usage

To interact with api.mstacm.org⁠, we recommend installing Altair⁠ or Insomnia⁠. Altair⁠ by itself is a much better GraphQL client, but Insomnia⁠ is quickly catching up in terms of GraphQL-specific features and has more features in-general.

We will use Insomnia⁠ to show off basic usage, but the lessons apply to both clients.

⁠Your First Query
  1. Open the Insomnia⁠ client: Insomnia Initial Page

  2. Click the New Request button or use the keyboard shortcut on the primary page. This will show: Insomnia New Request

  3. Change 'GET' -> 'POST' and 'No Body' -> 'GraphQL'. This will look like: Insomnia Completed Request

  4. Click 'Create' to create the new query. This will send you back the main screen.

  5. Add the URL you connected to in the Installation⁠ section to the URL bar on the top. This will look like: Insomnia Adding URL

  6. Wait a couple of seconds and click the 'show schema' button on the right. This will look like: Insomnia Show Documentation

  7. Click 'Show Documentation' which should open up a menu on the right like: Insomnia Documentation

  8. If you do not see the picture above, go back through the instructions and make sure you followed everything correctly.

  9. Look through the documentation to see all of the features the api has.

  10. Play around with the Insomnia⁠ schema-based auto-completion by typing in some sample commands and hitting 'send': Insomnia First Query Insomnia Autocomplete

⁠Roadmap

See the open issues⁠ for a list of proposed features (and known issues).

⁠Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

If you are apart of ACM Web:

  1. Ask the Chair of ACM Web to add you to the sigdotcom organization⁠
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

If you are not apart of ACM Web:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

⁠License

Distributed under the MPL-2.0 License. See LICENSE for more information.

⁠Contact

ACM Web - [email protected]⁠

Project Link: https://github.com/sigdotcom/mstacm.org⁠

Tag summary
Recent tags
Content type
Image
Digest
sha256:a9da6a758…
Size
515.7 MB
Last updated
about 4 years ago
docker pull acmweb/api:latest