{"id":30752416,"url":"https://github.com/bioforestchain/dweb_cloud_dev","last_synced_at":"2025-09-04T08:07:57.816Z","repository":{"id":309336945,"uuid":"1032425091","full_name":"BioforestChain/dweb_cloud_dev","owner":"BioforestChain","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-11T10:15:26.000Z","size":485,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-11T11:18:17.252Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/BioforestChain.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,"zenodo":null}},"created_at":"2025-08-05T09:36:25.000Z","updated_at":"2025-08-11T10:15:29.000Z","dependencies_parsed_at":"2025-08-11T11:18:37.631Z","dependency_job_id":null,"html_url":"https://github.com/BioforestChain/dweb_cloud_dev","commit_stats":null,"previous_names":["bioforestchain/dweb_cloud_dev"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/BioforestChain/dweb_cloud_dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fdweb_cloud_dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fdweb_cloud_dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fdweb_cloud_dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fdweb_cloud_dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BioforestChain","download_url":"https://codeload.github.com/BioforestChain/dweb_cloud_dev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioforestChain%2Fdweb_cloud_dev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273574155,"owners_count":25129883,"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-04T02:00:08.968Z","response_time":61,"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":[],"created_at":"2025-09-04T08:07:53.540Z","updated_at":"2025-09-04T08:07:57.808Z","avatar_url":"https://github.com/BioforestChain.png","language":"TypeScript","readme":"# @dweb-cloud/dev\n\n## Development Guidelines\n\n### Commit Message Convention\n\nThis project follows a strict commit message format that combines **Gitemoji** with **Conventional Commits**.\n\n#### Format\n\n```\n:emoji: type(scope): description\n```\n\n#### Required Elements\n\n1. **Gitemoji**: Must start with a gitemoji (e.g., `:sparkles:`, `:bug:`)\n2. **Type**: One of `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `perf`, `ci`, `build`, `revert`\n3. **Scope**: Optional, indicates the area of change (e.g., `auth`, `api`, `ui`)\n4. **Description**: Brief description of the change (1-50 characters)\n\n#### Recommended Gitemojis\n\n| Gitemoji                | Type     | Description              |\n| ----------------------- | -------- | ------------------------ |\n| `:sparkles:`            | feat     | New feature              |\n| `:bug:`                 | fix      | Bug fix                  |\n| `:memo:`                | docs     | Documentation            |\n| `:lipstick:`            | style    | Formatting, styling      |\n| `:recycle:`             | refactor | Code refactoring         |\n| `:white_check_mark:`    | test     | Adding tests             |\n| `:wrench:`              | chore    | Maintenance              |\n| `:zap:`                 | perf     | Performance improvements |\n| `:green_heart:`         | ci       | CI/CD changes            |\n| `:construction_worker:` | build    | Build system             |\n| `:rewind:`              | revert   | Revert changes           |\n\n**Note**: While these are the recommended gitemojis for each commit type, you can use any gitemoji you prefer (e.g., `:art:`, `:fire:`, `:rocket:`, `:tada:`, etc.) as long as the format is correct.\n\n#### Examples\n\n```bash\n# ✅ Valid commits\n:sparkles: feat(auth): add user authentication\n:bug: fix(api): resolve login timeout issue\n:memo: docs: update README with installation guide\n:lipstick: style: format code with prettier\n:recycle: refactor(core): simplify config loading logic\n:white_check_mark: test(auth): add unit tests for login flow\n\n# ❌ Invalid commits\nAdd new feature\nfix: bug in auth\n:sparkles: add authentication (missing type)\nfeat(auth): add user authentication (missing gitemoji)\n```\n\n### Development Commands\n\n```bash\n# Install dependencies\npnpm install\n\n# Format code\npnpm format\n\n# Check formatting\npnpm format:check\n\n# Run linting\npnpm lint\n\n# Run type checking\npnpm typecheck\n\n# Run tests\npnpm test\n```\n\n### Safenv CLI Commands\n\n```bash\n# Build configuration once\nsafenv build\n\n# Start file watching mode\nsafenv serve\n\n# Start web UI for configuration editing\nsafenv ui\n\n# Run workspace configuration\nsafenv workspace\n```\n\n#### Web UI Features\n\nThe `safenv ui` command starts a web-based configuration editor that allows you to:\n\n- 🔍 **Auto-discovery**: Automatically finds available configuration files\n- 📂 **File Selection**: Choose from available config files in the UI\n- 📝 **Live Editing**: Edit environment variables in a user-friendly interface\n- 💾 **Real-time Saving**: Save changes directly to your configured output files\n- 🔄 **Reset Functionality**: Reset values to their defaults\n- 🔄 **Hot Switching**: Switch between different configuration files without restarting\n- 📥📤 **Import/Export**: Import and export configurations in multiple formats (JSON, ENV, YAML, TOML)\n- 🎨 **Modern Design**: Responsive, intuitive interface\n- ⚡ **Instant Feedback**: Real-time validation and status updates\n- 🔧 **Dual Mode Support**: Web-UI mode (HTTP-based) and HTML-tools mode (File System Access API)\n\n**Usage:**\n\n```bash\n# Start UI with auto-discovery (recommended)\nsafenv ui\n\n# Start with a specific config file\nsafenv ui --config my-safenv.config.ts\n\n# Custom port and host\nsafenv ui --port 8080 --host 0.0.0.0\n\n# Specify UI mode\nsafenv ui --mode local    # Use File System Access API\nsafenv ui --mode remote   # Use HTTP-based import/export\nsafenv ui --mode auto     # Auto-detect (default)\n```\n\n**UI Modes:**\n\n- **Local Mode** (`--mode local`): Uses File System Access API for direct file operations. Best for local development with modern browsers.\n- **Remote Mode** (`--mode remote`): Uses HTTP-based import/export. Best for server deployments and older browsers.\n- **Auto Mode** (`--mode auto`): Automatically selects the best mode based on environment (default).\n\n### Auto-Dependency Discovery\n\nSafenv can automatically discover and merge environment variables from your project dependencies:\n\n```typescript\n// safenv.config.ts\nexport default {\n  name: 'my-app',\n  autoDependencies: true, // Enable auto-discovery\n  variables: {\n    // Your app-specific variables\n    APP_NAME: {\n      type: 'string',\n      default: 'My App',\n    },\n  },\n}\n```\n\n**How it works:**\n\n1. Scans `package.json` dependencies for packages with safenv configurations\n2. Looks for safenv config exports in dependency packages\n3. Automatically prefixes dependency variables with the package name\n4. Merges all variables into a single configuration\n\n**Example:**\n\n- Package `@auth/service` exports variable `API_KEY`\n- In your app, it becomes `AUTH_SERVICE_API_KEY`\n- Package `@db/connector` exports variable `CONNECTION_URL`\n- In your app, it becomes `DB_CONNECTOR_CONNECTION_URL`\n\n### Standard Schema Support\n\nSafenv generates TypeScript validation functions that implement the [Standard Schema](https://github.com/standard-schema/standard-schema) specification, enabling interoperability with popular validation libraries like Zod, Valibot, and ArkType.\n\n```typescript\n// Generated Standard Schema function\nexport function createMyAppSchema(): MyAppSchema {\n  return {\n    name: 'my-app',\n    '~standard': {\n      version: 1,\n      vendor: 'safenv',\n      validate(value: unknown) {\n        // Validation logic with detailed error reporting\n        // Supports type coercion (string -\u003e number, string -\u003e boolean, etc.)\n        // Returns { value: T } on success or { issues: Issue[] } on failure\n      },\n    },\n  }\n}\n\n// Usage with any Standard Schema compatible library\nconst schema = createMyAppSchema()\nconst result = schema['~standard'].validate(process.env)\n\nif (result.issues) {\n  console.error('Validation failed:', result.issues)\n} else {\n  console.log('Config:', result.value) // Fully typed!\n}\n```\n\n**Benefits:**\n\n- **Universal Compatibility**: Works with any validation library that implements Standard Schema\n- **Type Safety**: Full TypeScript support with inferred types\n- **Detailed Error Reporting**: Precise error messages with field paths\n- **Smart Type Coercion**: Automatically converts strings to appropriate types\n- **Zero Dependencies**: Generated code has no runtime dependencies\n\n### Pre-commit Hooks\n\nThis project uses Husky and lint-staged to ensure code quality:\n\n- **Pre-commit**: Automatically formats code with Prettier and runs linting\n- **Commit-msg**: Validates commit message format\n\nThe hooks will automatically run when you commit changes. If they fail, the commit will be rejected.\n\n#### Cross-Platform Compatibility\n\nThis project uses **commitlint** for commit message validation, which provides excellent cross-platform support:\n\n- ✅ **Linux/macOS**: Native support through Node.js\n- ✅ **Windows (Git Bash)**: Full compatibility\n- ✅ **Windows (PowerShell)**: Works through Git's execution environment\n- ✅ **Windows (CMD)**: Works through Git's execution environment\n- ✅ **Any Git GUI**: Universal compatibility\n\nThe commit validation runs through Node.js and commitlint, ensuring consistent behavior across all platforms and development environments.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioforestchain%2Fdweb_cloud_dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbioforestchain%2Fdweb_cloud_dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioforestchain%2Fdweb_cloud_dev/lists"}