This is an Online Memory game build with Love, React, NodeJS, AWS AppSync, GraphQL and more.
The production version of this project is running live at master.d3czed5ma25sw0.amplifyapp.com
This project requires NodeJS (version 12.4.0 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v
6.9.0
v12.4.0
This project will also require a server side instance running on AWS. Read the Server side App section to know more
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
BEFORE YOU INSTALL: please read the prerequisites
Start with cloning this repo on your local machine:
$ git clone https://github.com/Online-Memory/online-memory.git
$ cd online-memory
Then install the Node dependencies with Yarn
$ yarn
$ yarn start
This app will require a GraphQL server instance running on AWS. To create a development version of the infrastructure required, you will first need an AWS account. Then make sure your AWS credentials are available to Severless. (Follow the official guide from https://serverless.com/framework/docs/providers/aws/guide/credentials/)
Then just run the following Yarn script to make use of AWS Cloud Formation for creating all the required AWS services.
Note: Make sure to use the correct Account ID. This is your AWS Account Id and can be found under the dropdown menu in the AWS toolbar.
$ ACCOUNT_ID={YOUR_AWS_ACCOUNT_ID_HERE} yarn server:dev:deploy
Once done, rename the .env.sample
file under the packages/client/
to .env
and fill the missing information
AppSync is a GraphQL service running on AWS. We use this to manage all the communications between client and backend applications as well as establishing a websocket connection for real-time communication
AWS Lambdas will be used to perform some GraphQL resolvers
An S3 bucket will be used to store the code for the Lambdas
A Dynamo database will be used for storing users and games infomation
AWS Cognito will take care of the user authentication process
The AWS Identity and Access Management service will be used to manage the access/permissions to the different services allowing them to interact with each other
CloudWatch is used for debugging the backend services running on AWS.
This is not enabled by default and it recommended to only turn this on on a Development or Staging environment.
To enable the debug mode, uncomment the last section of the serverless.yml
file inside the packages/server
folder
Note: This process is already integrated by GitHub Actions. Use the following steps only for local development/debug
This project uses github_changelog_generator for automatically generate the changelog file visible on the production website.
github_changelog_generator
requires Ruby >=v2.5.0. If you don't have it already, install it with rvm:
$ curl -L https://get.rvm.io | bash -s stable
The upgrade your Ruby version to 2.5.0 with
$ rvm install ruby-2.5.0
$ rvm use 2.5.0
Then install github_changelog_generator
with
$ gem install github_changelog_generator
Now you can run github_changelog_generator
with
$ github_changelog_generator -u Online-Memory -p online-memory --token YOUR_GITHUB_TOKEN --no-unreleased --pull-requests
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Add your changes:
git add .
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request 😎
- JavaScript
- React
- Apollo
- NodeJS
- AWS
- Amplify
- Serverless
- Ruby
- VSCode
- Love
We use SemVer for versioning. For the versions available, see the CHANGELOG.
MIT License © Andrea SonnY