{"id":15818711,"url":"https://github.com/alperkurtul/spring-boot-starter-firebase-realtime-database","last_synced_at":"2025-05-12T14:12:20.049Z","repository":{"id":49759233,"uuid":"218386566","full_name":"alperkurtul/spring-boot-starter-firebase-realtime-database","owner":"alperkurtul","description":"RELEASED version -- An Easy Way to Access Firebase Realtime Database in Spring Boot","archived":false,"fork":false,"pushed_at":"2023-04-14T17:58:43.000Z","size":179,"stargazers_count":22,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-06T06:04:35.615Z","etag":null,"topics":["firebase","firebase-realtime-database","spring-boot","springboot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alperkurtul.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":"2019-10-29T21:25:20.000Z","updated_at":"2024-09-09T19:23:41.000Z","dependencies_parsed_at":"2024-10-26T11:25:31.424Z","dependency_job_id":"71e58c93-54fc-45bd-9530-9918c39cc9f2","html_url":"https://github.com/alperkurtul/spring-boot-starter-firebase-realtime-database","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/alperkurtul%2Fspring-boot-starter-firebase-realtime-database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alperkurtul%2Fspring-boot-starter-firebase-realtime-database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alperkurtul%2Fspring-boot-starter-firebase-realtime-database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alperkurtul%2Fspring-boot-starter-firebase-realtime-database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alperkurtul","download_url":"https://codeload.github.com/alperkurtul/spring-boot-starter-firebase-realtime-database/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222696323,"owners_count":17024601,"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":["firebase","firebase-realtime-database","spring-boot","springboot"],"created_at":"2024-10-05T06:04:40.636Z","updated_at":"2024-11-02T12:07:19.357Z","avatar_url":"https://github.com/alperkurtul.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An Easy Way to Access `Firebase Realtime Database` in Spring Boot\nThis project gives you the ability to access to `Firebase Realtime Database`. To achieve this, you just have to add some basic annotations and define a generic repository in your Spring Boot application. These are the list of methods you can use in this release(1.0.5):\n\n- save (@Deprecated in 1.0.5.RELEASE)\n- saveWithRandomId (added in 1.0.5.RELEASE)\n- saveWithSpecificId (added in 1.0.5.RELEASE)\n- read\n- update\n- delete\n\n## How to Apply\n\n### Configuration\nAdd this property in your `application.properties`.\n```properties\nfirebase-realtime-database.database-url=[firebase realtime database url]\n```\n\n### Dependencies\nPrimarily, you have to add `spring-boot-starter-web` dependency in your Spring Boot application.\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n    \u003cartifactId\u003espring-boot-starter-web\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\nThen, you have to also add this dependency in your `pom.xml`.\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.alperkurtul\u003c/groupId\u003e\n    \u003cartifactId\u003espring-boot-starter-firebase-realtime-database\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.5.RELEASE\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### and How to Use\n1) create a class for your Firebase Realtime Database `Document`\n2) annotate this class as `@FirebaseDocumentPath` and specify a path for your realtime database\n3) create a `String` property for your `authentication idToken` and annotate it as `@FirebaseUserAuthKey`\n   - for a valid `authentication idToken`, use \u003ca href=\"https://github.com/alperkurtul/spring-boot-starter-firebase-user-authentication\"\u003e`spring-boot-starter-firebase-user-authentication`\u003c/a\u003e.\n4) create a property for the ID and annotate it with `@FirebaseDocumentId`\n\n```java\n@FirebaseDocumentPath(\"/product\")\npublic class Product {\n\n    @FirebaseUserAuthKey\n    private String authKey;\n    \n    @FirebaseDocumentId\n    private String firebaseId;\n    \n    private String id;\n    private String name;\n    private BigDecimal price;\n\n}\n```\n\nThen create a Repository class. This class must extend the `FirebaseRealtimeDbRepoServiceImpl` class.\n\n```java\n@Repository\npublic class ProductRepository extends FirebaseRealtimeDbRepoServiceImpl\u003cProduct, String\u003e {\n}\n```\n\nAt last, put `@EnableFirebaseRealtimeDatabase` just next to `@SpringBootApplication` in your main class of Spring Boot application.\n\n```java\n@EnableFirebaseRealtimeDatabase\n@SpringBootApplication\npublic class DemoApplication {\n\n    public static void main(String[] args) {\n        SpringApplication.run(DemoApplication.class, args);\n    }\n\n}\n```\n\n### Demo\nHere is a demo that I made for you. \u003ca href=\"https://github.com/alperkurtul/spring-boot-starter-firebase-realtime-database-demo\"\u003e`Demo`\u003c/a\u003e\n\n### Releases\n- 1.0.5.RELEASE (2019-11-27)\n  - **BugFix :** Annotated fields (@FirebaseUserAuthKey and @FirebaseDocumentId) also were being saved to Firebase Database. It is fixed.\n  - `save` method `@Deprecated`\n  - Instead of `save` method, `saveWithRandomId` method was added.\n  - `saveWithSpecificId` method wad added as a new feature. By using this method, you can set specific FirebaseId of your record.\n      \n\n## Next\nI hope, I will be able to continue to add new features in the next. Don't be shy to send your advice to me.\nTake care...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falperkurtul%2Fspring-boot-starter-firebase-realtime-database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falperkurtul%2Fspring-boot-starter-firebase-realtime-database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falperkurtul%2Fspring-boot-starter-firebase-realtime-database/lists"}