{"id":20763680,"url":"https://github.com/infosys/discourse-java","last_synced_at":"2025-04-30T07:49:59.134Z","repository":{"id":42202965,"uuid":"438131635","full_name":"Infosys/Discourse-Java","owner":"Infosys","description":"Discourse-java is a platform where users can freely discuss on topics they want to, and like-minded people can join in and contribute","archived":false,"fork":false,"pushed_at":"2023-05-20T13:03:56.000Z","size":12469,"stargazers_count":18,"open_issues_count":3,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-30T07:49:47.644Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Infosys.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}},"created_at":"2021-12-14T05:41:46.000Z","updated_at":"2025-02-08T10:22:17.000Z","dependencies_parsed_at":"2022-08-12T09:20:21.561Z","dependency_job_id":null,"html_url":"https://github.com/Infosys/Discourse-Java","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/Infosys%2FDiscourse-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infosys%2FDiscourse-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infosys%2FDiscourse-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infosys%2FDiscourse-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Infosys","download_url":"https://codeload.github.com/Infosys/Discourse-Java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666227,"owners_count":21624291,"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":[],"created_at":"2024-11-17T10:45:28.530Z","updated_at":"2025-04-30T07:49:59.113Z","avatar_url":"https://github.com/Infosys.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ca href=\"https://www.discourse.org/\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/discourse/discourse/main/images/discourse-readme-logo.png\" width=\"300px\"\u003e\n\u003c/a\u003e\n\nDiscourse is the 100% open source discussion platform built for the next decade of the Internet. Use it as a:\n\n- mailing list\n- discussion forum\n- long-form chat room\n\n## Prominent features\n1.\tMultiple discussion threads on home page which can be filtered based on categories.\n2.\tRich text editor integrated to create and update posts (supports HTML snippets and image uploads).\n3.\tUser can search for topics or posts and identify similar posts using Elastic Search.\n4.\tUsers can create topics for different categories and add tags to the topics or select a similar topic from the suggestions provided.\n5.\tUsers can like and reply to topics and posts and edit or delete their own posts. \n6.\tSupports nested replies to topics/posts.\n7.\tUsers can sort posts in a topic based on like or reply counts.\n8.\tUsers can send private messages to admin.\n9.\tAdmin can create categories and announcements.\n10.\tAnnouncements can be viewed by non-logged in users also in landing page.\n11.\tAdmin can moderate posts and hide/delete posts of any user.\n12.\tOffensive posts get auto-hidden using text-classifier to detect toxicity.\n13.\tUsers get push notifications when they receive a reply to their post, or when someone creates a post in their topic or when their post is hidden/deleted by system/admin.\n14.\tUser can register and log in to the platform using Key Cloak registration or social login (Google, Facebook, Github).\n\n\nThis application was generated using JHipster 6.10.5, you can find documentation and help at [https://www.jhipster.tech/documentation-archive/v6.10.5](https://www.jhipster.tech/documentation-archive/v6.10.5).\n\n## Development\n\nBefore you can build this project, you must install and configure the following dependencies on your machine:\n\n1. [Node.js][]: We use Node to run a development web server and build the project.\n   Depending on your system, you can install Node either from source or as a pre-packaged bundle.\n\nAfter installing Node, you should be able to run the following command to install development tools.\nYou will only need to run this command when dependencies change in [package.json](package.json).\n\n```\nnpm install\n```\n\nWe use npm scripts and [Webpack][] as our build system.\n\nRun the following commands in two separate terminals to create a blissful development experience where your browser\nauto-refreshes when files change on your hard drive.\n\n```\n\n./mvnw\n\n\nnpm start\n```\n\nNpm is also used to manage CSS and JavaScript dependencies used in this application. You can upgrade dependencies by\nspecifying a newer version in [package.json](package.json). You can also run `npm update` and `npm install` to manage dependencies.\nAdd the `help` flag on any command to see how you can use it. For example, `npm help update`.\n\nThe `npm run` command will list all of the scripts available to run for this project.\n\n## OAuth 2.0 / OpenID Connect\n\nCongratulations! You've selected an excellent way to secure your JHipster application. If you're not sure what OAuth and OpenID Connect (OIDC) are, please see [What the Heck is OAuth?](https://developer.okta.com/blog/2017/06/21/what-the-heck-is-oauth)\n\nTo log in to your app, you'll need to have [Keycloak](https://keycloak.org) up and running. The JHipster Team has created a Docker container for you that has the default users and roles. Start Keycloak using the following command.\n\n```\ndocker-compose -f src/main/docker/keycloak.yml up\n```\n\nThe security settings in `src/main/resources/config/application.yml` are configured for this image.\n\n```yaml\nspring:\n  ...\n  security:\n    oauth2:\n      client:\n        provider:\n          oidc:\n            issuer-uri: http://localhost:9080/auth/realms/jhipster\n        registration:\n          oidc:\n            client-id: web_app\n            client-secret: web_app\n```\n\n### Okta\n\nIf you'd like to use Okta instead of Keycloak, you'll need to change a few things. First, you'll need to create a free developer account at \u003chttps://developer.okta.com/signup/\u003e. After doing so, you'll get your own Okta domain, that has a name like `https://dev-123456.okta.com`.\n\nModify `src/main/resources/config/application.yml` to use your Okta settings.\n\n```yaml\nspring:\n  ...\n  security:\n    oauth2:\n      client:\n        provider:\n          oidc:\n            issuer-uri: https://{yourOktaDomain}/oauth2/default\n        registration:\n          oidc:\n            client-id: {clientId}\n            client-secret: {clientSecret}\nsecurity:\n```\n\nCreate an OIDC App in Okta to get a `{clientId}` and `{clientSecret}`. To do this, log in to your Okta Developer account and navigate to **Applications** \u003e **Add Application**. Click **Web** and click the **Next** button. Give the app a name you’ll remember, specify `http://localhost:8080` as a Base URI, and `http://localhost:8080/login/oauth2/code/oidc` as a Login Redirect URI. Click **Done**, then Edit and add `http://localhost:8080` as a Logout redirect URI. Copy and paste the client ID and secret into your `application.yml` file.\n\nCreate a `ROLE_ADMIN` and `ROLE_USER` group and add users into them. Modify e2e tests to use this account when running integration tests. You'll need to change credentials in `src/test/javascript/e2e/account/account.spec.ts` and `src/test/javascript/e2e/admin/administration.spec.ts`.\n\nNavigate to **API** \u003e **Authorization Servers**, click the **Authorization Servers** tab and edit the default one. Click the **Claims** tab and **Add Claim**. Name it \"groups\", and include it in the ID Token. Set the value type to \"Groups\" and set the filter to be a Regex of `.*`.\n\nAfter making these changes, you should be good to go! If you have any issues, please post them to [Stack Overflow](https://stackoverflow.com/questions/tagged/jhipster). Make sure to tag your question with \"jhipster\" and \"okta\".\n\n### PWA Support\n\nJHipster ships with PWA (Progressive Web App) support, and it's turned off by default. One of the main components of a PWA is a service worker.\n\nThe service worker initialization code is commented out by default. To enable it, uncomment the following code in `src/main/webapp/index.html`:\n\n```html\n\u003cscript\u003e\n  if ('serviceWorker' in navigator) {\n    navigator.serviceWorker.register('./service-worker.js').then(function () {\n      console.log('Service Worker Registered');\n    });\n  }\n\u003c/script\u003e\n```\n\nNote: [Workbox](https://developers.google.com/web/tools/workbox/) powers JHipster's service worker. It dynamically generates the `service-worker.js` file.\n\n### Managing dependencies\n\nFor example, to add [Leaflet][] library as a runtime dependency of your application, you would run following command:\n\n```\nnpm install --save --save-exact leaflet\n```\n\nTo benefit from TypeScript type definitions from [DefinitelyTyped][] repository in development, you would run following command:\n\n```\nnpm install --save-dev --save-exact @types/leaflet\n```\n\nThen you would import the JS and CSS files specified in library's installation instructions so that [Webpack][] knows about them:\nEdit [src/main/webapp/app/vendor.ts](src/main/webapp/app/vendor.ts) file:\n\n```\nimport 'leaflet/dist/leaflet.js';\n```\n\nEdit [src/main/webapp/content/scss/vendor.scss](src/main/webapp/content/scss/vendor.scss) file:\n\n```\n@import '~leaflet/dist/leaflet.css';\n```\n\nNote: There are still a few other things remaining to do for Leaflet that we won't detail here.\n\nFor further instructions on how to develop with JHipster, have a look at [Using JHipster in development][].\n\n### Using Angular CLI\n\nYou can also use [Angular CLI][] to generate some custom client code.\n\nFor example, the following command:\n\n```\nng generate component my-component\n```\n\nwill generate few files:\n\n```\ncreate src/main/webapp/app/my-component/my-component.component.html\ncreate src/main/webapp/app/my-component/my-component.component.ts\nupdate src/main/webapp/app/app.module.ts\n```\n\n## Building for production\n\n### Packaging as jar\n\nTo build the final jar and optimize the discourse application for production, run:\n\n```\n\n./mvnw -Pprod clean verify\n\n\n```\n\nThis will concatenate and minify the client CSS and JavaScript files. It will also modify `index.html` so it references these new files.\nTo ensure everything worked, run:\n\n```\n\njava -jar target/*.jar\n\n\n```\n\nThen navigate to [http://localhost:8080](http://localhost:8080) in your browser.\n\nRefer to [Using JHipster in production][] for more details.\n\n### Packaging as war\n\nTo package your application as a war in order to deploy it to an application server, run:\n\n```\n\n./mvnw -Pprod,war clean verify\n\n\n```\n\n## Testing\n\nTo launch your application's tests, run:\n\n```\n./mvnw verify\n```\n\n### Client tests\n\nUnit tests are run by [Jest][] and written with [Jasmine][]. They're located in [src/test/javascript/](src/test/javascript/) and can be run with:\n\n```\nnpm test\n```\n\nFor more information, refer to the [Running tests page][].\n\n### Code quality\n\nSonar is used to analyse code quality. You can start a local Sonar server (accessible on http://localhost:9001) with:\n\n```\ndocker-compose -f src/main/docker/sonar.yml up -d\n```\n\nYou can run a Sonar analysis with using the [sonar-scanner](https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner) or by using the maven plugin.\n\nThen, run a Sonar analysis:\n\n```\n./mvnw -Pprod clean verify sonar:sonar\n```\n\nIf you need to re-run the Sonar phase, please be sure to specify at least the `initialize` phase since Sonar properties are loaded from the sonar-project.properties file.\n\n```\n./mvnw initialize sonar:sonar\n```\n\nFor more information, refer to the [Code quality page][].\n\n## Using Docker to simplify development (optional)\n\nYou can use Docker to improve your JHipster development experience. A number of docker-compose configuration are available in the [src/main/docker](src/main/docker) folder to launch required third party services.\n\nFor example, to start a postgresql database in a docker container, run:\n\n```\ndocker-compose -f src/main/docker/postgresql.yml up -d\n```\n\nTo stop it and remove the container, run:\n\n```\ndocker-compose -f src/main/docker/postgresql.yml down\n```\n\nYou can also fully dockerize your application and all the services that it depends on.\nTo achieve this, first build a docker image of your app by running:\n\n```\n./mvnw -Pprod verify jib:dockerBuild\n```\n\nThen run:\n\n```\ndocker-compose -f src/main/docker/app.yml up -d\n```\n\nFor more information refer to [Using Docker and Docker-Compose][], this page also contains information on the docker-compose sub-generator (`jhipster docker-compose`), which is able to generate docker configurations for one or several JHipster applications.\n\n## Continuous Integration (optional)\n\nTo configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information.\n\n[jhipster homepage and latest documentation]: https://www.jhipster.tech\n[jhipster 6.10.5 archive]: https://www.jhipster.tech/documentation-archive/v6.10.5\n[using jhipster in development]: https://www.jhipster.tech/documentation-archive/v6.10.5/development/\n[using docker and docker-compose]: https://www.jhipster.tech/documentation-archive/v6.10.5/docker-compose\n[using jhipster in production]: https://www.jhipster.tech/documentation-archive/v6.10.5/production/\n[running tests page]: https://www.jhipster.tech/documentation-archive/v6.10.5/running-tests/\n[code quality page]: https://www.jhipster.tech/documentation-archive/v6.10.5/code-quality/\n[setting up continuous integration]: https://www.jhipster.tech/documentation-archive/v6.10.5/setting-up-ci/\n[node.js]: https://nodejs.org/\n[yarn]: https://yarnpkg.org/\n[webpack]: https://webpack.github.io/\n[angular cli]: https://cli.angular.io/\n[browsersync]: https://www.browsersync.io/\n[jest]: https://facebook.github.io/jest/\n[jasmine]: https://jasmine.github.io/2.0/introduction.html\n[protractor]: https://angular.github.io/protractor/\n[leaflet]: https://leafletjs.com/\n[definitelytyped]: https://definitelytyped.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfosys%2Fdiscourse-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfosys%2Fdiscourse-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfosys%2Fdiscourse-java/lists"}