JamesG Trading - Built with GraphQL and Ruby on Rails
7207c0c0 — James Gallagher 1 year, 1 month ago
feat: Fix getNotifications query
47b99f29 — James Gallagher 1 year, 1 month ago
feat: Fix scheduler
716a6d93 — James Gallagher 1 year, 1 month ago
feat: Fix complete question Slack notification bug


browse  log 



You can also use your local clone with git send-email.

#JamesG Trading API

JamesG Trading is a platform developed by James Gallagher that facilitates and processes investments in him, as a publicly traded person.

If you are interested in the accompanying client, you can view it here. You can also view the Command Line Interface (CLI) for the JamesG Trading platform here.

#Getting Started

After installation, you can query the API by using the GraphQL endpoint through the method listed in the documentation above, or you can use the GraphiQL enviornment which is a query crafting tool. GraphiQL allows you to easily create and run queries, as well as view the internal docs for the API.

GraphQL Endpoint - https://localhost:3000/graphql
GraphiQL Endpoint - https://localhost:3000/graphiql

You can view comprehensive documentation for this API by visiting the GraphiQL endpoint and selecting the "Docs" panel.


  1. Clone repo

    git clone https://github.com/jamesgallagher432/jamesg-trading-api.git

  2. Install dependencies

    bundle install

  3. Create environment file In order for the server and client to know how to call the API used in this project, you need to complete this file. We've included a .env.example file that you can rename to get started with the default values.

    cp .env.example .env

  4. Initialize database

    rake db:setup

    rake db:migrate

    rake db:seed Running this command will create an admin user and populate the trades table, and is necessary for the app to work correctly.

  5. Run development server

    npm run start

    Your app will be served at: http://localhost:3000/graphql



You can deploy this application on Heroku by using the above link, or run it on your local machine using the instructions above.

The deploy script is now totally automated and will hook into the server-rendering automatically. Running npm run serve:bundle will set your environment to production and serve these files via Express. Also, a Procfile is included, which will run the Express server on Heroku when you push your code.

This project makes use of the GraphiQL interface for easy query testing and is automatically disabled in production mode. To make queries to this API, you can either use the GraphiQL interface, or the GraphQL endpoint.

#Database Structure

Featured below is the database structure for this project. This project makes use of PostgreSQL hosted on Heroku as the database environment. Please note that any "reference" links which are listed in the type column are there for API reference only, and are foreign keys in the database.

Database Structure

#Built With


  • Ruby on Rails
  • GraphQL
  • PostgreSQL
  • Heroku


  • Stripe
  • SendGrid
  • Mailchimp
  • Sentry (Front-End)



This project is licensed under the MIT License - see the LICENSE.md file for details


Thank you to the Scalable React Boilerplate community for developing such a useful and swift starting point for building an application with React, Grommet, and GraphQL. This README includes content from the Scalable React Boilerplate to make it easy for you to understand how to get started with this project.

Thanks to Mike Merrill, the world's first publicly traded person, for providing me with advice on how to execute this project, and being a true inspiration to me.