{"id":24540797,"url":"https://github.com/code-gio/svelte-firekit","last_synced_at":"2025-12-29T12:34:43.775Z","repository":{"id":271270755,"uuid":"880893514","full_name":"code-gio/svelte-firekit","owner":"code-gio","description":"A comprehensive library integrating SvelteKit and Firebase for building robust micro SaaS applications.","archived":false,"fork":false,"pushed_at":"2025-01-16T18:46:17.000Z","size":352,"stargazers_count":15,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T18:13:59.685Z","etag":null,"topics":["firebase","svelte5","sveltekit"],"latest_commit_sha":null,"homepage":"https://firekit.codegio.com/","language":"TypeScript","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/code-gio.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-10-30T14:55:19.000Z","updated_at":"2025-03-19T22:55:44.000Z","dependencies_parsed_at":"2025-01-06T17:50:55.890Z","dependency_job_id":"5cae3bb1-c32e-49cc-89df-5ca58fe7c290","html_url":"https://github.com/code-gio/svelte-firekit","commit_stats":null,"previous_names":["code-gio/svelte-firekit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-gio%2Fsvelte-firekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-gio%2Fsvelte-firekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-gio%2Fsvelte-firekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-gio%2Fsvelte-firekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-gio","download_url":"https://codeload.github.com/code-gio/svelte-firekit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249038887,"owners_count":21202803,"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","svelte5","sveltekit"],"created_at":"2025-01-22T18:14:56.427Z","updated_at":"2025-12-29T12:34:43.706Z","avatar_url":"https://github.com/code-gio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Svelte Firekit is a powerful Firebase toolkit for SvelteKit applications, providing a comprehensive set of utilities, stores, and components for seamless Firebase integration. Whether you're building a micro SaaS, web application, or any Firebase-powered project, Svelte Firekit streamlines your development process.\n \n## Installation\n \n```bash\nnpm install firebase svelte-firekit\n```\n \n## Configuration\n \nSvelte Firekit automatically manages your Firebase configuration through environment variables. Create a `.env` file in your project root with the following variables:\n \n```env\nPUBLIC_FIREBASE_API_KEY=your_api_key\nPUBLIC_FIREBASE_AUTH_DOMAIN=your_auth_domain\nPUBLIC_FIREBASE_PROJECT_ID=your_project_id\nPUBLIC_FIREBASE_STORAGE_BUCKET=your_storage_bucket\nPUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id\nPUBLIC_FIREBASE_APP_ID=your_app_id\nPUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id\n```\n \nThe configuration is automatically handled by Firekit - no manual setup required. If any required environment variables are missing, Firekit will throw a helpful error indicating which variables need to be set.\n \n## Usage Example\n \nHere's a simple example showing how to display the current user's name:\n \n```svelte\n\u003cscript\u003e\n  import { firekitUser } from 'svelte-firekit';\n\u003c/script\u003e\n \nHello {firekitUser.displayName}\n```\n \nThe `firekitUser` store provides access to the current user's information and authentication state.\n \n## Core Features\n \n### 🔥 Firebase Integration\n- Zero-config Firebase setup through environment variables\n- Automatic initialization and app management\n- Built-in error handling and connection state management\n- Type-safe configuration management\n \n### 🔐 Authentication\n- Complete authentication system with built-in components\n- Support for multiple authentication providers:\n  - Email/Password\n  - Google\n  - GitHub\n  - Custom providers\n- User state management and persistence through `firekitUser` store\n \n### 📚 Firestore Integration\n- Reactive data stores for real-time updates\n- Simplified CRUD operations\n- Batch operations and transactions\n- Type-safe document references\n- Automatic data serialization/deserialization\n \n### 📦 Storage Management\n- File upload and download utilities\n- Progress tracking and status updates\n- Storage security rules helpers\n- Image optimization utilities\n \n### ⚡ Server-Side Rendering\n- Full SSR compatibility\n- Hydration support\n- Server-side data fetching\n- SEO-friendly rendering\n \n### 🎯 Type Safety\n- Built with TypeScript\n- Complete type definitions\n- Intelligent autocomplete\n- Runtime type checking\n- Type-safe Firestore operations\n \n## Why Svelte Firekit?\n \n- **Zero Configuration**: Automatic Firebase setup through environment variables\n- **Type Safety**: Full TypeScript support with built-in type checking\n- **Rapid Development**: Get your Firebase-powered SvelteKit application up and running in minutes\n- **Best Practices**: Built following Firebase and SvelteKit best practices\n- **Production Ready**: Battle-tested in production environments\n- **Active Community**: Regular updates and active community support\n- **Extensible**: Easy to customize and extend for your specific needs\n \n## Next Steps\n \n- Check out our [Getting Started](/getting-started) guide\n- Explore the [API Reference](/api)\n- View [Examples](/examples)\n- Join our [Community](/community)\n \n## Contributing\n \nWe welcome contributions! Please see our [Contributing Guide](/contributing) for more details.\n \n## License\n \nSvelte Firekit is released under the MIT License. See the [LICENSE](/license) file for more details.\n \n# Authentication\n \nSvelte Firekit provides a comprehensive authentication system through the `firekitAuth` singleton, offering various authentication methods and user management features.\n \n## Basic Usage\n \n```typescript\nimport { firekitAuth } from 'svelte-firekit';\n```\n \n## Authentication Methods\n \n### Google Authentication\n \n```typescript\nawait firekitAuth.signInWithGoogle();\n```\n \n### Email/Password Authentication\n \n```typescript\n// Sign in\nawait firekitAuth.signInWithEmail(email, password);\n \n// Register\nawait firekitAuth.registerWithEmail(email, password, displayName);\n \n// Sign out\nawait firekitAuth.logOut();\n```\n \n## User Management\n \n### Password Management\n \n```typescript\n// Send password reset email\nawait firekitAuth.sendPasswordReset(email);\n \n// Update password (requires reauthentication)\nawait firekitAuth.updateUserPassword(newPassword, currentPassword);\n```\n \n### Profile Management\n \n```typescript\n// Update user profile\nawait firekitAuth.updateUserProfile({\n  displayName: \"New Name\",\n  photoURL: \"https://example.com/photo.jpg\"\n});\n```\n \n### Email Verification\n \n```typescript\n// Send verification email\nawait firekitAuth.sendEmailVerificationToUser();\n```\n \n### Account Deletion\n \n```typescript\n// Delete user account\nawait firekitAuth.deleteUserAccount();\n```\n \n## Automatic Firestore Integration\n \nThe authentication system automatically maintains a user document in Firestore with the following information:\n- User ID\n- Email\n- Email verification status\n- Display name\n- Photo URL\n- Authentication provider information\n- Anonymous status\n \n## Error Handling\n \nAll methods include proper error handling and return appropriate error messages. For example, password updates will return:\n \n```typescript\n{\n  success: boolean;\n  message: string;\n  code?: string; // In case of errors\n}\n```\n \n## Features\n \n- 🔐 Multiple authentication providers\n- 📝 Automatic user profile management\n- 🔄 Password reset and update functionality\n- ✉️ Email verification\n- 🗑️ Account deletion\n- 🔄 Reauthentication support\n- 📚 Automatic Firestore user document management\n- ⚡ Type-safe operations\n \n## Important Notes\n \n1. User data is automatically synchronized with Firestore\n2. Password updates require current password verification\n3. Account deletion removes both authentication and Firestore data\n4. All operations are fully typed for TypeScript support ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-gio%2Fsvelte-firekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-gio%2Fsvelte-firekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-gio%2Fsvelte-firekit/lists"}