{"id":21851511,"url":"https://github.com/adelelawady/supabase-extractor","last_synced_at":"2026-05-07T03:36:09.686Z","repository":{"id":264944902,"uuid":"894662147","full_name":"adelelawady/supabase-extractor","owner":"adelelawady","description":"Extract and export your Supabase database policies, functions, and triggers","archived":false,"fork":false,"pushed_at":"2024-11-27T16:59:14.000Z","size":960,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-11T20:13:32.394Z","etag":null,"topics":["react","supabase"],"latest_commit_sha":null,"homepage":"https://adelelawady.github.io/supabase-extractor/","language":"TypeScript","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/adelelawady.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":"2024-11-26T18:53:09.000Z","updated_at":"2024-11-27T02:44:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3a3d5ee-2ce0-47b7-bbc9-2880458a762b","html_url":"https://github.com/adelelawady/supabase-extractor","commit_stats":null,"previous_names":["adelelawady/supabase-extractor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adelelawady/supabase-extractor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelelawady%2Fsupabase-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelelawady%2Fsupabase-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelelawady%2Fsupabase-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelelawady%2Fsupabase-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adelelawady","download_url":"https://codeload.github.com/adelelawady/supabase-extractor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelelawady%2Fsupabase-extractor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262929418,"owners_count":23386358,"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":["react","supabase"],"created_at":"2024-11-28T01:08:25.983Z","updated_at":"2026-05-07T03:36:04.666Z","avatar_url":"https://github.com/adelelawady.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Supabase Extractor\n\nA tool to extract and manage Supabase database policies, functions, and triggers.\n\n\n[Live-Demo](https://adelelawady.github.io/supabase-extractor/)\n## Features\n\n- Extract database policies, functions, and triggers from Supabase projects\n- Configurable schema exclusions for functions and triggers\n- Export extracted data as SQL scripts\n- Option to include DROP POLICY statements\n- User-friendly error handling and setup instructions\n\n## Getting Started\n\n1. Clone the repository\n```\ngit clone https://github.com/adelelawady/supabase-extractor.git\ncd supabase-extractor\n```\n\n2. Install dependencies\n\n```\nnpm install\n```\n\n\n3. Run the development server\n\n```\nnpm run dev\n```\n\n## Usage\n\n1. **Initial Setup**\n   - Run the setup SQL in your Supabase SQL editor\n   - Configure excluded schemas for functions and triggers\n   - Run the setup SQL using the UI\n\n2. **Extract Database Objects**\n   - Enter your Supabase project URL\n   - Enter your service role API key\n   - Click \"Extract Data\"\n\n3. **Export Data**\n   - View extracted policies, functions, and triggers\n   - Toggle \"Include DROP POLICY statements\" if needed\n   - Click \"Export SQL\" to download the SQL script\n\n4. **Cleanup (Important)**\n   After extracting your data, it's recommended to remove the setup functions for security. Run this SQL in your Supabase SQL editor:\n   ```sql\n   -- Remove setup functions\n   DROP FUNCTION IF EXISTS public.exec_sql(text);\n   DROP FUNCTION IF EXISTS public.get_policies();\n   DROP FUNCTION IF EXISTS public.get_functions();\n   DROP FUNCTION IF EXISTS public.get_triggers();\n   ```\n\n## Configuration\n\n### Function Schemas\nBy default, the following schemas are excluded from function extraction:\n- pg_catalog\n- information_schema\n- extensions\n- pgsodium\n- storage\n- realtime\n- vault\n\n### Trigger Schemas\nBy default, the following schemas are excluded from trigger extraction:\n- pgsodium\n- storage\n- realtime\n- vault\n\nYou can modify these exclusions through the UI's Setup Configuration section.\n\n## Security\n\n- No credentials are stored\n- All operations are performed client-side\n- Database connections use Supabase's secure API\n- Remember to remove setup functions after use\n\n## Error Handling\n\nThe tool provides detailed error messages for common issues:\n- Missing setup functions\n- Invalid credentials\n- Permission issues\n- Connection timeouts\n- Invalid data structures\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Documentation\n\nFor more detailed information, see:\n- [Privacy Policy](PRIVACY.md)\n- [Terms and Conditions](TERMS.md)\n- [License](LICENSE)\n\n## Author\n\nCreated by [Adel Elawady](https://github.com/adelelawady)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nIf you encounter any issues or have questions:\n- Open an [issue](https://github.com/adelelawady/supabase-extractor/issues)\n- Contact via [GitHub](https://github.com/adelelawady)\n\n## Acknowledgments\n\n- Built with [React](https://reactjs.org/)\n- Styled with [Tailwind CSS](https://tailwindcss.com/)\n- UI components from [shadcn/ui](https://ui.shadcn.com/)\n- Database access via [Supabase](https://supabase.com/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadelelawady%2Fsupabase-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadelelawady%2Fsupabase-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadelelawady%2Fsupabase-extractor/lists"}