diff --git a/docs/deploystack/development/backend/database.mdx b/docs/deploystack/development/backend/database.mdx index a063206..b2cb130 100644 --- a/docs/deploystack/development/backend/database.mdx +++ b/docs/deploystack/development/backend/database.mdx @@ -96,10 +96,13 @@ This file is automatically managed by the setup API. You typically do not need t ## Database Structure -The database schema is defined in `src/db/schema.ts`. It contains: +The database schema is defined in `src/db/schema.sqlite.ts`. This is the **single source of truth** for all database schema definitions. It contains: 1. Base schema tables (core application) -2. Plugin tables (dynamically loaded) +2. Plugin table definitions (populated dynamically) +3. Proper foreign key relationships and constraints + +**Important**: Only `schema.sqlite.ts` should be edited for schema changes. The previous `schema.ts` file has been removed to eliminate confusion. ## Making Schema Changes @@ -107,7 +110,7 @@ Follow these steps to add or modify database tables: 1. **Modify Schema Definition** - Edit `src/db/schema.ts` to add or modify tables: + Edit `src/db/schema.sqlite.ts` to add or modify tables: ```typescript // Example: Adding a new projects table @@ -115,18 +118,14 @@ Follow these steps to add or modify database tables: id: text('id').primaryKey(), name: text('name').notNull(), description: text('description'), - userId: text('user_id').references(() => users.id), - createdAt: integer('created_at', { mode: 'timestamp' }).notNull().default(sql`(strftime('%s', 'now'))`), - updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().default(sql`(strftime('%s', 'now'))`), + userId: text('user_id').references(() => authUser.id), + createdAt: integer('created_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()), + updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().$defaultFn(() => new Date()), }); - - // Don't forget to add it to baseSchema - export const baseSchema = { - users, - projects, // Add your new table here - }; ``` + **Note**: Tables are automatically exported and available - no need to manually add them to a base schema object. + 2. **Generate Migration** Run the migration generation command: @@ -181,7 +180,7 @@ Tables defined by plugins are automatically created when the plugin is loaded an ## Development Workflow -1. Make schema changes in `src/db/schema.ts` +1. Make schema changes in `src/db/schema.sqlite.ts` 2. Generate migrations with `npm run db:generate` 3. Restart the server to apply migrations 4. Update application code to use the modified schema @@ -193,7 +192,7 @@ Tables defined by plugins are automatically created when the plugin is loaded an - Include proper foreign key constraints for relational data - Add explicit types for all columns - Always use migrations for schema changes in development and production -- **Important**: When adding foreign key relationships, update the dialect-specific schema files (e.g., `src/db/schema.sqlite.ts`) rather than the central `schema.ts` file, as Drizzle Kit uses these files for migration generation +- **Important**: All schema changes should be made in `src/db/schema.sqlite.ts` as it is the single source of truth for Drizzle Kit migration generation - Never manually create migration files - always use `npm run db:generate` to ensure proper migration structure ## Inspecting the Database diff --git a/docs/deploystack/development/backend/roles.mdx b/docs/deploystack/development/backend/roles.mdx index 55b9004..f414733 100644 --- a/docs/deploystack/development/backend/roles.mdx +++ b/docs/deploystack/development/backend/roles.mdx @@ -129,6 +129,14 @@ When a user registers: - Automatic conflict resolution for duplicate slugs - Team owner becomes `team_admin` automatically +#### Default Team Protection + +- **Default Team Identification**: Teams created during user registration (name matches username) +- **Name Protection**: Default team names cannot be changed via API or UI +- **Deletion Protection**: Default teams cannot be deleted +- **Description Editing**: Default team descriptions can still be modified +- **UI Indicators**: Frontend shows lock icons and explanatory text for protected fields + #### Team Roles - **Team Admin**: Full control over team settings and management @@ -195,6 +203,30 @@ DELETE /api/teams/:id Authorization: Required (teams.delete permission) ``` +#### Get Team by ID + +```http +GET /api/teams/:id +Authorization: Required (teams.view permission) +``` + +**Response:** + +```json +{ + "success": true, + "data": { + "id": "team123", + "name": "My Team", + "slug": "my-team", + "description": "Team description", + "owner_id": "user123", + "created_at": "2025-01-30T15:00:00.000Z", + "updated_at": "2025-01-30T15:00:00.000Z" + } +} +``` + #### Get Team Members ```http @@ -217,14 +249,82 @@ const team = await TeamService.createTeam({ // Get user's teams const teams = await TeamService.getUserTeams(userId); +// Get team by ID +const team = await TeamService.getTeamById(teamId); + +// Update team +const updatedTeam = await TeamService.updateTeam(teamId, { + name: 'New Name', + description: 'New description' +}); + +// Delete team +const deleted = await TeamService.deleteTeam(teamId); + // Check team limits const canCreate = await TeamService.canUserCreateTeam(userId); // Team membership checks const isAdmin = await TeamService.isTeamAdmin(teamId, userId); const isOwner = await TeamService.isTeamOwner(teamId, userId); +const isMember = await TeamService.isTeamMember(teamId, userId); + +// Default team checks +const isDefault = await TeamService.isDefaultTeam(teamId, userId); + +// Get team membership details +const membership = await TeamService.getTeamMembership(teamId, userId); ``` +### Frontend Team Management + +The system includes a comprehensive team management interface: + +#### Teams List Page (`/teams`) + +- Displays all user's teams in a data table +- Shows team name, description, creation date, and member count +- Includes "Manage" button for team administrators +- Uses shadcn/ui components for consistent styling + +#### Team Management Page (`/teams/manage/:id`) + +- **URL Pattern**: `/teams/manage/{teamId}` +- **Access Control**: Only team administrators can access +- **Design**: Matches admin interface styling (`/admin/users/:id`) +- **Features**: + - Team information display (ID, creation date, update date) + - Editable team name (disabled for default teams with lock icon) + - Editable team description (always available) + - Default team badge and explanations + - Danger zone with team deletion (protected for default teams) + - Confirmation modal for team deletion using shadcn dialog + +#### UI Components + +```typescript +// Team management form validation +const teamSchema = z.object({ + name: z.string().min(1, 'Team name is required'), + description: z.string().optional() +}); + +// Default team protection in UI +const isDefaultTeam = computed(() => { + return team.value?.name === user.value?.username; +}); +``` + +#### Internationalization + +Complete i18n support with translation keys: + +- `teams.manage.title` - Page title +- `teams.manage.defaultTeam.badge` - Default team indicator +- `teams.manage.form.name.disabled` - Lock explanation +- `teams.manage.dangerZone.title` - Deletion section +- `teams.manage.delete.confirmation` - Confirmation dialog + ## Database Schema ### Roles Table diff --git a/docs/deploystack/development/frontend/event-bus.mdx b/docs/deploystack/development/frontend/event-bus.mdx new file mode 100644 index 0000000..c82dea3 --- /dev/null +++ b/docs/deploystack/development/frontend/event-bus.mdx @@ -0,0 +1,596 @@ +--- +title: Global Event Bus +description: Complete guide to using the global event bus system for cross-component communication in the DeployStack frontend. +sidebar: Event Bus +--- + +# Global Event Bus + +The DeployStack frontend implements a global event bus system using the [mitt](https://github.com/developit/mitt) library to enable efficient cross-component communication. This system provides immediate updates across components without requiring direct parent-child relationships or complex state management. + +## Overview + +The event bus solves common frontend challenges such as: +- **Cross-component communication** between unrelated components +- **Immediate UI updates** when data changes in different parts of the application +- **Cache invalidation** and data synchronization +- **Decoupled architecture** for better maintainability + +## Architecture + +### Event Bus Setup + +The event bus is configured globally in `main.ts` using Vue 3's provide/inject pattern: + +```typescript +// main.ts +import mitt from 'mitt' +import type { EventBusEvents } from './composables/useEventBus' + +// Create typed event bus +const emitter = mitt() + +// Provide globally +app.provide('emitter', emitter) +``` + +### Type Safety + +All events are strictly typed using TypeScript interfaces: + +```typescript +// src/composables/useEventBus.ts +export type EventBusEvents = { + 'teams-updated': void + 'team-created': void + 'team-deleted': void + 'user-profile-updated': void + 'mcp-server-deployed': { serverId: string; status: string } + 'notification-show': { message: string; type: 'success' | 'error' | 'warning' } +} +``` + +## Usage + +### Basic Implementation + +#### 1. Using the Composable + +```typescript +// In any component +import { useEventBus } from '@/composables/useEventBus' + +export default { + setup() { + const eventBus = useEventBus() + + // Emit events + eventBus.emit('teams-updated') + + // Listen to events + eventBus.on('teams-updated', () => { + console.log('Teams were updated!') + }) + + return {} + } +} +``` + +#### 2. Component Lifecycle Management + +```vue + +``` + +## Real-World Examples + +### Example 1: Team Management System + +This example shows how the sidebar automatically updates when teams are created from the teams page. + +#### Emitting Events (Team Creation) + +```vue + + +``` + +#### Listening for Events (Sidebar Updates) + +```vue + + +``` + +### Example 2: Notification System + +```vue + + +``` + +#### Triggering Notifications + +```vue + + +``` + +### Example 3: MCP Server Deployment Status + +```vue + + +``` + +```vue + + +``` + +## Best Practices + +### 1. Event Naming Convention + +Use descriptive, action-based names with consistent patterns: + +```typescript +// Good +'teams-updated' +'user-profile-changed' +'mcp-server-deployed' +'notification-show' + +// Avoid +'update' +'change' +'event1' +``` + +### 2. Type Safety + +Always define event types in the `EventBusEvents` interface: + +```typescript +export type EventBusEvents = { + // Simple events (no data) + 'teams-updated': void + 'cache-cleared': void + + // Events with data + 'user-updated': { userId: string; changes: Partial } + 'error-occurred': { message: string; code?: string } + 'progress-update': { percentage: number; task: string } +} +``` + +### 3. Memory Management + +Always clean up event listeners to prevent memory leaks: + +```vue + +``` + +### 4. Error Handling + +Wrap event handlers in try-catch blocks: + +```typescript +const handleDataUpdate = (data: any) => { + try { + // Process the event data + updateLocalState(data) + } catch (error) { + console.error('Error handling data update event:', error) + // Optionally emit an error event + eventBus.emit('error-occurred', { + message: 'Failed to process data update', + code: 'EVENT_HANDLER_ERROR' + }) + } +} +``` + +### 5. Debugging Events + +Add logging for development: + +```typescript +const eventBus = useEventBus() + +// Development logging +if (import.meta.env.DEV) { + eventBus.on('*', (type, data) => { + console.log(`[EventBus] ${type}:`, data) + }) +} +``` + +## Common Patterns + +### 1. Data Synchronization + +```typescript +// Pattern: Emit after successful API operations +const createTeam = async (teamData: CreateTeamInput) => { + try { + const newTeam = await TeamService.createTeam(teamData) + eventBus.emit('teams-updated') + return newTeam + } catch (error) { + eventBus.emit('error-occurred', { message: 'Failed to create team' }) + throw error + } +} +``` + +### 2. Cache Invalidation + +```typescript +// Pattern: Clear cache and refresh data +eventBus.on('teams-updated', () => { + TeamService.clearCache() + fetchTeams(true) // Force refresh +}) +``` + +### 3. UI State Updates + +```typescript +// Pattern: Update UI state across components +eventBus.on('user-profile-updated', (userData) => { + // Update user avatar in header + userAvatar.value = userData.avatar + // Update user name in sidebar + userName.value = userData.name +}) +``` + +## Performance Considerations + +### 1. Event Frequency + +Be mindful of high-frequency events: + +```typescript +// Good: Debounce frequent events +import { debounce } from 'lodash-es' + +const debouncedUpdate = debounce(() => { + eventBus.emit('search-updated') +}, 300) + +// Bad: Emitting on every keystroke +onInput(() => { + eventBus.emit('search-updated') // Too frequent! +}) +``` + +### 2. Event Data Size + +Keep event payloads small: + +```typescript +// Good: Send only necessary data +eventBus.emit('user-updated', { + userId: user.id, + changes: { name: user.name } +}) + +// Avoid: Sending entire objects +eventBus.emit('user-updated', entireUserObject) // Too much data! +``` + +## Testing + +### Unit Testing Events + +```typescript +// tests/components/TeamManager.test.ts +import { describe, it, expect, vi } from 'vitest' +import { mount } from '@vue/test-utils' +import TeamManager from '@/components/TeamManager.vue' + +describe('TeamManager', () => { + it('emits teams-updated event after creating team', async () => { + const mockEventBus = { + emit: vi.fn(), + on: vi.fn(), + off: vi.fn() + } + + const wrapper = mount(TeamManager, { + global: { + provide: { + emitter: mockEventBus + } + } + }) + + await wrapper.vm.createTeam({ name: 'Test Team' }) + + expect(mockEventBus.emit).toHaveBeenCalledWith('teams-updated') + }) +}) +``` + +## Migration Guide + +### From Direct Component Communication + +**Before:** +```vue + + + + +emit('team-created', teamData) +``` + +**After:** +```vue + + + + + +``` + +### Adding New Events + +1. **Define the event type**: +```typescript +// src/composables/useEventBus.ts +export type EventBusEvents = { + // ... existing events + 'new-feature-updated': { featureId: string; status: string } +} +``` + +2. **Emit the event**: +```typescript +eventBus.emit('new-feature-updated', { + featureId: 'feature-123', + status: 'active' +}) +``` + +3. **Listen for the event**: +```typescript +eventBus.on('new-feature-updated', (data) => { + console.log(`Feature ${data.featureId} is now ${data.status}`) +}) +``` + +## Troubleshooting + +### Common Issues + +1. **Events not firing**: Check if the event name matches exactly +2. **Memory leaks**: Ensure `eventBus.off()` is called in `onUnmounted()` +3. **TypeScript errors**: Verify event types are defined in `EventBusEvents` +4. **Handler not called**: Check if the listener was registered before the event was emitted + +### Debugging Tips + +```typescript +// Add global event logging +if (import.meta.env.DEV) { + const eventBus = useEventBus() + + // Log all events + eventBus.on('*', (type, data) => { + console.group(`[EventBus] ${type}`) + console.log('Data:', data) + console.log('Timestamp:', new Date().toISOString()) + console.groupEnd() + }) +} +``` + +The global event bus system provides a powerful and type-safe way to handle cross-component communication in the DeployStack frontend, enabling immediate updates and better user experience. diff --git a/docs/deploystack/development/frontend/index.mdx b/docs/deploystack/development/frontend/index.mdx index fe80308..7051a40 100644 --- a/docs/deploystack/development/frontend/index.mdx +++ b/docs/deploystack/development/frontend/index.mdx @@ -340,6 +340,7 @@ onMounted(() => { Continue reading the detailed guides: +- [Global Event Bus](/deploystack/development/frontend/event-bus) - Cross-component communication system - [Internationalization (i18n)](/deploystack/development/frontend/internationalization) - Multi-language support - [Plugin System](/deploystack/development/frontend/plugins) - Extending functionality - [Router Optimization](/deploystack/development/frontend/router-optimization) - Performance improvements diff --git a/docs/deploystack/teams.mdx b/docs/deploystack/teams.mdx new file mode 100644 index 0000000..b4a67b1 --- /dev/null +++ b/docs/deploystack/teams.mdx @@ -0,0 +1,312 @@ +--- +title: Teams Structure in DeployStack +description: Organize your MCP server deployments with teams - your workspace for managing servers, credentials, and environment variables in DeployStack. +sidebar: Teams +--- + +# Teams + +Teams are the organizational foundation of DeployStack, serving as dedicated workspaces where you manage all your MCP server deployments, cloud provider credentials, and environment variables. Think of teams as isolated containers that keep your deployment resources organized and secure. + +## Overview + +In DeployStack, teams provide: + +- **Isolated Workspaces**: Each team maintains its own separate environment for deployments +- **Resource Organization**: All your MCP servers, credentials, and settings are organized within teams +- **Access Control**: Team-based permissions ensure secure access to your deployment resources +- **Multi-Project Support**: Create up to 3 teams to organize different projects or environments + +Every team acts as a complete deployment environment, containing everything needed to deploy and manage MCP servers across various cloud providers. + +## Getting Started with Teams + +### Automatic Team Creation + +When you register for DeployStack, a default team is automatically created for you: + +- **Team Name**: Uses your username +- **Team Slug**: A URL-friendly version of your username (e.g., `john-doe`) +- **Description**: Automatically set as "[username]'s team" +- **Role**: You become the Team Administrator with full control + +This default team is immediately ready for use - you can start deploying MCP servers right away. + +### Team Limits + +Each user can create and manage up to **3 teams total**, including your default team. This means you can create 2 additional teams beyond your automatically created default team. + +## What Teams Contain + +Teams serve as comprehensive containers for all your deployment resources: + +### MCP Server Settings +- All deployed MCP server configurations +- Server deployment history and status +- Custom server settings and parameters +- Deployment logs and monitoring data + +### Cloud Provider Credentials +- **Render.com**: API tokens and service configurations +- **Fly.io**: Authentication tokens and app settings +- **Other Providers**: Credentials for additional supported platforms + +### Global Environment Variables +- **Node.js Environment Variables**: Custom env vars for Node.js-based MCP servers +- **Reusable Variables**: Environment variables that can be applied across multiple servers +- **Secure Storage**: All environment variables are encrypted and securely stored + +These global environment variables allow you to define common settings once and apply them to multiple MCP servers within the same team, streamlining your deployment process. + +## Team Management + +### Managing Your Teams + +DeployStack provides an intuitive interface for managing your teams through the Teams dashboard. + +#### Accessing Team Management + +1. **Navigate to Teams**: Go to the Teams section in your dashboard +2. **View Teams Table**: See all your teams with their details +3. **Manage Teams**: Click the "Manage" button next to any team you want to edit + +The "Manage" button is available for all teams where you have administrative privileges. + +#### Team Management Interface + +When you click "Manage" on a team, you'll access a comprehensive management interface that includes: + +- **Team Information**: View team ID, creation date, and last update +- **Team Settings**: Edit team name and description +- **Default Team Protection**: Special handling for your default team +- **Team Deletion**: Remove teams you no longer need (with safety protections) + +### Creating Additional Teams + +To create a new team: + +1. Navigate to the Teams section in your dashboard +2. Click "Create New Team" +3. Provide a team name and optional description +4. The system automatically generates a unique URL-friendly slug + +**Note**: You can only create teams if you haven't reached the 3-team limit. + +### Editing Team Details + +You can modify your teams through the team management interface: + +#### Team Name Editing + +- **Regular Teams**: You can freely change the name of teams you created +- **Default Teams**: Your automatically created default team name **cannot be changed** +- **Protection Indicator**: Default teams show a lock icon with an explanation +- **Reason**: This prevents confusion since your default team name matches your username + +#### Team Description Editing + +- **All Teams**: You can edit descriptions for any team you administer +- **No Restrictions**: This applies to both default and regular teams +- **Optional Field**: Descriptions can be left empty if desired + +#### Visual Indicators + +The interface provides clear visual feedback: + +- **Default Team Badge**: Shows "Default Team" label for your original team +- **Lock Icons**: Appear next to fields that cannot be edited +- **Explanatory Text**: Describes why certain fields are protected +- **Form Validation**: Prevents invalid changes and provides helpful error messages + +### Team Naming and Slugs + +- **Team Names**: Can contain spaces, special characters, and any readable text +- **Team Slugs**: Automatically generated URL-friendly identifiers +- **Unique Slugs**: If a slug already exists, the system adds a number (e.g., `my-team-2`) +- **Permanent Slugs**: Once created, team slugs cannot be changed + +### Team Ownership + +- **Team Owner**: The user who created the team has full administrative control +- **Owner Privileges**: Can modify all team settings, manage resources, and delete the team +- **Single Owner**: Each team has exactly one owner (currently you) + +## Team Features + +### Current Structure + +DeployStack teams currently operate with a **single-user model**: + +- Each team belongs to one user +- You have full control over your teams +- No team sharing or collaboration features (planned for future releases) + +### Team Roles + +Within your teams, you automatically have the **Team Administrator** role, which provides: + +- Full access to all team resources +- Ability to deploy and manage MCP servers +- Permission to modify team settings +- Authority to delete the team + +*Note: Team User roles exist in the system for future multi-user team functionality.* + +### Resource Isolation + +Each team maintains complete isolation: + +- **Separate Credentials**: Cloud provider credentials are team-specific +- **Independent Servers**: MCP servers in one team don't affect others +- **Isolated Variables**: Environment variables are scoped to individual teams +- **Secure Boundaries**: No cross-team access to resources + +## Working with Teams + +### Step-by-Step Team Management + +#### Editing a Team + +1. **Navigate to Teams**: Go to your Teams dashboard +2. **Find Your Team**: Locate the team you want to edit in the table +3. **Click Manage**: Click the "Manage" button in the Actions column +4. **Edit Details**: + - Modify the team name (if not a default team) + - Update the team description + - Save your changes +5. **Confirmation**: You'll see a success message when changes are saved + +#### Deleting a Team (Non-Default Only) + +1. **Prepare the Team**: Remove all MCP servers and configurations +2. **Access Management**: Click "Manage" on the team you want to delete +3. **Find Danger Zone**: Scroll down to the "Danger Zone" section +4. **Click Delete**: Click the "Delete Team" button +5. **Confirm Action**: In the popup dialog, confirm you want to delete the team +6. **Final Warning**: Read the warning about permanent data loss +7. **Complete Deletion**: Click "Delete" in the confirmation dialog + +#### Understanding Team Status + +- **Default Team Badge**: Your original team shows a "Default Team" badge +- **Lock Icons**: Indicate fields that cannot be edited +- **Member Count**: Shows how many users are in each team (currently always 1) +- **Last Updated**: Displays when the team was last modified + +### Switching Between Teams + +If you have multiple teams, you can switch between them to: + +- Access different sets of MCP servers +- Use different cloud provider credentials +- Apply different environment variable sets +- Organize projects or environments separately + +### Managing Team Settings + +For each team, you can: + +- **Update Team Name**: Modify the display name +- **Edit Description**: Change or add team descriptions +- **Manage Credentials**: Add, update, or remove cloud provider credentials +- **Configure Variables**: Set up global environment variables +- **Monitor Deployments**: View all MCP servers and their status + +### Understanding Team Slugs + +Team slugs serve as unique identifiers: + +- **URL Component**: Used in dashboard URLs and API endpoints +- **Permanent Identifier**: Cannot be changed after team creation +- **Conflict Resolution**: System automatically handles naming conflicts +- **Case Insensitive**: Converted to lowercase with hyphens + +## Team Deletion and Consequences + +⚠️ **Critical Warning**: Team deletion is permanent and irreversible. + +### Default Team Protection + +**Your default team cannot be deleted** - this is a permanent protection: + +- **No Delete Option**: The deletion section won't appear for default teams +- **Safety Measure**: Prevents accidental loss of your primary workspace +- **Alternative**: You can still edit the description and manage all resources + +### Protection Mechanisms + +For non-default teams, multiple safety measures protect against accidental deletion: + +1. **Active Server Check**: Teams with active MCP servers **cannot be deleted** +2. **Confirmation Dialog**: A modal dialog requires explicit confirmation +3. **Clear Warning**: The interface clearly explains the consequences +4. **Two-Step Process**: You must first remove all servers, then confirm deletion + +### Required Steps Before Deletion + +To delete a non-default team, you must: + +1. **Stop All Running MCP Servers**: Ensure no servers are currently deployed or running +2. **Remove All Server Configurations**: Delete all MCP server settings and configurations +3. **Access Danger Zone**: Navigate to the "Danger Zone" section in team management +4. **Confirm Deletion**: Click delete and confirm in the popup dialog + +### What Gets Permanently Deleted + +When you delete a team, you lose **everything** associated with it: + +- **All MCP Server Settings**: Complete server configurations and deployment history +- **All Cloud Provider Credentials**: Stored API keys, tokens, and authentication data +- **All Global Environment Variables**: Custom environment settings and variables +- **Complete Deployment History**: Logs, monitoring data, and historical information + +### No Recovery Options + +**Team deletion is permanent** - there are no backups, recovery options, or ways to restore deleted teams. Once deleted, all data is gone forever. + +## Team Permissions + +Your team permissions determine what actions you can perform: + +### Global vs Team Permissions + +- **Global Permissions**: Control system-wide access (user management, global settings) +- **Team Permissions**: Control what you can do within your teams + +### Team-Related Permissions + +- **`teams.create`**: Create new teams (up to your limit) +- **`teams.view`**: View team details and resources +- **`teams.edit`**: Modify team settings and configurations +- **`teams.delete`**: Delete teams (after removing all servers) +- **`teams.manage`**: Full team management capabilities + +### Deployment Capabilities + +Your team role affects your ability to: + +- Deploy new MCP servers +- Modify server configurations +- Manage cloud provider credentials +- Set up environment variables +- Monitor deployment status +- Access deployment logs + +## Getting the Most from Teams + +### Organization Strategies + +Consider creating separate teams for: + +- **Different Projects**: Organize MCP servers by project or client + +### Resource Management + +Within each team: + +- **Group Related Servers**: Deploy related MCP servers in the same team +- **Shared Credentials**: Use the same cloud provider credentials across servers +- **Common Variables**: Leverage global environment variables for consistency +- **Logical Organization**: Use descriptive names and descriptions + +Teams provide the foundation for organized, secure, and efficient MCP server deployment in DeployStack. By understanding how teams work, you can effectively manage your deployment resources and maintain clean separation between different projects and environments.