Skip to content

DeployHub is a fast, reliable, and scalable deployment platform built to help developers effortlessly deploy and manage their applications.Based on vercel it uses aws s3 to clone , store and build the code

Notifications You must be signed in to change notification settings

phantomsoldierking/DeployHub

Repository files navigation

DeployHub

DeployHub is a monorepo containing services for handling Vercel deployments, file uploads, and request handling. It is organized into three main packages:

  • vercel-deploy-service: Handles deployment automation to Vercel, AWS integration, and Redis-based coordination.
  • vercel-upload-service: Manages file uploads, AWS S3 integration, and exposes an Express API for upload operations.
  • vercel-request-handler: Provides a request handling layer, potentially acting as a gateway or middleware for deployment and upload requests.

Architecture

DeployHub uses a modular, service-oriented architecture. Each service is a standalone Node.js/TypeScript application, but they can be orchestrated together for a complete deployment workflow.

DeployHub/
├── vercel-deploy-service/
│   └── src/
│       ├── aws.ts
│       ├── index.ts
│       └── utils.ts
├── vercel-upload-service/
│   └── src/
│       ├── aws.ts
│       ├── file.ts
│       ├── index.ts
│       └── utils.ts
└── vercel-request-handler/
    └── src/
        └── index.ts

Service Overview

vercel-deploy-service

  • Purpose: Automates deployments to Vercel, manages AWS resources, and coordinates with Redis.
  • Key Features:
    • AWS SDK integration for resource management.
    • Redis for caching or coordination.
    • Utility functions for deployment automation.

vercel-upload-service

  • Purpose: Handles file uploads, integrates with AWS S3, and exposes an Express API.
  • Key Features:
    • Express server for handling HTTP file uploads.
    • AWS S3 integration for storing uploaded files.
    • CORS support for cross-origin requests.
    • Redis for caching or coordination.
    • Utility functions for file and AWS operations.

vercel-request-handler

  • Purpose: Acts as a gateway or middleware for handling requests to the deployment and upload services.
  • Key Features:
    • Express server for routing and handling API requests.
    • Can be extended to add authentication, logging, or request validation.

Features

  • TypeScript: All services are written in TypeScript for type safety and maintainability.
  • AWS Integration: Uses the AWS SDK for S3 and other AWS services.
  • Redis Support: For caching, coordination, or pub/sub.
  • Express APIs: HTTP APIs for file uploads and request handling.
  • CORS Support: Allows cross-origin requests for upload endpoints.
  • Simple Git Integration: (vercel-upload-service) for handling git operations if needed.

Setup Instructions

Prerequisites

  • Node.js (v16 or newer recommended)
  • npm or yarn
  • AWS credentials (for S3 integration)
  • Redis server (if using Redis features)

Clone the Repository

git clone https://github.com/phantomsoldierking/DeployHub.git
cd DeployHub

Install Dependencies

Each service is independent. Install dependencies for each:

cd vercel-deploy-service
npm install

cd ../vercel-upload-service
npm install

cd ../vercel-request-handler
npm install

Build the Services

Each service uses TypeScript. Build them individually:

cd vercel-deploy-service
npx tsc

cd ../vercel-upload-service
npx tsc

cd ../vercel-request-handler
npx tsc

Environment Variables

Create a .env file in each service directory as needed. Common variables might include:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_REGION
  • REDIS_URL
  • S3_BUCKET_NAME
  • PORT

Running the Services

Start each service (after building):

cd vercel-deploy-service
node dist/index.js

cd ../vercel-upload-service
node dist/index.js

cd ../vercel-request-handler
node dist/index.js

You can use tools like concurrently or pm2 to run all services together.


Usage

  • vercel-upload-service: Exposes endpoints for file uploads. Integrates with S3 and Redis.
  • vercel-deploy-service: Handles deployment automation, AWS resource management, and Redis coordination.
  • vercel-request-handler: Handles incoming API requests and routes them to the appropriate service.

Refer to each service's src/index.ts for API endpoints and usage details.


Development

  • All TypeScript configuration is in each service's tsconfig.json.
  • Source code is in the src/ directory of each service.
  • Output is in the dist/ directory after building.

Contributing

  1. Fork the repo and create your branch.
  2. Make changes and add tests if needed.
  3. Run npx tsc in each service to ensure type safety.
  4. Submit a pull request.

License

This project is licensed under the ISC License.


Contact

For questions or support, please open an issue in this repository.

About

DeployHub is a fast, reliable, and scalable deployment platform built to help developers effortlessly deploy and manage their applications.Based on vercel it uses aws s3 to clone , store and build the code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published