{"id":36964596,"url":"https://github.com/schero94/strapi-auto-uuid","last_synced_at":"2026-04-15T22:03:27.126Z","repository":{"id":328653586,"uuid":"1116266693","full_name":"Schero94/strapi-auto-uuid","owner":"Schero94","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-12T11:05:44.000Z","size":322,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-12T19:53:29.158Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Schero94.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-14T14:30:02.000Z","updated_at":"2026-02-12T11:05:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Schero94/strapi-auto-uuid","commit_stats":null,"previous_names":["schero94/strapi-auto-uuid"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Schero94/strapi-auto-uuid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schero94%2Fstrapi-auto-uuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schero94%2Fstrapi-auto-uuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schero94%2Fstrapi-auto-uuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schero94%2Fstrapi-auto-uuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Schero94","download_url":"https://codeload.github.com/Schero94/strapi-auto-uuid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schero94%2Fstrapi-auto-uuid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31861709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-13T19:40:29.145Z","updated_at":"2026-04-15T22:03:27.121Z","avatar_url":"https://github.com/Schero94.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Strapi Auto UUID\n\n[![NPM Version](https://img.shields.io/npm/v/strapi-auto-uuid-v5.svg)](https://www.npmjs.com/package/strapi-auto-uuid-v5)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Strapi v5](https://img.shields.io/badge/Strapi-v5-blue.svg)](https://strapi.io)\n\n\u003e 🔄 **This is the official Strapi v5 continuation of [Cringe-Studio/strapi-auto-uuid](https://github.com/Cringe-Studio/strapi-auto-uuid)**\n\u003e \n\u003e The original plugin only supports Strapi v4. This fork provides full Strapi v5 compatibility with new features and improvements.\n\nA powerful UUID custom field plugin for Strapi v5 that automatically generates and manages UUID v4/v7 values for your content types.\n\n## Features\n\n- **Auto-generation**: Automatically generates UUID on entry creation\n- **UUID v4 \u0026 v7 Support**: Choose between random (v4) or time-sortable (v7) UUIDs\n- **Uniqueness Validation**: Prevents duplicate UUIDs across entries\n- **Copy to Clipboard**: One-click copy button in the admin panel\n- **Admin Panel Management**: Diagnose, auto-fix, and generate missing UUIDs\n- **Migration Support**: Built-in tools to migrate from older versions\n- **Export/Import**: Backup and restore UUID mappings\n- **Configurable**: Extensive configuration options via `config/plugins.js`\n- **Per-field Options**: Configure UUID version and prefix per field\n\n## Installation\n\n```bash\nnpm install strapi-auto-uuid-v5\n# or\nyarn add strapi-auto-uuid-v5\n```\n\n## Quick Start\n\n1. **Enable the plugin** in `config/plugins.js`:\n\n```javascript\nmodule.exports = {\n  'field-uuid': {\n    enabled: true,\n    config: {\n      // Optional configuration (see Configuration section)\n    },\n  },\n};\n```\n\n2. **Add the UUID field** to your content type via Content-Type Builder:\n   - Go to Content-Type Builder\n   - Select your content type\n   - Click \"Add another field\"\n   - Choose \"UUID\" from Custom fields\n\n3. **That's it!** UUIDs will be automatically generated for new entries.\n\n## Configuration\n\nConfigure the plugin in `config/plugins.js`:\n\n```javascript\nmodule.exports = {\n  'field-uuid': {\n    enabled: true,\n    config: {\n      // UUID version: 'v4' (random) or 'v7' (time-sortable)\n      defaultVersion: 'v4',\n      \n      // Auto-generate UUIDs on create (default: true)\n      autoGenerate: true,\n      \n      // Validate uniqueness before save (default: true)\n      validateUniqueness: true,\n      \n      // Allow manual UUID editing in admin panel (default: false)\n      allowManualEdit: false,\n      \n      // Maximum retry attempts for UUID collision (default: 3)\n      maxRetryAttempts: 3,\n      \n      // Run auto-migration on bootstrap (default: false)\n      // Warning: This modifies data on server start\n      autoMigrate: false,\n      \n      // Log level: 'debug', 'info', 'warn', 'error' (default: 'info')\n      logLevel: 'info',\n    },\n  },\n};\n```\n\n### Per-field Configuration\n\nWhen adding a UUID field in Content-Type Builder, you can configure:\n\n| Option | Description |\n|--------|-------------|\n| UUID Version | `v4` (random) or `v7` (time-sortable) |\n| Prefix | Optional prefix for all UUIDs (e.g., `usr_`) |\n| Disable auto-generation | Require manual UUID input |\n| Allow manual editing | Let users edit the UUID value |\n| Private | Hide field from API responses |\n\n## UUID Versions\n\n### UUID v4 (Random)\n- Completely random identifiers\n- No ordering properties\n- Best for: General purpose unique identifiers\n\n### UUID v7 (Time-sortable)\n- Time-based with millisecond precision\n- Naturally sortable by creation time\n- Best for: Database indexes, chronological ordering\n\nExample:\n```\nv4: 550e8400-e29b-41d4-a716-446655440000\nv7: 018f6b3c-8e2d-7f00-8000-000000000000\n```\n\n## Admin Panel\n\nAccess UUID management at: **Settings \u003e Auto UUID \u003e UUID Management**\n\n### Features\n\n1. **Dashboard**: Overview of content types with UUID fields\n2. **Diagnosis**: Scan for duplicates, empty fields, and invalid UUIDs\n3. **Auto-Fix**: Automatically replace duplicate UUIDs\n4. **Generate Missing**: Create UUIDs for empty fields\n5. **Export/Import**: Backup and restore UUID mappings\n\n## API Endpoints\n\nAll endpoints require admin authentication.\n\n### Check Duplicate\n```\nPOST /api/field-uuid/check-duplicate\nBody: { contentType, field, uuid, excludeDocumentId? }\n```\n\n### Diagnose\n```\nGET /api/field-uuid/diagnose\n```\n\n### Auto-Fix\n```\nPOST /api/field-uuid/autofix\nBody: { dryRun: boolean }\n```\n\n### Generate Missing\n```\nPOST /api/field-uuid/generate-missing\nBody: { dryRun: boolean }\n```\n\n### Get Models\n```\nGET /api/field-uuid/models\n```\n\n### Migration Status\n```\nGET /api/field-uuid/migration/status\n```\n\n### Run Migration\n```\nPOST /api/field-uuid/migration/run\nBody: { dryRun: boolean, fixEmpty: boolean, fixInvalid: boolean, fixDuplicates: boolean }\n```\n\n### Export Mappings\n```\nGET /api/field-uuid/migration/export\n```\n\n### Import Mappings\n```\nPOST /api/field-uuid/migration/import\nBody: { mappings: object, dryRun: boolean, overwrite: boolean }\n```\n\n### Statistics\n```\nGET /api/field-uuid/stats\n```\n\n## Migration Guide\n\n### From strapi-auto-uuid v4 (Strapi 4) to v5 (Strapi 5)\n\nThe v5 version includes breaking changes to support Strapi 5. Here's how to migrate:\n\n#### 1. Update your plugin configuration\n\nChange from:\n```javascript\n// Old (Strapi 4)\nmodule.exports = {\n  'strapi-auto-uuid': {\n    enabled: true,\n  },\n};\n```\n\nTo:\n```javascript\n// New (Strapi 5)\nmodule.exports = {\n  'field-uuid': {\n    enabled: true,\n  },\n};\n```\n\n#### 2. Check migration status\n\nAfter upgrading, go to **Settings \u003e Auto UUID \u003e UUID Management** and click \"Run Diagnosis\" to check for any issues.\n\n#### 3. Fix any issues\n\nIf duplicates or invalid UUIDs are found:\n1. Use the \"Auto-Fix Duplicates\" feature with \"Dry Run\" first\n2. Review the changes\n3. Run without dry run to apply fixes\n\n### Data Safety\n\n- **UUIDs are preserved**: The underlying data type change from `uid` to `string` does not affect existing UUID values\n- **Backup recommended**: Always backup your database before running migrations\n- **Dry run available**: All migration operations support dry run mode\n\n## Troubleshooting\n\n### UUID field not appearing in Content-Type Builder\n\nEnsure the plugin is properly enabled:\n1. Check `config/plugins.js` has `'field-uuid': { enabled: true }`\n2. Restart Strapi: `npm run develop`\n\n### \"Custom Field not found\" error\n\nThis usually means the plugin name in `config/plugins.js` doesn't match. Use `'field-uuid'` (not `'strapi-auto-uuid'`).\n\n### Duplicate UUIDs after migration\n\nRun the diagnostic tool:\n1. Go to Settings \u003e Auto UUID \u003e UUID Management\n2. Click \"Run Diagnosis\"\n3. Use \"Auto-Fix Duplicates\" to resolve\n\n### Performance concerns with large datasets\n\nFor large datasets:\n- Set `validateUniqueness: false` in config (if uniqueness is ensured elsewhere)\n- Use database-level unique constraints\n- Consider using UUID v7 for better index performance\n\n## Contributing\n\nContributions are welcome! Please read our contributing guidelines and submit PRs.\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Support\n\n- GitHub Issues: [Report bugs](https://github.com/Schero94/strapi-auto-uuid/issues)\n- Documentation: [Full docs](https://github.com/Schero94/strapi-auto-uuid#readme)\n\n## Credits\n\nThis plugin is a Strapi v5 continuation of the original [strapi-auto-uuid](https://github.com/Cringe-Studio/strapi-auto-uuid) by [Cringe Studio](https://github.com/Cringe-Studio). Thanks for the great foundation!\n\n## Changelog\n\n### v2.0.0 (Strapi v5)\n- 🚀 **Complete rewrite for Strapi v5**\n- ✨ Added UUID v7 support (time-sortable)\n- 🎨 New admin panel with management tools\n- 🔄 Migration support from Strapi v4\n- 📦 Export/Import functionality\n- ⚙️ Per-field configuration options\n- 📋 Copy to clipboard button\n- 🔧 Improved uniqueness validation\n\n### Previous versions (Strapi v4)\nSee [Cringe-Studio/strapi-auto-uuid](https://github.com/Cringe-Studio/strapi-auto-uuid) for Strapi v4 releases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschero94%2Fstrapi-auto-uuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschero94%2Fstrapi-auto-uuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschero94%2Fstrapi-auto-uuid/lists"}