{"id":20766871,"url":"https://github.com/rezapace/php-firebase","last_synced_at":"2026-04-19T05:32:43.589Z","repository":{"id":242315308,"uuid":"809241950","full_name":"rezapace/php-Firebase","owner":"rezapace","description":"This project harnesses the power of Font Awesome for its sleek iconography and leverages Firebase integrated with PHP to provide robust backend services.","archived":false,"fork":false,"pushed_at":"2024-06-02T06:14:02.000Z","size":39362,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T18:56:15.216Z","etag":null,"topics":["crud","crud-application","firebase","php","store"],"latest_commit_sha":null,"homepage":"https://devreza.my.id/","language":"HTML","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/rezapace.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-02T05:55:58.000Z","updated_at":"2024-06-02T06:14:05.000Z","dependencies_parsed_at":"2024-06-02T07:36:37.775Z","dependency_job_id":null,"html_url":"https://github.com/rezapace/php-Firebase","commit_stats":null,"previous_names":["rezapace/php-firebase"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rezapace/php-Firebase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezapace%2Fphp-Firebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezapace%2Fphp-Firebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezapace%2Fphp-Firebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezapace%2Fphp-Firebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rezapace","download_url":"https://codeload.github.com/rezapace/php-Firebase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezapace%2Fphp-Firebase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274113250,"owners_count":25224372,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"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":["crud","crud-application","firebase","php","store"],"created_at":"2024-11-17T11:26:32.037Z","updated_at":"2025-10-28T05:39:08.357Z","avatar_url":"https://github.com/rezapace.png","language":"HTML","readme":"# php-Firebase\n\n## Overview\nThis project harnesses the power of Font Awesome for its sleek iconography and leverages Firebase integrated with PHP to provide robust backend services.\n\n## Font Awesome\nFont Awesome Free 5.15.4 is used for icons. The relevant CSS file is included in the project:\n\n```css\n/*!\n * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n */\n```\n\n## Firebase Integration with PHP\nThe application uses Firebase for backend services such as authentication, database, and storage. Below is a brief explanation of how Firebase is integrated with PHP.\n\n### Setup Firebase in PHP\n\n1. **Install Firebase PHP SDK**: Use Composer to install the Firebase Admin SDK.\n    ```bash\n    composer require kreait/firebase-php\n    ```\n\n2. **Initialize Firebase**: Create a PHP script to initialize Firebase with your service account credentials.\n    ```php\n    require 'vendor/autoload.php';\n\n    use Kreait\\Firebase\\Factory;\n    use Kreait\\Firebase\\ServiceAccount;\n\n    $serviceAccount = ServiceAccount::fromJsonFile(__DIR__.'/path/to/serviceAccountKey.json');\n    $firebase = (new Factory)\n        -\u003ewithServiceAccount($serviceAccount)\n        -\u003ecreate();\n    ```\n\n3. **Authentication**: Use Firebase Authentication for user management.\n    ```php\n    $auth = $firebase-\u003egetAuth();\n    $user = $auth-\u003everifyIdToken($idToken);\n    ```\n\n4. **Database**: Interact with Firebase Realtime Database.\n    ```php\n    $database = $firebase-\u003egetDatabase();\n    $reference = $database-\u003egetReference('path/to/child');\n    $snapshot = $reference-\u003egetSnapshot();\n    $value = $snapshot-\u003egetValue();\n    ```\n\n5. **Storage**: Use Firebase Storage for file uploads.\n    ```php\n    $storage = $firebase-\u003egetStorage();\n    $bucket = $storage-\u003egetBucket();\n    $file = fopen('path/to/local/file', 'r');\n    $bucket-\u003eupload($file, [\n        'name' =\u003e 'path/in/bucket'\n    ]);\n    ```\n\n## Configuration \n\nfirst you need to create a service account in the firebase console and get the json api\n\nafter that you can add chage the path to the service account key in the php script admin.html adn all-product.html\n\njson firebase api key in the file\n\n```php\nimport { initializeApp } from 'https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js';\nimport { getFirestore, collection, getDocs, addDoc, updateDoc, deleteDoc, doc } from 'https://www.gstatic.com/firebasejs/9.2.0/firebase-firestore.js';\n\n// Your web app's Firebase configuration\nconst firebaseConfig = {\n    apiKey: \"AIBMLafGU\",\n    authDomain: \"pr.firebaseapp.com\",\n    projectId: \"pr\",\n    storageBucket: \"pro.appspot.com\",\n    messagingSenderId: \"617148\",\n    appId: \"1:61148:web:49dd61\",\n    measurementId: \"G-5YVB\"\n};\n\n// Initialize Firebase\nconst app = initializeApp(firebaseConfig);\nconst db = getFirestore(app);\n```\n\n## Conclusion\nThis project integrates Font Awesome for icons and Firebase for backend services using PHP. The Firebase PHP SDK is used to handle authentication, database interactions, and file storage.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezapace%2Fphp-firebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frezapace%2Fphp-firebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezapace%2Fphp-firebase/lists"}