{"id":20222573,"url":"https://github.com/alfianlosari/firebase-openai-proxy","last_synced_at":"2025-09-22T03:30:34.233Z","repository":{"id":230239254,"uuid":"778857499","full_name":"alfianlosari/firebase-openai-proxy","owner":"alfianlosari","description":"OpenAI Proxy Server using Firebase Functions with sample iOS App","archived":false,"fork":false,"pushed_at":"2024-03-29T07:04:45.000Z","size":2146,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-14T06:56:56.177Z","etag":null,"topics":["api-key","chatgpt","chatgpt-ios","chatgpt-proxy","firebase-functions","firebase-functions-proxy","ios-api-key","ios-app","nodejs","openai-proxy","proxy","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/alfianlosari.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}},"created_at":"2024-03-28T14:46:55.000Z","updated_at":"2024-11-08T07:19:55.000Z","dependencies_parsed_at":"2024-03-28T16:07:22.664Z","dependency_job_id":"9ff65460-c15e-4abf-bba8-ab3c2af5901a","html_url":"https://github.com/alfianlosari/firebase-openai-proxy","commit_stats":null,"previous_names":["alfianlosari/firebase-openai-proxy"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfianlosari%2Ffirebase-openai-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfianlosari%2Ffirebase-openai-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfianlosari%2Ffirebase-openai-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfianlosari%2Ffirebase-openai-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alfianlosari","download_url":"https://codeload.github.com/alfianlosari/firebase-openai-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233819585,"owners_count":18735302,"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":["api-key","chatgpt","chatgpt-ios","chatgpt-proxy","firebase-functions","firebase-functions-proxy","ios-api-key","ios-app","nodejs","openai-proxy","proxy","swift"],"created_at":"2024-11-14T06:57:05.413Z","updated_at":"2025-09-22T03:30:33.775Z","avatar_url":"https://github.com/alfianlosari.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Firebase OpenAI Proxy Server\n- Secure your API Key in FE clients by using Proxy Server with Authentication.\n- OpenAI Proxy Server example using Firebase Cloud Functions with iOS ChatGPT App.\n\n## Getting Started - Proxy Server\n- Install firebase cli and firebase emulator.\n- Navigate to openai-proxy folder.\n- type `firebase init`.\n- initialize your firebase project, you only need to enable `functions` and `emulator`.\n- Use Typescript (nodejs) as the language.\n- Create .env file in functions folder. It should contains `CHAT_URL=https://api.openai.com/v1/chat/completions`. If you don't want to use Google Secret Manager, you can also put your API key in here.\n- To start localhost emulator. Navigate to functions folder, and type `npm run serve`\n\n- To deploy, navigate to `openai-proxy` folder and type `firebase deploy --only functions`.\n\n## Storing API Key (env file or Google Secret Manager)\n- By default, it uses [Google Secret Manager](https://cloud.google.com/security/products/secret-manager) to store the API Key. This requires billing\n- If you don't want to use this, you can put the API_KEY in .env file. Update the source code to retrieve it from `process.env.API_KEY` and remove all code that uses defineSecret to retrive API key from Google Secret Manager.\n\n## Getting Started - iOS App\n- Provide your own bundle id in Signing \u0026 Capabilities tab (Xcode)\n- Create iOS App in Firebase Dashboard project (make sure its the same project as the one you use to create the proxy server functions) using your bundleID.\n- Download GoogleServices-Info.plist to your xcode project.\n- Enable Authentication with Email provider in Firebase dashboard.\n- Provide your own proxy server URL in `ChatGPTAPI.swift`\n\n## Video Tutorial\nCheck the full video tutorial at [YouTube](https://youtu.be/-HJeBV70zIE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfianlosari%2Ffirebase-openai-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfianlosari%2Ffirebase-openai-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfianlosari%2Ffirebase-openai-proxy/lists"}