{"id":26260548,"url":"https://github.com/renanviana/firebase4j","last_synced_at":"2026-02-26T05:11:18.834Z","repository":{"id":63982083,"uuid":"306925624","full_name":"renanviana/firebase4j","owner":"renanviana","description":"Plugin used to facilitate the use of Firebase services ","archived":false,"fork":false,"pushed_at":"2022-12-03T03:42:03.000Z","size":32,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-07T01:33:42.167Z","etag":null,"topics":["firebase","firestore","google-firebase","google-storage","google-storage-bucket","java"],"latest_commit_sha":null,"homepage":"https://firebase.google.com","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/renanviana.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":"2020-10-24T16:33:03.000Z","updated_at":"2024-08-30T21:39:00.000Z","dependencies_parsed_at":"2023-01-14T17:15:28.694Z","dependency_job_id":null,"html_url":"https://github.com/renanviana/firebase4j","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/renanviana/firebase4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renanviana%2Ffirebase4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renanviana%2Ffirebase4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renanviana%2Ffirebase4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renanviana%2Ffirebase4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renanviana","download_url":"https://codeload.github.com/renanviana/firebase4j/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renanviana%2Ffirebase4j/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29849284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["firebase","firestore","google-firebase","google-storage","google-storage-bucket","java"],"created_at":"2025-03-13T23:16:00.092Z","updated_at":"2026-02-26T05:11:18.813Z","avatar_url":"https://github.com/renanviana.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  :fire::coffee: firebase4j\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n   A plugin \u003cb\u003eJava\u003c/b\u003e for \u003ca href=\"https://firebase.google.com/\"\u003eFirebase\u003c/a\u003e applications\n\u003c/p\u003e\n\n## :bulb: Installing\n\nAdd the dependency in your pom.xml\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.renz\u003c/groupId\u003e\n  \u003cartifactId\u003efirebase4j\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nExecute the command\n\n```command\nmvn install\n```\n\n## :running: Usage\n\nConnect to Firebase before using services\n\n```java\ntry (FirebaseConnection firebaseConn = new FirebaseConnection()) {\n\t\t\t\n  firebaseConn.connect(\"src/main/resources/YOUR_FIREBASE_ADMIN_SDK.json\");\n\n  // Code block using services\n\t\t\t\n} catch (Exception e) {\n  // exception handling\n}\n```\n\n\u003e To use Firestore, first you must configure your classes that will be persisted in the Database\n\nInherit the \"Document\" class in your collection model\n\n```java\nimport com.renz.firebase4j.firestore.Document;\n\npublic class Person extends Document {\n\n  private String name;\n  private Integer age;\n\n  // getter's and setter's\n}\n```\n\nCreate a repository that inherits from the \"FirestoreRepository\" class and give the constructor the type of document class you would like to handle\n\n```java\npublic class PersonRepository extends FirestoreRepository\u003cPerson\u003e {\n\n  public PersonRepository() {\n    super(Person.class);\n  }\n  \n}\n```\n\nNow invoke the available methods\n\n\n```java\ntry (FirebaseConnection firebaseConn = new FirebaseConnection()) {\n\n  firebaseConn.connect(\"src/main/resources/YOUR_FIREBASE_ADMIN_SDK.json\");\n\n  PersonRepository personRep = new PersonRepository();\n\n  Person person = personRep.save(person); // create document \n\n  List\u003cPerson\u003e results = personRep.findAll(); // consulting collections\n\n  personRep.delete(person.getId()); // search for a specific document by id \n\n} catch (Exception e) {\n  // exception handling\n}\n```\n\nUploading files to Firebase Storage\n\n```java\ntry (FirebaseConnection firebaseConn = new FirebaseConnection()) {\n\n  firebaseConn.connect(\"src/main/resources/YOUR_FIREBASE_ADMIN_SDK.json\");\n\n  FirebaseStorage storage = new FirebaseStorage();\n\n  storage.uploadFile(new File(\"YOUR_FILE.extension\"));\n\n} catch (Exception e) {\n  // exception handling\n}\n```\n\n## :computer: Want to help with the Project?\n\nCreate an \"issue\" and describe the features you would like in the application, or even bugs you found.\n\nIf you want to help with corrections, create your branch from `master` and open a Pull Request for me.\n\n\u003e :star: Could you favorite this repository? Just click on the star! Thank you very much!\n\n## License \n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenanviana%2Ffirebase4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenanviana%2Ffirebase4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenanviana%2Ffirebase4j/lists"}