{"id":20485037,"url":"https://github.com/SAP-archive/bulletinboard-reviews-nodejs","last_synced_at":"2025-09-25T03:31:41.659Z","repository":{"id":74143001,"uuid":"442513382","full_name":"SAP-samples/bulletinboard-reviews-nodejs","owner":"SAP-samples","description":"Bulletin board sample application - reviews service in Node.js.","archived":false,"fork":false,"pushed_at":"2022-09-06T00:59:46.000Z","size":379,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-15T16:35:26.744Z","etag":null,"topics":["bulletin-board","microservices","microservices-development","sample","sample-code"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SAP-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-28T16:00:14.000Z","updated_at":"2022-03-11T16:44:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"6bd9d590-575e-4c43-b67e-fb442d8ebc84","html_url":"https://github.com/SAP-samples/bulletinboard-reviews-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fbulletinboard-reviews-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fbulletinboard-reviews-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fbulletinboard-reviews-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fbulletinboard-reviews-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAP-samples","download_url":"https://codeload.github.com/SAP-samples/bulletinboard-reviews-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234149568,"owners_count":18787175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bulletin-board","microservices","microservices-development","sample","sample-code"],"created_at":"2024-11-15T16:27:15.149Z","updated_at":"2025-09-25T03:31:41.654Z","avatar_url":"https://github.com/SAP-samples.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Deprecation Notice\n\nThis public repository is read-only and no longer maintained.\n\n![](https://img.shields.io/badge/STATUS-NOT%20CURRENTLY%20MAINTAINED-red.svg?longCache=true\u0026style=flat)\n\n---\n[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/bulletinboard-reviews-nodejs)](https://api.reuse.software/info/github.com/SAP-samples/bulletinboard-reviews-nodejs)\n\n# Bulletin Board - Reviews Service\n\n## Description\n\nThis is the reviews service for the bulletin board application. Reviews refer to the _users_ who advertise things, _not_ the advertised things. The server is written in Node.js. The client is written using Preact and SAP UI5 Web Components. The purpose of this application is to demonstrate Microservice development and related tradeoffs. In particular, the service bulletinboard-ads is tightly coupled to this service, through a synchronous HTTP call to an API for a very specific feature that the advertisements service needs. This is a typical pitfall in Microservice development and can be mitigated by leveraging eventual consistency \u0026 asynchronous communication.\n\n## Requirements\n\nThe following tools are required to run the service locally:\n- Node.js, v16 or later\n- Docker engine, v20 or later\n  - Alternatively, a PostgreSQL database, v9.6 or later\n- Optionally a Bourne shell\n  - Provided shell scripts make the startup easier\n  - Git bash is a good choice for Windows users\n\n## Local Setup\n\n- Start a pre-configured database using Docker: `./start-db.sh`\n  - If you want to start the database manually, or use your own PostgreSQL installation without Docker, have a look into the shell script to know the required configuration for version, database name, port, credentials and schema\n- Install the required dependencies: `npm ci`\n- Run the tests: `npm test`\n- Start the service: `npm start`\n  - The service will listen on port 9090\n\n## Cloud Setup\n\n### Cloud Foundry\n\nFor a deployment on Cloud Foundry, a pre-configured [manifest.yaml](manifest.yaml) with placeholders is provided.\n\n### Kubernetes\n\nFor a deployment on Kubernetes, a pre-configured [k8s-minimal.yaml](k8s-minimal.yaml) with placeholders is provided, along with a basic [Dockerfile](Dockerfile).\n\n## HTTP API\n\nThe following endpoints are supported and tested:\n- `GET /api/v1/averageRatings/:contact`: get the average rating of a given contact\n  - Response:\n    - `200 OK`\n  - Response Body:\n    ```\n    { \"average_rating\": \u003cnumber\u003e }\n    ```\n- `GET /api/v1/reviews`: get all reviews\n  - Response:\n    - `200 OK`\n  - Response Body:\n    ```\n    [\n      {\n          \"reviewee_email\": \u003ctext\u003e,\n          \"reviewer_email\": \u003ctext\u003e,\n          \"rating\": \u003cinteger\u003e,\n          \"comment\": \u003ctext\u003e\n      },\n      ...\n    ]\n    ```\n- `POST /api/v1/reviews`: post a new review\n  - Request Headers:\n    - `Content-Type: application/json`\n  - Request Body:\n    ```\n    {\n      \"reviewee_email\": \u003ctext\u003e,\n      \"reviewer_email\": \u003ctext\u003e,\n      \"rating\": \u003cinteger\u003e,\n      \"comment\": \u003ctext\u003e\n    }\n    ```\n  - Response:\n    - `204 No Content`\n- `DELETE /api/v1/reviews`: delete all reviews\n  - Response:\n    - `204 No Content`\n\n## How to obtain support\n[Create an issue](https://github.com/SAP-samples/bulletinboard-reviews/issues) in this repository if you find a bug or have questions about the content.\n\nFor additional support, [ask a question in SAP Community](https://answers.sap.com/questions/ask.html).\n\n## Contributing\nIf you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses [the standard DCO text of the Linux Foundation](https://developercertificate.org/).\n\n## License\nCopyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSES/Apache-2.0.txt) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSAP-archive%2Fbulletinboard-reviews-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSAP-archive%2Fbulletinboard-reviews-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSAP-archive%2Fbulletinboard-reviews-nodejs/lists"}