{"id":18710768,"url":"https://github.com/ludwigandreas/forum-rest-api-backend","last_synced_at":"2026-04-11T11:01:28.677Z","repository":{"id":244856626,"uuid":"816462906","full_name":"LudwigAndreas/Forum-REST-API-Backend","owner":"LudwigAndreas","description":"Microservice-based REST API backend for a forum application. The backend is built using Java with Spring. The application utilizes most of the current technologies used in enterprise solutions. The application is containerized using Docker and deployed using Docker Compose.","archived":false,"fork":false,"pushed_at":"2024-06-17T21:07:07.000Z","size":2339,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T08:49:57.625Z","etag":null,"topics":["docker","docker-compose","java","microservice","mongodb","postgresql","reactive-programming","rest-api","spring-boot","webflux"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LudwigAndreas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-17T20:05:04.000Z","updated_at":"2024-08-07T12:09:04.000Z","dependencies_parsed_at":"2024-06-17T23:08:20.835Z","dependency_job_id":null,"html_url":"https://github.com/LudwigAndreas/Forum-REST-API-Backend","commit_stats":null,"previous_names":["ludwigandreas/forum-rest-api-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LudwigAndreas/Forum-REST-API-Backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LudwigAndreas%2FForum-REST-API-Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LudwigAndreas%2FForum-REST-API-Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LudwigAndreas%2FForum-REST-API-Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LudwigAndreas%2FForum-REST-API-Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LudwigAndreas","download_url":"https://codeload.github.com/LudwigAndreas/Forum-REST-API-Backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LudwigAndreas%2FForum-REST-API-Backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31677819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T08:18:19.405Z","status":"ssl_error","status_checked_at":"2026-04-11T08:17:08.892Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","docker-compose","java","microservice","mongodb","postgresql","reactive-programming","rest-api","spring-boot","webflux"],"created_at":"2024-11-07T12:35:36.547Z","updated_at":"2026-04-11T11:01:28.630Z","avatar_url":"https://github.com/LudwigAndreas.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Forum REST API Backend\n\n🚧 Project Status: In Progress 🚧\n\n**Note**: This project is currently under development. Not all features have been implemented yet. Please refer to the Features section for details on what has been completed and what is still in progress.\n\n## Overview\n\nMicroservice-based REST API backend for a forum application. The backend is built using Java with Spring. The application utilizes most of the current technologies used in enterprise solutions. The application is containerized using Docker and deployed using Docker Compose.\n\n## Features\n\n- [x] User authentication and authorization using Keycloak\n- [x] Topics service implemented using Spring WebFlux\n- [x] User service integrated with Keycloak\n- [x] Topics service caching using Redis\n- [ ] Common Docker Compose setup\n- [ ] User service caching using Redis\n- [ ] Id Generator service for generating unique IDs for topics\n- [ ] Topics service sharding using Id Generator service\n- [ ] Gateway service using Spring Cloud Gateway\n- [ ] Monitoring using Prometheus and Grafana\n- [ ] Distributed tracing using Jaeger\n- [ ] Analytics service for tracking user activity\n- [ ] Kafka for data streaming\n- [ ] CI/CD pipeline using Jenkins\n- [ ] Deployment using Kubernetes\n\n## Table of Contents\n\n- [Architecture](#architecture)\n  - [Diagram](#diagram)\n  - [Components](#components)\n  - [Data Flow](#data-flow)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [Services](#services)\n  - [Keycloak](#keycloak)\n  - [Users](#users)\n  - [Topics](#topics)\n  - [Analytics](#analytics)\n- [Configuration](#configuration)\n  - [Environment Variables](#environment-variables)\n- [Deployment](#deployment)\n  - [Docker Compose](#docker-compose)\n- [Usage](#usage)\n  - [Authentication](#authentication)\n  - [API Requests](#api-requests)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Architecture\n\n### Diagram\n\n![Architecture Diagram](img/architecture.png)\n\n### Components\n\n- [ ] **Gateway**: API Gateway using Spring Cloud Gateway.\n- [x] **Authentication**: User authentication and authorization using Keycloak as SSO.\n- [x] **Users**: Synchronous REST API for user management using PostgreSQL database.\n- [x] **Topics**: Reactive REST API for topic management using MongoDB database and caching using Redis.\n- [ ] **Id Generator**: Unique ID generation using Snowflake for Topics service.\n- [ ] **Monitoring**: Monitoring using Prometheus and Grafana.\n- [ ] **Tracing**: Distributed tracing using Jaeger.\n- [ ] **Analytics**: Analytics service for tracking user activity.\n\n### Data Flow\n\n1. **Gateway**: Receives incoming requests and routes them to the appropriate service.\n2. **Authentication**: Authenticates the user and generates a JWT token.\n3. **Users**: Manages user data and provides user information\n4. **Topics**: Manages topic data and provides topic information\n5. **Id Generator**: Generates unique IDs for topics\n6. **Monitoring**: Monitors the health of the services\n7. **Tracing**: Traces the requests between services\n8. **Analytics**: Tracks user activity\n\n## Getting Started\n\n### Prerequisites\n\n- **Docker**: Containerization\n- **Docker Compose**: Deployment\n\n### Installation\n\n1. Clone the repository\n\n   ```sh\n   git clone https://github.com/LudwigAndreas/Forum-REST-API-Backend.git\n   ```\n\n2. Change directory\n\n   ```sh\n    cd Forum-REST-API-Backend\n    ```\n\n3. Build the Docker images\n\n   ```sh\n   docker-compose build\n   ```\n\n4. Start the services\n\n   ```sh\n    docker-compose up\n    ```\n\n## Services\n\n### Keycloak\n\nKeycloak is used as the SSO for user authentication and authorization. The service is responsible for generating JWT tokens for authenticated users.\nKeycloak is pre-configured with the following admin credentials:\n\n```text\nUsername: admin\nPassword: admin\n```\n\nKeycloak can be accessed at [http://localhost:8080](http://localhost:8080).\n\n### Users\n\nUser service is a synchronous REST API for user management. It implements CRUD operations for user data. The service uses a PostgreSQL database for storing user data. Service integrated with Keycloak: when a user is created, a new user is also created in Keycloak.\n\nUser service can be accessed at [http://localhost:8081](http://localhost:8081).\n\n### Topics\n\nTopic service is a reactive REST API for topic management. It implements CRUD operations for topic data. Reactive stack based on Spring WebFlux. The service uses a MongoDB database for storing topic data. The service also uses Redis for caching topic data. ~~The service also uses an Id Generator service for generating unique IDs for topics (it used for sharding).~~\n\nTopic service can be accessed at [http://localhost:8082](http://localhost:8082).\n\n### Analytics\n\nAnalytics service is responsible for tracking user activity. The service is **not implemented yet**. The data is fed into the service via Kafka.\n\n## Configuration\n\n### Environment Variables\n\nThe services are configured using environment variables. The environment variables are defined in the `.env` file.\n\n```env\n# Keycloak\nKEYCLOAK_URL=http://keycloak:8080\nKEYCLOAK_REALM=forum\nKEYCLOAK_CLIENT_ID=forum\nKEYCLOAK_CLIENT_SECRET=secret\n\n# Users\nUSERS_URL=http://users:8081\n\n# Topics\nTOPICS_URL=http://topics:8082\n```\n\n## Deployment\n\n### Docker Compose\n\nThe application is containerized using Docker and deployed using Docker Compose. The services are defined in the `docker-compose.yml` file.\n\n```sh\ndocker-compose up\n```\n\n## Usage\n\nExamples of how to use the API endpoints described in the `docs` directory. (**Not implemented yet**)\n\n### Authentication\n\nTo authenticate a user, send a POST request to the Keycloak token endpoint with the user credentials.\n\n```sh\ncurl -X POST http://localhost:8080/auth/realms/forum/protocol/openid-connect/token \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -d 'username=admin\u0026password=admin\u0026grant_type=password\u0026client_id=forum\u0026client_secret=secret'\n```\n\n### API Requests\n\nThe services can be accessed using the following endpoints:\n\n- **Users**: [http://localhost:8081](http://localhost:8081)\n- **Topics**: [http://localhost:8082](http://localhost:8082)\n- **Analytics**: [http://localhost:8083](http://localhost:8083) (**Not implemented yet**)\n\nDocumentation for the API endpoints can be found in the `docs` directory. (**Not implemented yet**)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fludwigandreas%2Fforum-rest-api-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fludwigandreas%2Fforum-rest-api-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fludwigandreas%2Fforum-rest-api-backend/lists"}