Skip to content

This project is a simple springboot api to get the details from couchbase DB

License

Notifications You must be signed in to change notification settings

vignesh-murugan/stats-ai

Repository files navigation

Stats AI API

This project get the AI analyzed stats data from couchbase and publish it thru springboot api.

Technologies Used:

  • springboot rest data
  • springboot data couchbase
  • Couchbase DB
  • Docker and docker-compose

Local set-up

Couchbase set-up

Use couchbase docker image to start the couchbase DB. Official Docker image for couchbase is Docker Couchbase repo

  1. docker login - login to Docker hub - use the profile name for username not the email id.
  2. docker pull couchbase - this will pull the latest version
  3. docker run -d --name db -p 8091-8094:8091-8094 -p 11210:11210 couchbase - Run coucnhbase db in port 8091
  4. Setup bucket and create user for the bucket (Important : user name and the bucket name should be same)
  5. ./gradlew build to build the jar ( -x test to exculde test task)
  6. ./gradlew bootRun or java -jar ./build/libs/stats-ai*.jar

Sample API

Method API Request Response
GET api/v1/stats localhost:8080/api/v1/stats [{"id":"statsai::1","name":"TESLA","stockId":"TSLA","suggestion":"BUY","updates":[]},{"id":"statsai::2","name":"TCS","stockId":"TCS","suggestion":"BUY","updates":[]}]
GET api/v1/stats/{name} localhost:8080/api/v1/stats/TCS {"id":"statsai::2","name":"TCS","stockId":"TCS","suggestion":"BUY","updates":[]}
POST api/v1/stats localhost:8080/api/v1/stats Header: {"id":"statsai::1","name":"TESLA","stockId":"TSLA","suggestion":"BUY","updates":[ {"id":"statsai::1","name":"TESLA","stockId":"TSLA","suggestion":"BUY","updates":[

Pending task

  • unit test
  • add logback-spring and access
  • gitlab-ci or jenkins pipeline
  • Openshift deploy config setup
  • integration test case

About

This project is a simple springboot api to get the details from couchbase DB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published