{"id":40073881,"url":"https://github.com/asteriskiry/eventsignup_backend","last_synced_at":"2026-01-19T08:33:19.686Z","repository":{"id":77841760,"uuid":"465305293","full_name":"asteriskiry/eventsignup_backend","owner":"asteriskiry","description":"Backend Microservice for Eventsignup System","archived":false,"fork":false,"pushed_at":"2025-08-26T23:35:23.000Z","size":613,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-08-27T08:13:40.367Z","etag":null,"topics":["flyway","java-21","openapi","postgresql","quartz-scheduler","spotless-gradle","spring-boot","springboot3"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asteriskiry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"code_of_conduct.md","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,"zenodo":null}},"created_at":"2022-03-02T12:54:44.000Z","updated_at":"2025-01-14T20:02:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"f03df777-3286-4709-9a29-9ecc7aca0322","html_url":"https://github.com/asteriskiry/eventsignup_backend","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/asteriskiry/eventsignup_backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asteriskiry%2Feventsignup_backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asteriskiry%2Feventsignup_backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asteriskiry%2Feventsignup_backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asteriskiry%2Feventsignup_backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asteriskiry","download_url":"https://codeload.github.com/asteriskiry/eventsignup_backend/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asteriskiry%2Feventsignup_backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28564017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["flyway","java-21","openapi","postgresql","quartz-scheduler","spotless-gradle","spring-boot","springboot3"],"created_at":"2026-01-19T08:33:19.625Z","updated_at":"2026-01-19T08:33:19.678Z","avatar_url":"https://github.com/asteriskiry.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eventsignup Backend\n© Juhani Vähä-Mäkilä (juhani@fmail.co.uk) and contributors 2024.\n\nLicenced under EUPL-1.2 or later.\n\nBackend microservice for event signup system. Includes Keycloak integration for authentication.\n\n## Used technologies\n\n- Java 21\n- Springboot 3.2.x\n- Apache IO Commons\n- Gradle\n- Postgres 17\n- JUnit 5 \u0026 Mockito\n- Project lombok\n- Keycloak for authentication\n- Quartz scheduler\n- OpenApi\n- Spotless for code formatting\n- [Flyway](https://docs.spring.io/spring-boot/docs/2.1.7.RELEASE/reference/html/howto-database-initialization.html#howto-use-a-higher-level-database-migration-tool)\n\n## Development\n\n- Expects Postgres at `localhost:5432`\n- Server will be at `localhost:8080`\n- OpenAPI definitions are available at http://localhost:8080/v1/api-docs.\u003cyaml | json\u003e\n- OpenAPI swagger ui is available at http://localhost:8080/swagger-ui/index.html\n\nTo run the service:\n\n    $ ./gradlew bootRunDev\n\n### Setting up\n\n1. Install OpenJDK21\n   1. [Windows](https://adoptium.net/temurin/releases/?os=windows\u0026version=21)\n   2. Linux: Install from your distro's repo\n   3. [macOs](https://adoptium.net/temurin/releases/?os=mac\u0026version=21)\n2. Install podman or docker. See [container setup](#running-locally)\n   1. Run Postgres in a container: `podman run -dt --pod new:postgres17 -e POSTGRES_PASSWORD=1234 -p 5432:5432 postgres:17.0` or `docker run -d -p 5432:5432 --name postgres17 postgres:17.0`\n3. Import existing sources as a new project in your favorite IDE (e.g. IntelliJ IDEA)\n4. Import Gradle project\n\n### Development guidelines\n\n- All text which is visible to the end user (e.g. email) must use i18n translations (messages*.properties files).\n- Main development happens in `develop` branch.\n  - All features and bug fixes are done in their own branches (branched off from `develop`).\n  - All Pull Requests should squash commits before merge so git history of develop (and ultimately `master`) remains clean and linear.\n  - Delete source branch once PR is merged.\n  - NEVER force-push to `develop`. This will break everyone else's work.\n- Avoid commiting directly to `develop`. Only PRs will run CI pipelines.\n- Only when a new version is to be released is `develop` merged into `master`.\n- Use [Semantic versioning](https://en.wikipedia.org/wiki/Software_versioning#Semantic_versioning) for releases.\n  - Use Git tags (created in `master`) for releases (builds containers) and the GitHub releases functionality.\n- Use GitHub Issues for all features, bugs etc.\n- Public interfaces need to have unit tests, and integration tests where appropriate.\n- Use Project Lombok annotations for constructors, getters, setters etc.\n\n### Code quality\n\n- All code, comments, documentation, names of classes and variables, log messages, etc. must be in English.\n- Maximum recommended line length is 120 characters.\n- Indentation must be made with 4 spaces, not tabs.\n  - Continuation indent is 4.\n- Line feeds must be UNIX-like (\\n).\n- All source files should be UTF-8, except .properties files which should be ISO-8859-1.\n- Spotless is used to automatically format code (using [palantirJavaFormat](https://github.com/palantir/palantir-java-format)).\n  - CI pipeline will fail if not properly formated.\n- All your code should follow the Java Code Conventions regarding variable/method/class naming.\n- Be [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself).\n- Try to use [test-driven-development](https://en.wikipedia.org/wiki/Test-driven_development).\n\nAutomatically format code with Spotless:\n\n    $ ./gradlew spotlessApply\n\n## Migrations with Flyway\n\nHibernate is able to update the database schema by itself pretty well though there are things it cannot/won't do\ne.g. remove a column from a table. For these instances we use [Flyway](https://docs.spring.io/spring-boot/docs/2.1.7.RELEASE/reference/html/howto-database-initialization.html#howto-use-a-higher-level-database-migration-tool)\nto migrate the database schema.\n\n## How to run with containers only\n\nIf you just need the service up and running e.g. for front-end development or prod deployment here's how to do it.\n\n### Running locally\n\nNote: Never use these commands in production!\n\n1. Install Podman or docker\n   1. Podman\n      1. [Windows](https://podman-desktop.io/docs/installation/windows-install)\n      2. Linux: install from your distro's repo\n      3. [macOs](https://podman-desktop.io/docs/installation/macos-install)\n   2. Docker Desktop: [Windows](https://docs.docker.com/desktop/install/windows-install/), [Linux](https://docs.docker.com/desktop/install/linux-install/), [MacOs](https://docs.docker.com/desktop/install/mac-install/)\n2. Run Postgres\n   1. `docker run -d -p 5432:5432 --name postgresql17 -e POSTGRES_PASSWORD=1234 postgres:17.0` or\n   2. `podman run -dt --pod new:eventsignup -p 8080:8080 -e POSTGRES_PASSWORD=1234 -p 5432:5432 postgres:17.0`\n3. Authenticate to [GHCR](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic)\n4. Create the `eventsignup` database\n5. Download .env-dev file from this repo\n6. (Only for podman) `podman run -d --pod=eventsignup --env-file=path/to/.env-dev ghcr.io/asteriskiry/eventsignup_backend:latest`\n   1. Note `latest` gives you the most recent CI pipeline built container which can be a dev snapshot. Use a version tag to get a specific version e.g. 1.0.0.\n\nTODO complete docker instructions.\n\nAfter initial run described above with podman the whole eventsignup system pod can be controlled like this `podman pod start|stop|restart eventsignup`.\n\n#### Troubleshooting\n\nIf Podman gives an error try adding `--network=slirp4netns:enable_ipv6=false` to the command.\n\n### Running in production\n\nPrerequisite: Postgres should be already running somewhere and the database exists.\n\n1. Create a .env file somewhere with values for all the variables listed in [environment variables](#environment-variables) table.\n2. Run container \n   1. `podman run -d --pod=new:eventsignup -p 8080:8080 --env-file=path/to/.env ghcr.io/asteriskiry/eventsignup_backend:\u003ctag\u003e` or\n   2. `docker run -d -p 8080:8080 --env-file=path/to/.env ghcr.io/asteriskiry/eventsignup_backend:\u003ctag\u003e`\n\nNote\n- Substitute port numbers with the port you want to run the service with (must be the same as SERVER_PORT env variable).\n- Substitute `\u003ctag\u003e` with a version tag e.g. 1.0.0.\n\n## Environment variables\nFor production these variables are needed.\n\n|                  Variable                   |                        Description                        |                Example                 |\n|:-------------------------------------------:|:---------------------------------------------------------:|:--------------------------------------:|\n|                 SERVER_PORT                 |           Which port the server is listening in           |                  8080                  |\n|                 SERVER_HOST                 |                         Hostname                          |               localhost                |\n|              SERVER_ENABLE_SSL              |               Whether to enable SSL support               |                  true                  |\n|                   DB_HOST                   |               Hostname of postgresql server               |               localhost                |\n|                   DB_PORT                   |             Which port postgresql is running              |                  5432                  |\n|                   DB_NAME                   |                 Name of the used database                 |              databaseName              |\n|                 DB_USERNAME                 |                User to connect to db with                 |                  user                  |\n|                 DB_PASSWORD                 |                 Database user's password                  |                password                |\n|                  SMTP_HOST                  |                  Hostname of SMTP server                  |               localhost                |\n|                  SMTP_PORT                  |             Port what SMTP server listens to              |                   25                   |\n|                SMTP_USERNAME                |                     SMTP servers user                     |                  user                  |\n|                SMTP_PASSWORD                |                   SMTP user's password                    |                password                |\n|            DEFAULT_SENDER_EMAIL             |             Email address for outgoing email              |          noreply@example.com           |\n|     DEFAULT_DAYS_TO_ARCHIVE_PAST_EVENTS     | After how many days old events are automatically archived |                  180                   |\n|             DEFAULT_IMAGE_PATH              |       Directory where uploaded pictures are stored        |                  /tmp                  |\n|                  BASE_URL                   |              Used to generate urls in emails              |           http://example.org           |\n|             KEYCLOAK_ISSUER_URI             |              Url where Keycloak can be found              | http://localhost:9090/realms/realmName |\n|            KEYCLOAK_CLIENT_NAME             |                  Client name in Keycloak                  |                example                 |\n|             KEYCLOAK_CLIENT_ID              |                   Client id in Keycloak                   |                example                 |\n|           KEYCLOAK_CLIENT_SECRET            |                 Client secret in Keycloak                 |                example                 |\n|                KEYCLOAK_URL                 |                     Url for Keycloak                      |         http://localhost:9090          |\n|                 LOGOUT_URL                  |                 Url to redirect on logout                 |         http://localhost:3000          |\n|             ALLOWED_CORS_DOMAIN             |        List of domains connection is allowed from         |         http://localhost:3000          |\n\n## Other info\n- testFile.jpg is 'Imladris' by joewight (https://www.deviantart.com/joewight/art/Imladris-430740597). \nDistributed under  CC by-nc-nd (http://creativecommons.org/licenses/by-nc-nd/3.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasteriskiry%2Feventsignup_backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasteriskiry%2Feventsignup_backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasteriskiry%2Feventsignup_backend/lists"}