{"id":13801012,"url":"https://github.com/watson-developer-cloud/personality-insights-nodejs","last_synced_at":"2025-05-13T10:31:03.337Z","repository":{"id":27513386,"uuid":"30994108","full_name":"watson-developer-cloud/personality-insights-nodejs","owner":"watson-developer-cloud","description":":bar_chart: Sample Nodejs Application for the IBM Watson Personality Insights Service","archived":true,"fork":false,"pushed_at":"2022-06-23T18:55:29.000Z","size":8470,"stargazers_count":558,"open_issues_count":7,"forks_count":502,"subscribers_count":69,"default_branch":"master","last_synced_at":"2024-10-15T17:23:50.990Z","etag":null,"topics":["personality-insights"],"latest_commit_sha":null,"homepage":"https://personality-insights-demo.ng.bluemix.net/","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/watson-developer-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-19T00:10:59.000Z","updated_at":"2024-10-01T19:49:18.000Z","dependencies_parsed_at":"2022-09-26T16:21:00.677Z","dependency_job_id":null,"html_url":"https://github.com/watson-developer-cloud/personality-insights-nodejs","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fpersonality-insights-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fpersonality-insights-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fpersonality-insights-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson-developer-cloud%2Fpersonality-insights-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/watson-developer-cloud","download_url":"https://codeload.github.com/watson-developer-cloud/personality-insights-nodejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225198962,"owners_count":17437006,"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":["personality-insights"],"created_at":"2024-08-04T00:01:18.569Z","updated_at":"2024-11-18T15:31:27.551Z","avatar_url":"https://github.com/watson-developer-cloud.png","language":"JavaScript","readme":"\u003ch1 align=\"center\" style=\"border-bottom: none;\"\u003e🚀 Personality Insights Sample Application\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eThis Node.js app demonstrates how to analyze text and tweets using Personality Insights.\u003c/h3\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://travis-ci.org/watson-developer-cloud/personality-insights-nodejs\"\u003e\n    \u003cimg alt=\"Travis\" src=\"https://travis-ci.org/watson-developer-cloud/personality-insights-nodejs.svg?branch=master\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"#badge\"\u003e\n    \u003cimg alt=\"semantic-release\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003c/p\u003e\n\nThe IBM Watson [Personality Insights][service_url] service uses linguistic analysis to extract cognitive and social characteristics from input text such as email, text messages, tweets, forum posts, and more. By deriving cognitive and social preferences, the service helps users to understand, connect to, and communicate with other people on a more personalized level.\n\n\n## Prerequisites\n\n1. Sign up for an [IBM Cloud account](https://cloud.ibm.com/registration/).\n1. Download the [IBM Cloud CLI](https://cloud.ibm.com/docs/cli/index.html#overview).\n1. Create an instance of the Personality Insights service and get your credentials:\n    - Go to the [Personality Insights](https://cloud.ibm.com/catalog/services/personality-insights) page in the IBM Cloud Catalog.\n    - Log in to your IBM Cloud account.\n    - Click **Create**.\n    - Click **Show** to view the service credentials.\n    - Copy the `apikey` value.\n    - Copy the `url` value.\n\n## Configuring the application\n\n1. In the application folder, copy the *.env.example* file and create a file called *.env*\n\n    ```\n    cp .env.example .env\n    ```\n\n2. Open the *.env* file and add the service credentials that you obtained in the previous step.\n\n    Example *.env* file that configures the `apikey` and `url` for a Personality Insights service instance hosted in the US East region:\n\n    ```\n    PERSONALITY_INSIGHTS_IAM_APIKEY=X4rbi8vwZmKpXfowaS3GAsA7vdy17Qh7km5D6EzKLHL2\n    PERSONALITY_INSIGHTS_URL=https://gateway-wdc.watsonplatform.net/personality-insights/api\n    ```\n### Setting Up the Twitter Application\n\n1. [Create a Twitter application][create_twitter_app].\n\n2. Add your application's callback URL:\n  - For Bluemix environment: `\u003capplication-name\u003e.mybluemix.net/auth/twitter/callback`\n  - For Local environment: `http://localhost:3000/auth/twitter/callback`\n\n3. Update the `.env` file and add your twitter application credentials:\n\n  ```none\n  TWITTER_CONSUMER_KEY=\u003cconsumer-key\u003e\n  TWITTER_CONSUMER_SECRET=\u003cconsumer-secret\u003e\n  ```\n\n## Running locally\n\n1. Install the dependencies\n\n    ```\n    npm install\n    ```\n\n1. Run the application\n\n    ```\n    npm start\n    ```\n\n1. View the application in a browser at `localhost:3000`\n\n## Deploying to IBM Cloud as a Cloud Foundry Application\n\n1. Login to IBM Cloud with the [IBM Cloud CLI](https://cloud.ibm.com/docs/cli/index.html#overview)\n\n    ```\n    ibmcloud login\n    ```\n\n1. Target a Cloud Foundry organization and space.\n\n    ```\n    ibmcloud target --cf\n    ```\n\n1. Edit the *manifest.yml* file. Change the **name** field to something unique.  \n  For example, `- name: my-app-name`.\n1. Deploy the application\n\n    ```\n    ibmcloud app push\n    ```\n\n1. View the application online at the app URL.  \nFor example: https://my-app-name.mybluemix.net\n\n\n## Directory structure\n\n```none\n.\n├── app.js                       // express entry point\n├── config                       // express configuration\n│   ├── error-handler.js\n│   ├── express.js\n│   ├── i18n.js\n│   ├── passport.js\n│   └── security.js\n├── helpers                      // utility modules\n│   ├── personality-insights.js\n│   └── twitter-helper.js\n├── i18n                         // internationalization\n│   ├── en.json\n│   ├── es.json\n│   └── ja.json\n├── manifest.yml\n├── package.json\n├── public\n│   ├── css\n│   ├── data                     // sample text and tweets\n│   ├── fonts\n│   ├── images\n│   └── js\n├── router.js                   // express routes\n├── server.js                   // application entry point\n├── test\n└── views                       // ejs views\n```\n\n## License\n\nThis sample code is licensed under Apache 2.0.  \nFull license text is available in [LICENSE](LICENSE).\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md).\n\n## Open Source @ IBM\n\nFind more open source projects on the\n[IBM Github Page](http://ibm.github.io/).\n\n[service_url]: https://www.ibm.com/watson/services/personality-insights/\n[create_twitter_app]: https://apps.twitter.com/app/new\n","funding_links":[],"categories":["Data \u0026 AI","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatson-developer-cloud%2Fpersonality-insights-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatson-developer-cloud%2Fpersonality-insights-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatson-developer-cloud%2Fpersonality-insights-nodejs/lists"}