Workspace & Teams
Namespace Management
Learn how to organize and name your packages effectively within your workspace.
Understanding Namespaces
In Game Framework, your workspace name serves as the namespace for all packages:
https://registry.yourcompany.com/workspaces/{workspace}/packages/{package}Example:
https://registry.yourcompany.com/workspaces/acme-corp/packages/auth_packagePackage Naming Conventions
Recommended Format
Use lowercase with underscores:
# ✓ Good names
company_auth
company_ui_components
company_http_client
# ✗ Bad names
CompanyAuth # No camelCase
company-auth # No hyphens
Auth # Too genericNaming Patterns
By Feature:
acme_auth
acme_analytics
acme_paymentsBy Platform:
acme_mobile_core
acme_web_core
acme_backend_clientBy Team:
frontend_ui_kit
frontend_widgets
backend_api_clientPackage Organization
Flat Structure
Simple workspaces with few packages:
acme-corp/
├── auth
├── ui
├── utils
└── analyticsGrouped by Prefix
Use prefixes for related packages:
acme-corp/
├── core_auth
├── core_http
├── core_storage
├── ui_components
├── ui_theme
├── ui_icons
└── tools_cliMonorepo Strategy
Mirror your code repository structure:
Company Monorepo:
packages/
├── core/ → company_core
├── auth/ → company_auth
├── ui/ → company_ui
└── shared/ → company_sharedNaming Best Practices
1. Be Descriptive
# ✓ Clear purpose
company_oauth_client
company_api_models
# ✗ Too vague
company_stuff
company_helpers2. Use Consistent Prefixes
# Team/company prefix
acme_auth
acme_ui
acme_analytics
# Or feature prefix
mobile_auth
mobile_ui
mobile_analytics3. Avoid Reserved Names
Don't use Flutter SDK package names:
# ✗ Conflicts with SDK
flutter
material
cupertino
# ✓ Use prefixed names
company_flutter_extensions
company_material_theme4. Keep Names Short
# ✓ Concise
company_auth
company_ui
# ✗ Too long
company_authentication_and_authorization_frameworkScoped Packages
Using Workspace as Scope
Your workspace acts as a scope:
# In pubspec.yaml
dependencies:
# Scoped to your workspace
auth_package:
hosted:
name: auth_package
url: https://registry.yourcompany.com/workspaces/acme-corp
version: ^1.0.0Multiple Workspaces
Use different workspace for different scopes:
company/
├── frontend-workspace/
│ ├── ui_components
│ └── state_management
└── backend-workspace/
├── api_client
└── data_modelsPackage Visibility
Control who can see packages:
curl -X PATCH https://registry.yourcompany.com/v1/packages/pkg_ID \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"visibility": "private"}'Visibility Options:
private- Workspace members onlyinternal- Same organization only (Enterprise)public- Anyone with access to registry
Migration and Renaming
Warning: Package names cannot be changed after creation. Plan carefully!
If You Need to Rename
- Create new package with desired name
- Deprecate old package
- Update all dependents
- Delete old package after transition
# Deprecate old package
curl -X POST https://registry.yourcompany.com/v1/packages/old_name/deprecate \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"message": "Use new_name instead"}'Documentation
README Naming Section
Document your naming conventions:
# Package Naming
All packages follow this format:
- Prefix: `acme_`
- Feature: descriptive name
- Example: `acme_auth`, `acme_ui`
## Categories
- `acme_core_*` - Core functionality
- `acme_ui_*` - UI components
- `acme_platform_*` - Platform-specific codeExamples from Teams
Mobile Team
mobile_workspace/
├── mobile_auth # Authentication
├── mobile_ui # UI components
├── mobile_analytics # Analytics
└── mobile_offline # Offline supportPlatform Teams
ios_workspace/
├── ios_native_bridge
├── ios_camera
└── ios_biometrics
android_workspace/
├── android_native_bridge
├── android_camera
└── android_biometricsFeature Teams
payments_workspace/
├── payments_stripe
├── payments_paypal
├── payments_models
└── payments_uiNext Steps
- Package Management - Create and manage packages
- Publishing - Publish your packages
- Best Practices - Detailed naming guide
Need help? Contact support