You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+61-7Lines changed: 61 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
# Scorekeep
2
-
Scorekeep is a RESTful web API implemented in Java that uses Spring to provide an HTTP interface for creating and managing game sessions and users. This project includes the scorekeep API and a frontend web app that consumes it. The frontend and API can run on the same server and domain or separately, with the API running in Elastic Beanstalk and the frontend served statically by a CDN.
2
+
Scorekeep is a RESTful web API implemented in Java that uses Spring to provide an HTTP interface for creating and managing game sessions and users. This project includes the Scorekeep API and a frontend web app that consumes it. The frontend and API can run on the same server and domain or separately, with the API running in Elastic Beanstalk and the frontend served statically by a CDN.
3
3
4
-
The project shows the use of Spring, Angular, nginx, the AWS SDK for Java, DynamoDB, Gradle, CORS, and Elastic Beanstalk features that let you run both components on the same EC2 instance, create required DynamoDB tables as part of the Elastic Beanstalk environment, and build the API from source on-instance during deployment.
4
+
The `master` branch shows the use of Spring, Angular, nginx, the AWS SDK for Java, DynamoDB, Gradle, CORS, and Elastic Beanstalk features that let you run both components on the same EC2 instance, create required DynamoDB and SNS resources as part of the Elastic Beanstalk environment, and build the API from source on-instance during deployment.
5
+
6
+
Other branches extend the application's functionality and show the use of other AWS services. See the readme in each branch for details about the integration, and instructions for use.
5
7
6
8
**Branches**
7
9
-[`cognito`](https://github.com/awslabs/eb-java-scorekeep/tree/cognito) - Support login and store users in a Cognito user pool.
@@ -10,9 +12,35 @@ The project shows the use of Spring, Angular, nginx, the AWS SDK for Java, Dynam
10
12
-[`xray`](https://github.com/awslabs/eb-java-scorekeep/tree/xray) - Use the AWS X-Ray SDK to instrument incoming requests, SDK clients, SQL queries, HTTP clients, and sections of code.
11
13
-[`xray-gettingstarted`](https://github.com/awslabs/eb-java-scorekeep/tree/xray-gettingstarted) ([tutorial](https://docs.aws.amazon.com/xray/latest/devguide/xray-gettingstarted.html)) - Use the AWS X-Ray to instrument incoming requests and SDK clients (no additional configuration required).
12
14
13
-
Use the procedures in the following sections to run the project on AWS Elastic Beanstalk and configure it for local testing and development.
15
+
Use the procedures in the following sections to run the project on AWS Elastic Beanstalk and configure it for local testing and development.
16
+
17
+
**Sections**
18
+
-[Prerequisites](#prerequisites)
19
+
-[Deploy the application](#deploy-the-application)
-[Running the project locally](#running-the-project-locally)
23
+
-[Contributing](#contributing)
24
+
25
+
# Prerequisites
26
+
- User permissions - Elastic Beanstalk, IAM*
27
+
- Instance profile with permission to use DynamoDB and SNS
28
+
- Elastic Beanstalk environment running Java 8
29
+
30
+
*If you don't have permission to manage permissions in IAM, get someone who does to add DynamoDB and SNS permissions to the default Elastic Beanstalk instance profile.
31
+
32
+
## Get permission to use Elastic Beanstalk
33
+
If you are using an IAM user with limited permissions, good work! Add Elastic Beanstalk permissions to your user account to get started.
34
+
35
+
*To add Elastic Beanstalk permissions to an IAM user*
36
+
37
+
1. Sign in to a user or role with administrator permissions.
38
+
2. Open the [users page](https://console.aws.amazon.com/iam/home#/users) of the IAM console.
39
+
3. Choose a user.
40
+
4. Click **Add permissions**.
41
+
5. Add the **AWSElasticBeanstalkFullAccess** managed policy.
14
42
15
-
## Create an AWS Elastic Beanstalk environment
43
+
## Create an Elastic Beanstalk environment
16
44
Create a Java 8 SE environment in Elastic Beanstalk to host the application.
17
45
18
46
*To create an Elastic Beanstalk environment running the Java 8 SE platform*
@@ -32,7 +60,7 @@ When the Scorekeep API runs in AWS Elastic Beanstalk, it uses the permissions of
32
60
3. Select [AmazonDynamoDBFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess) and click **Attach Policy**.
33
61
3. Select [AmazonSNSFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonSNSFullAccess) and click **Attach Policy**.
34
62
35
-
##Deploy the application
63
+
# Deploy the application
36
64
Deploy the source code for the project to your Elastic Beanstalk environment.
37
65
38
66
*To deploy the source code*
@@ -48,7 +76,7 @@ Deploy the source code for the project to your Elastic Beanstalk environment.
48
76
49
77
Click through the app to explore its functionality. Use the network console in your browser to see the HTTP requests that it sends to the API to read and write users, sessions, games, moves and game state to DynamoDB via the API.
50
78
51
-
##Configure Notifications
79
+
# Configure notifications
52
80
The API uses Amazon SNS to send a notification email when a game ends. To enable notifications, configure your email address in an environment variable.
53
81
54
82
*To enable notifications*
@@ -158,4 +186,30 @@ When you run both the API and frontend in the same Elastic Beanstalk environment
158
186
159
187
~/eb-java-scorekeep$ git archive -o scorekeep-v1.zip HEAD
160
188
161
-
5. Open your environment's Dashboard in the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home) and deploy the updated code.
189
+
5. Open your environment's Dashboard in the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home) and deploy the updated code.
190
+
191
+
# Contributing
192
+
193
+
This sample application could be better with your help!
194
+
195
+
- Add a new game!
196
+
- Implement game logic in game class. See [TicTacToe.java](https://github.com/awslabs/eb-java-scorekeep/blob/master/src/main/java/scorekeep/TicTacToe.java)
197
+
- Add the class to [RulesFactory.java](https://github.com/awslabs/eb-java-scorekeep/blob/master/src/main/java/scorekeep/RulesFactory.java)
198
+
- Create your own client frontend!
199
+
- Web frameworks - Angular 2, React, ember, etc
200
+
- Mobile app
201
+
- Desktop application
202
+
- Integrate with other AWS services!
203
+
- CICD with CodeCommit, CodePipeline, CodeBuild, and CodeDeploy
204
+
- Analytics with Kinesis, Athena, EMR, or QuickSight
205
+
- Security with VPC
206
+
- Performance with ElastiCache
207
+
- Scalability with CloudFront
208
+
- Portability with ECS or CloudFormation
209
+
- Accessibility with Polly
210
+
- Write tests!
211
+
- Unit tests
212
+
- Integration tests
213
+
- Functional tests
214
+
- Load tests
215
+
- File an [issue](https://github.com/awslabs/eb-java-scorekeep/issues) to report a bug or request new features.
0 commit comments