Skip to content

Latest commit

 

History

History
265 lines (200 loc) · 33.4 KB

README.en.md

File metadata and controls

265 lines (200 loc) · 33.4 KB

CloudBase Framework

🚀 CloudBase Framework is a front-end and back-end integrated deployment tool officially produced by CloudBase

No need to change the code, one-click hosting and deployment of the front and back ends, based on the Serverless architecture, accelerating access, flexible and free of operation and maintenance.

Official Website / Document / Community / Q&A

Github License Npm version lerna download issue PRs Welcome star

Table of Contents

Quick Start

  1. Install CLI
npm install -g @cloudbase/cli@latest
  1. Login
cloudbase login
  1. Initialize an application
cloudbase init
  1. Deploy the application
cloudbase framework deploy

Deploy a project created by Vue CLI with one click

Project Example

name Application example introduction Create project based on template
Vue application Vue + cloud functions + static website deployment
React application React + cloud functions + static website deployment
React full stack application React + cloud functions + static website deployment + cloud database
Nuxt SPA application Nuxt SPA + cloud function + static website deployment
Nuxt SSR application Nuxt SSR + server deployment + static website deployment
Koa application Koa + server deployment
Express app Express + server deployment
Nest app Nest + server deployment
Egg application Egg + server deployment
Node.js cloud function example Node.js cloud function
PHP cloud function example PHP cloud functions
Java cloud function example Java cloud functions
VuePresss website application VuePresss + static website deployment
Node.js cloud application Node.js + Serverless cloud application deployment
Aqueduct (Dart Server) cloud application Aqueduct (Dart Server) + Serverless cloud application deployment
Omi application Omi + cloud function + static website deployment
uni-app application uni-app + cloud function + static website deployment
Next SSR application Next SSR + server deployment + static website deployment

Template

Cloud Development CloudBase Framework supports template projects and provides template projects in multiple languages and frameworks. You can create an out-of-the-box project with just one command, and integrate the workflow of development, construction, and deployment.

The template can be customized freely. You can create a template project in any language and framework according to your needs, and generate your initial project with one click through the template project. The original project can be easily transformed into a cloudbase template project. You only need to create one cloudbaserc.json, fill in the necessary configuration.

For more template related introduction, you can click to go

Plugin

Cloud Development CloudBase Framework supports a plug-in mechanism and provides plug-ins for a variety of application frameworks and cloud resources. It only requires very little configuration or even zero configuration to integrate existing applications and cloud development CloudBase Framework framework.

The plug-in can handle the process of construction, deployment, development, and debugging of some independent units in the application. For example, the website plug-in can handle units such as static websites, and the node plug-in can handle node applications such as koa and express. Plug-ins can be used in combination.

The configuration of the plug-in is written in the cloudbaserc file. Currently, only JSON files are supported, and YAML will be supported in the future.

The configuration of the plug-in can be filled in manually or automatically generated. Currently, the front-end framework supports automatic identification and filling of plug-ins.

Automatic detection and generation plug-in configuration process

  • cloudbase init --without-template generates project configuration·

  • cloudbase framework deploy automatically detects and generates plug-in configuration files and deploys

List of currently supported plugins

Plug-in The latest version Plug-in introduction
@cloudbase/framework-plugin-website Npm version One-click deployment of website applications
@cloudbase/framework-plugin-node Npm version One-click deployment of Node applications (supports low-level deployment as functions or serverless cloud applications)
@cloudbase/framework-plugin-nuxt Npm version One-click deployment of Nuxt SSR application
@cloudbase/framework-plugin-function Npm version One-click deployment function resources
@cloudbase/framework-plugin-container Npm version One-click deployment of cloud application container services
@cloudbase/framework-plugin-dart Npm version One-click deployment of Dart cloud applications
@cloudbase/framework-plugin-database Npm version One-click declarative deployment cloud development NoSQL cloud database
@cloudbase/framework-plugin-next Npm version One-click deployment of Next SSR application
@cloudbase/framework-plugin-mp Npm version One-click deployment of Wechat MiniProgram

Configuration example

For example, a Vue full-stack project, including website front-end and cloud functions

You can manually create a cloudbaserc.json under the project, fill in the following configuration file, and call cloudbase framework deploy for deployment

Or run directly

  • cloudbase init --without-template

  • cloudbase framework deploy for automatic detection and deployment

{
  "envId": "{{envId}}",
  "framework": {
    "plugins": {
      "client": {
        "use": "@cloudbase/framework-plugin-website",
        "inputs": {
          "buildCommand": "npm run build",
          "outputPath": "dist"
        }
      },
      "server": {
        "use": "@cloudbase/framework-plugin-function",
        "inputs": {
          "functionRootPath": "cloudfunctions",
          "functions": [
            {
              "name": "helloworld",
              "config": {
                "timeout": 5,
                "envVariables": {},
                "runtime": "Nodejs10.15",
                "memorySize": 128
              }
            }
          ]
        }
      }
    }
  }
}

For more detailed configuration parameter descriptions, you can view the configuration documentation, click Go

Overall Structure

Cloud Development CloudBase Framework is based on cloud development underlying resources and cloud development resource orchestration management, and it includes CLI tool layer, application framework layer and CI/CD layer as a whole.

  • The CLI layer is adapted to mainstream application frameworks, can be seamlessly integrated with one click, and provides functions such as development and one-click deployment
  • The application framework layer provides SDKs and components for different languages and frameworks, while abstracting the underlying cloud resources
  • The CI/CD layer can implement functions such as cloud deployment, code platform integration, gray release, and upgrade rollback

Roadmap

🚀 Indicates the function that has been implemented

milestone status
The core functions of the framework support plug-in mechanism and adapt to Cloudbase CLI 🚀
Develop Website plugin to support the deployment of front-end static projects 🚀
Automatic detection of front-end frameworks (mainstream frameworks such as Vue/React) Use Website plugin 🚀
Develop Nuxt plugin to support Nuxt SSR project 🚀
Develop Function plugin to support automatic function deployment 🚀
Develop Node Api Plugin to support one-click deployment of Node applications 🚀
Plug-in supports compiling into SAM description 🚀
Automatically detect Express/ Koa and other mainstream Node frameworks using Node Api Plugin
Cloud development full stack framework support
Node Api Plugin supports modeling and code generation
Combine the CI/CD functions of Github Action, Coding and other platforms
Support part of the back-end containerized construction, providing another option for service functional construction 🚀
Develop SAM Plugin to support SAM extension plug-ins, the framework can introduce third-party SAM extensions (such as CMS)
Develop Flutter Plugin to support one-click deployment of Flutter's Dart backend 🚀

Contribution Guide

Welcome everyone to participate in the development of CloudBase Framework and contribute

Please refer to the development of the contribution of Development Contribution Guidelines document

Changelog

Please refer to the changelog file for the version change log of CloudBase Framework

License

For open source agreement documents, please refer to Apache License 2.0

Online Group

Wechat Group
QQ Group

Contributors ✨

Thanks goes to these wonderful people (emoji key):

All Contributors


Booker Zhao

🚇 ⚠️ 💻 🔌

Weijia Wang

💻

hengechang

💻 🚇

Zijie Zhou

💻 🔌 📢

erikqin

💻 🚧 💡

Hanqin

🐛

Zem

💻

magenta

📝 💻

TIANXIANG LAN

🖋

liyuanfeng

💻

白宦成

💻

易良

💻

Sherry Zhang

💻

RealyBig

💻

Saiya

📢 🐛

This project follows the all-contributors specification. Contributions of any kind welcome!