Skip to content

akash-founderdash/mvp-developer-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MVP EventBridge Development System

A complete AWS EventBridge-powered system for automated MVP development using containerized workflows.

πŸ—οΈ System Overview

This system provides an automated pipeline that:

  1. Receives MVP development requests via AWS EventBridge events
  2. Triggers containerized development workflows using AWS Batch
  3. Stores job status and metadata in DynamoDB
  4. Sends completion notifications via SNS
  5. Manages the entire MVP lifecycle from request to deployment

πŸš€ Quick Start

Prerequisites

  • AWS CLI configured with appropriate permissions
  • Docker Desktop installed and running
  • Terraform >= 1.0
  • Node.js >= 18 (for testing)

1. Deploy Infrastructure

cd infrastructure
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your settings
terraform init
terraform plan
terraform apply

2. Build and Deploy Container

cd docker
# Login to ECR
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin YOUR_ACCOUNT_ID.dkr.ecr.us-east-2.amazonaws.com

# Build and push container
docker build -t mvp-pipeline:latest .
docker tag mvp-pipeline:latest YOUR_ACCOUNT_ID.dkr.ecr.us-east-2.amazonaws.com/founderdash/mvp-pipeline:latest
docker push YOUR_ACCOUNT_ID.dkr.ecr.us-east-2.amazonaws.com/founderdash/mvp-pipeline:latest

3. Test the System

cd scripts
chmod +x test-event-debug.sh
./test-event-debug.sh

πŸ“ Project Structure

mvp-eventbridge-system/
β”œβ”€β”€ infrastructure/          # Terraform infrastructure code
β”‚   β”œβ”€β”€ main.tf             # Main configuration
β”‚   β”œβ”€β”€ eventbridge.tf      # EventBridge resources
β”‚   β”œβ”€β”€ batch.tf            # AWS Batch configuration
β”‚   β”œβ”€β”€ dynamodb.tf         # DynamoDB tables
β”‚   β”œβ”€β”€ iam.tf              # IAM roles and policies
β”‚   β”œβ”€β”€ sns.tf              # SNS topics
β”‚   └── variables.tf        # Variable definitions
β”œβ”€β”€ docker/                 # Container configuration
β”‚   β”œβ”€β”€ Dockerfile          # Multi-stage Docker build
β”‚   β”œβ”€β”€ pipeline.sh         # Main pipeline script
β”‚   └── scripts/           # Development scripts
β”‚       β”œβ”€β”€ develop-mvp.sh  # MVP development workflow
β”‚       β”œβ”€β”€ create-repository.sh
β”‚       β”œβ”€β”€ deploy-vercel.sh
β”‚       └── ...
β”œβ”€β”€ lambda/                 # Lambda functions
β”‚   β”œβ”€β”€ update-mvp-status.py
β”‚   └── index.py
β”œβ”€β”€ scripts/               # Utility and test scripts
β”‚   β”œβ”€β”€ test-event-debug.sh # Comprehensive system test
β”‚   β”œβ”€β”€ eventbridge-test-cli.sh # CLI testing tool
β”‚   └── eventbridge-policy.json # IAM policy template
β”œβ”€β”€ docs/                  # Documentation
β”‚   β”œβ”€β”€ mvp-automation-design.md
β”‚   └── EVENTBRIDGE_*.md
└── README.md

🎯 Core Components

EventBridge Configuration

  • Event Bus: mvp-development
  • Event Source: founderdash.web
  • Event Type: MVP Development Request

Batch Job Processing

  • Job Queue: founderdash-mvp-job-queue
  • Job Definition: founderdash-mvp-job-definition
  • Container: Ubuntu 22.04 with Node.js, Python, AWS CLI, GitHub CLI

Data Storage

  • DynamoDB Table: founderdash-mvp-development-jobs
  • Job Status Tracking: Real-time status updates
  • Metadata Storage: Complete job history and parameters

πŸ“‘ Event Format

Send events to trigger MVP development:

{
  "Source": "founderdash.web",
  "DetailType": "MVP Development Request",
  "Detail": "{\"jobId\": \"unique_job_id\", \"userId\": \"user_123\", \"businessName\": \"My Startup\", \"requirements\": \"Build a SaaS platform\", \"priority\": \"normal\"}",
  "EventBusName": "mvp-development"
}

πŸ”§ Configuration

Environment Variables

The system uses these environment variables:

# AWS Configuration
AWS_REGION=us-east-2
AWS_ACCOUNT_ID=your-account-id

# EventBridge
EVENTBRIDGE_BUS_NAME=mvp-development

# DynamoDB
DYNAMODB_TABLE_NAME=founderdash-mvp-development-jobs

# Container Registry
ECR_REPOSITORY=founderdash/mvp-pipeline

# Notifications
SNS_COMPLETION_TOPIC=founderdash-mvp-completion

Terraform Variables

Key variables in terraform.tfvars:

project_name = "founderdash-mvp"
environment = "production"
aws_region = "us-east-2"

# Batch Configuration
batch_compute_environment_type = "FARGATE"
batch_max_vcpus = 256
batch_desired_vcpus = 0

# EventBridge Configuration
eventbridge_bus_name = "mvp-development"

πŸ§ͺ Testing

Run Complete System Test

cd scripts
./test-event-debug.sh

Send Test Event

cd scripts
./eventbridge-test-cli.sh send

Monitor Job Status

aws batch list-jobs --job-queue founderdash-mvp-job-queue --region us-east-2

Check DynamoDB Records

aws dynamodb scan --table-name founderdash-mvp-development-jobs --region us-east-2

πŸ“Š Monitoring and Observability

CloudWatch Logs

  • EventBridge Logs: Rule invocations and failures
  • Batch Logs: Container execution logs at /aws/batch/mvp-pipeline
  • Lambda Logs: Status update function logs

CloudWatch Metrics

  • EventBridge rule matches and invocations
  • Batch job submissions and completions
  • DynamoDB read/write operations

SNS Notifications

  • Job completion notifications
  • Error alerts and failures
  • Status change updates

πŸ”’ Security

IAM Roles

  • EventBridge Role: Permissions to submit Batch jobs
  • Batch Execution Role: Container execution permissions
  • Batch Task Role: Application-level AWS permissions
  • Lambda Role: DynamoDB and SNS permissions

Network Security

  • VPC Configuration: Batch runs in default VPC with public subnets
  • Security Groups: Minimal required access
  • Encryption: All data encrypted at rest and in transit

πŸš€ Deployment Pipeline

Development Workflow

  1. Request Reception: EventBridge receives MVP development request
  2. Job Submission: Batch job submitted with parsed parameters
  3. Container Execution: Development container processes the request
  4. Status Updates: DynamoDB tracking throughout process
  5. Completion Notification: SNS notification on success/failure

Container Workflow

  1. Environment Setup: Prepare development environment
  2. Source Code Analysis: Parse existing codebase structure
  3. MVP Development: Execute development using available tools
  4. Quality Assurance: Run tests and validation
  5. Output Generation: Create deployable MVP package

πŸ“ API Reference

EventBridge Event Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "jobId": {"type": "string"},
    "userId": {"type": "string"}, 
    "businessName": {"type": "string"},
    "requirements": {"type": "string"},
    "priority": {"type": "string", "enum": ["low", "normal", "high"]},
    "timestamp": {"type": "string", "format": "date-time"}
  },
  "required": ["jobId", "userId", "businessName"]
}

DynamoDB Schema

{
  "jobId": "string (Primary Key)",
  "userId": "string",
  "businessName": "string", 
  "status": "string",
  "createdAt": "string (ISO 8601)",
  "updatedAt": "string (ISO 8601)",
  "batchJobId": "string",
  "requirements": "string",
  "priority": "string",
  "metadata": "map"
}

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make changes with proper tests
  4. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

For support and questions:

  • Check the documentation in /docs
  • Review CloudWatch logs for debugging
  • Test with the provided scripts
  • Monitor AWS resource usage and costs

πŸŽ‰ Version History

  • v1.0.0: Initial release with complete EventBridge β†’ Batch β†’ DynamoDB pipeline
  • v1.1.0: Added comprehensive testing and monitoring
  • v1.2.0: Enhanced container with development tools
  • v1.3.0: Added SNS notifications and status tracking

Manual update of EventBridge targets

./scripts/update-eventbridge-target.sh

Deploy infrastructure and update EventBridge automatically

make deploy-all

Update EventBridge targets only

make update-eventbridge

Test the complete system

./scripts/eventbridge-test-cli.sh send

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published