Team repo for Advanced Software Engineering (COMS W4156) / Fall 2022
This service provides an API to manage virtual stock accounts for its (future) clients that include trading apps, financial education software, and data visualization tools. After registering their users' accounts and by keeping buy/sell transactions up-to-date, the clients are able to gain real-time insights on:
- Account balance (buy power)
- Portfolio value (current worth of all assets owned)
- Profit & Loss (calculated from balance and portfolio value)
- and more!
- Run
./mvnw spring-boot:run
- Open Postman, and follow these steps
- You need to retrieve an access token from our `/auth/login/ endpoint. In order to accomplish this:
- Select 'raw' and 'JSON' from the dropdowns in the Body tab. Copy & paste these lines:
{
"clientId": "ftx_exchange",
"password": "12345678"
}
- Then, send a POST request to
http://localhost:8080/auth/login
- Copy the access token returned in the response. Select the 'Bearer Token' in the Auth tab and paste it to the Token field
- Send a GET request to
http://localhost:8080/accounts
to retrieve a list of accounts - Explore more endpoints listed in our API Documentation!
- You can repeat these steps for other clientIds such as "binance", with the same password
- We use the JaCoCo plugin in Maven to track branch coverage of our code base
- To generate a report, run
./mvnw clean verify
- The report is generated at
/target/site/jacoco/
- We copied it to
/reports/jacoco
to comply with T5 requirements, sincetarget/
is git-ignored
- The report is generated at
- Note:
clean verify
clears thetarget/
directory and generates the JaCoCo report.- If you previously generated a FindBugs report (how-to below), you will have to regenerate it. Better yet, always generate the branch coverage report first.
- If you previously generated a checkstyle report (how-to below), you will have to regenerate it. Better yet, always generate the branch coverage report first.
- We use the FindBugs plugin in Maven to find bugs in our code base
- First, run
./mvnw compile
to generate the most up-to-date.class
files intarget/
- To generate a report, run
./mvnw findbugs:findbugs
- The report is generated at
/target/findbugsXml.xml
- We copied it to
/reports/findbugs/findbugsXml.xml
to comply with T5 requirements, sincetarget/
is git-ignored
- The report is generated at
- Developers: Use
./mvnw findbugs:gui
to open a GUI showing the report
- We use the checkstyle plugin from Maven to enforce a consistent style
- To generate a report of style errors, run
./mvnw checkstyle:checkstyle
- The report is generated at
/target/checkstyle-result.xml
- We copied it to
/reports/checkstyle/checkstyle-result.xml
to comply with T3 requirements, sincetarget/
is git-ignored
- The report is generated at
- Run
./mvnw test
- Results: Tests run: 76, Failures: 0, Errors: 0, Skipped: 0
- Run
./mvnw clean verify -P integration-test
- Results: Tests run: 10, Failures: 0, Errors: 0, Skipped: 0
- Documented at
/reports/end-to-end-tests.txt
- We deployed the service to an AWS EC2 Instance
- Use Postman to retrieve your access token from
http://ec2-3-83-151-62.compute-1.amazonaws.com:8080/auth/login
. Note: this link may go outdated - Visit other endpoints using Postman in the same way explained under the Start section
- Use Postman to retrieve your access token from
- We deployed the PostgreSQL database to an AWS RDS Instance
- The link and credentials are specified in
src/main/resources/application.properties
- The link and credentials are specified in