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
+51-5Lines changed: 51 additions & 5 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
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.
@@ -12,7 +14,25 @@ The project shows the use of Spring, Angular, nginx, the AWS SDK for Java, Dynam
12
14
13
15
Use the procedures in the following sections to run the project on AWS Elastic Beanstalk and configure it for local testing and development.
14
16
15
-
## Create an AWS Elastic Beanstalk environment
17
+
# Prerequisites
18
+
- User permissions - Elastic Beanstalk, IAM*
19
+
- Instance profile with permission to use DynamoDB and SNS
20
+
- Elastic Beanstalk environment running Java 8
21
+
22
+
*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.
23
+
24
+
## Get permission to use Elastic Beanstalk
25
+
If you are using an IAM user with limited permissions, good work! Add Elastic Beanstalk permissions to your user account to get started.
26
+
27
+
*To add Elastic Beanstalk permissions to an IAM user*
28
+
29
+
1. Sign in to a user or role with administrator permissions.
30
+
2. Open the [users page](https://console.aws.amazon.com/iam/home#/users) of the IAM console.
31
+
3. Choose a user.
32
+
4. Click **Add permissions**.
33
+
5. Add the **AWSElasticBeanstalkFullAccess** managed policy.
34
+
35
+
## Create an Elastic Beanstalk environment
16
36
Create a Java 8 SE environment in Elastic Beanstalk to host the application.
17
37
18
38
*To create an Elastic Beanstalk environment running the Java 8 SE platform*
@@ -32,7 +52,7 @@ When the Scorekeep API runs in AWS Elastic Beanstalk, it uses the permissions of
32
52
3. Select [AmazonDynamoDBFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess) and click **Attach Policy**.
33
53
3. Select [AmazonSNSFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonSNSFullAccess) and click **Attach Policy**.
34
54
35
-
##Deploy the application
55
+
# Deploy the application
36
56
Deploy the source code for the project to your Elastic Beanstalk environment.
37
57
38
58
*To deploy the source code*
@@ -48,7 +68,7 @@ Deploy the source code for the project to your Elastic Beanstalk environment.
48
68
49
69
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
70
51
-
##Configure Notifications
71
+
# Configure Notifications
52
72
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
73
54
74
*To enable notifications*
@@ -158,4 +178,30 @@ When you run both the API and frontend in the same Elastic Beanstalk environment
158
178
159
179
~/eb-java-scorekeep$ git archive -o scorekeep-v1.zip HEAD
160
180
161
-
5. Open your environment's Dashboard in the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home) and deploy the updated code.
181
+
5. Open your environment's Dashboard in the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home) and deploy the updated code.
182
+
183
+
# Contributing
184
+
185
+
This sample application could be better with your help!
186
+
187
+
- Add a new game!
188
+
- Implement game logic in game class. See [TicTacToe.java](https://github.com/awslabs/eb-java-scorekeep/blob/master/src/main/java/scorekeep/TicTacToe.java)
189
+
- Add the class to [RulesFactory.java](https://github.com/awslabs/eb-java-scorekeep/blob/master/src/main/java/scorekeep/RulesFactory.java)
190
+
- Create your own client frontend!
191
+
- Web frameworks - Angular 2, React, ember, etc
192
+
- Mobile app
193
+
- Desktop application
194
+
- Integrate with other AWS services!
195
+
- CICD with CodeCommit, CodePipeline, CodeBuild, and CodeDeploy
196
+
- Analytics with Kinesis, Athena, EMR, or QuickSight
197
+
- Security with VPC
198
+
- Performance with ElastiCache
199
+
- Scalability with CloudFront
200
+
- Portability with ECS or CloudFormation
201
+
- Accessibility with Polly
202
+
- Write tests!
203
+
- Unit tests
204
+
- Integration tests
205
+
- Functional tests
206
+
- Load tests
207
+
- File an [issue](https://github.com/awslabs/eb-java-scorekeep/issues) to report a bug or request new features.
0 commit comments