Skip to content

Create .env.development with all required variables #236

@Hyperkit-dev

Description

@Hyperkit-dev

🎯 Layer 1: Intent Parsing

What needs to be done?

Task Title:

Create .env.development with all required variables

Area: infra | Repos: infra/

Primary Goal:

Create a comprehensive .env.development file with all required environment variables for local development, ensuring developers can quickly set up their development environment

User Story / Context:

As a developer, I want a complete .env.development file with all required variables so that I can quickly configure my local development environment without missing critical settings

Business Impact:

Reduces developer onboarding time and setup friction. Prevents configuration errors. Supports Phase 1 Foundation goals for developer experience.

Task Metadata:


📚 Layer 2: Knowledge Retrieval

What information do I need?

Required Skills / Knowledge:

  • Environment configuration management
  • Understanding of all service dependencies
  • Security best practices for secrets management

Estimated Effort:

M (Medium - 3-5 days)

Knowledge Resources:

  • Review .cursor/skills/ for relevant patterns
  • Check .cursor/llm/docs/ for implementation examples
  • Read Platform Blueprint: docs/draft.md
  • Read System Architecture: docs/planning/4-System-Architecture-Design.md
  • Review existing .env.example if available
  • Study tech docs / ADRs in docs/adrs/ directory
  • Review service documentation for required environment variables

Architecture Context:

According to the Platform Blueprint, HyperAgent uses multiple services (orchestrator, agents, core services) that require various environment variables for database connections, API keys, RPC endpoints, and service configurations.

System Architecture Diagram:

graph TB
    subgraph "Environment Variables"
        DB[Database URLs]
        API[API Keys<br/>LLM Providers]
        RPC[RPC Endpoints]
        Cache[Redis URLs]
        VectorDB[VectorDB Config]
        Storage[IPFS/Storage]
    end
    
    subgraph "Services"
        Orchestrator[Orchestrator Service]
        Agents[Agent Services]
        Core[Core Services]
    end
    
    DB --> Orchestrator
    DB --> Core
    API --> Orchestrator
    API --> Agents
    RPC --> Agents
    Cache --> Orchestrator
    VectorDB --> Agents
    Storage --> Core
Loading

Code Examples & Patterns:

Environment File Example:

# Database
DATABASE_URL=postgresql://user:pass@localhost:5432/hyperagent_dev
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# Redis
REDIS_URL=redis://localhost:6379

# LLM Providers
ANTHROPIC_API_KEY=your-anthropic-key
OPENAI_API_KEY=your-openai-key
GEMINI_API_KEY=your-gemini-key

# VectorDB
PINECONE_API_KEY=your-pinecone-key
PINECONE_ENVIRONMENT=us-west1-gcp

# RPC Endpoints
MANTLE_RPC_URL=https://rpc.mantle.xyz
POLYGON_RPC_URL=https://polygon-rpc.com
ETHEREUM_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/your-key

# Tenderly
TENDERLY_API_KEY=your-tenderly-key
TENDERLY_USER_NAME=your-username
TENDERLY_PROJECT_SLUG=your-project

# Storage
PINATA_API_KEY=your-pinata-key
PINATA_SECRET_KEY=your-pinata-secret

# Application
NODE_ENV=development
LOG_LEVEL=debug
API_PORT=8000

⚠️ Layer 3: Constraint Analysis

What constraints and dependencies exist?

Known Dependencies:

  • All service requirements must be identified
  • Development service accounts and API keys must be available
  • Local development services (PostgreSQL, Redis) must be documented

Technical Constraints:

Scope limited to development environment variables. Production and staging configurations tracked separately. Sensitive values should use placeholders with instructions for obtaining real values.

Current Blockers:

None identified (update as work progresses)

Risk Assessment & Mitigations:

Risk of exposing sensitive credentials. Mitigation: Use placeholder values, document where to obtain real values, ensure .env.development is in .gitignore, provide secure vault access instructions.

Resource Constraints:

  • Deadline: Feb 5–17 (Sprint 1)
  • Effort Estimate: M (Medium - 3-5 days)

💡 Layer 4: Solution Generation

How should this be implemented?

Solution Approach:

Create .env.development file with:

  1. All required environment variables organized by category
  2. Placeholder values for sensitive data
  3. Clear comments explaining each variable
  4. Instructions for obtaining real values
  5. Default values suitable for local development
  6. Reference to internal vault for production secrets

Design Considerations:

  • Follow established patterns from .cursor/skills/
  • Maintain consistency with existing configuration patterns
  • Consider security and secret management
  • Ensure proper documentation
  • Plan for testing and validation
  • Support easy onboarding for new developers

Acceptance Criteria (Solution Validation):

  • .env.development file created with all required variables
  • Variables organized by category with clear comments
  • Placeholder values provided for sensitive data
  • Documentation includes instructions for obtaining real values
  • File is properly gitignored
  • Development setup guide updated
  • Code reviewed and approved

📋 Layer 5: Execution Planning

What are the concrete steps?

Implementation Steps:

  1. Audit all services for required environment variables
  2. Categorize variables (database, API keys, RPC, storage, etc.)
  3. Create .env.development file structure
  4. Add database connection variables
  5. Add LLM provider API key variables
  6. Add RPC endpoint variables
  7. Add storage service variables (IPFS, VectorDB)
  8. Add application configuration variables
  9. Add comments and documentation
  10. Verify .env.development is in .gitignore
  11. Create setup documentation
  12. Code review and approval

Environment Setup:
Repos / Services:

  • Infra / IaC repo: hyperagent/infra/
  • Development environment

Required Environment Variables:

  • All variables documented in .env.development

Access & Credentials:

  • API keys: Internal vault (1Password / Doppler)
  • Access request: Contact @devops or project lead

✅ Layer 6: Output Formatting & Validation

How do we ensure quality delivery?

Ownership & Collaboration:

Quality Gates:

  • Code follows project style guide (see .cursor/rules/rules.mdc)
  • All required variables included
  • No sensitive data committed to repository
  • Documentation updated (README, setup guide)
  • Meets all acceptance criteria from Layer 4
  • Follows production standards (see .cursor/rules/production.mdc)

Review Checklist:

  • Code review approved by @ArhonJay
  • File properly gitignored
  • Documentation complete and accurate
  • Security review passed (no secrets exposed)

Delivery Status:

  • Initial Status: To Do
  • Progress Tracking: Use issue comments for updates
  • Sign-off: Approved by @Hyperionkit on [YYYY-MM-DD]
  • PR Link: [Link to merged PR(s)]

Related Issues:

  • Related to development environment setup

Documentation References:

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions