Convert Figma logo to code with AI

Tencent logocloudbase-framework

腾讯云开发云原生一体化部署工具 🚀 CloudBase Framework:一键部署,不限框架语言,云端一体化开发,基于Serverless 架构。A front-end and back-end integrated deployment tool. One-click deploy to serverless architecture. https://docs.cloudbase.net/framework/index

1,949
190
1,949
41

Top Related Projects

⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.

18,294

A Git-based CMS for Static Site Generators

13,537

Develop. Preview. Ship.

The Firebase Command Line Tools

A declarative JavaScript library for application development using cloud services.

81,662

The open source Firebase alternative. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Quick Overview

CloudBase Framework is an open-source serverless application development framework developed by Tencent Cloud. It aims to simplify the process of developing, deploying, and managing serverless applications across multiple cloud platforms. The framework provides a unified experience for developers to build and deploy applications using various programming languages and frameworks.

Pros

  • Multi-platform support: Works with multiple cloud providers, including Tencent Cloud, AWS, and Azure
  • Extensible plugin system: Allows easy integration of new features and technologies
  • Simplified deployment process: Automates many aspects of serverless application deployment
  • Language and framework agnostic: Supports various programming languages and popular frameworks

Cons

  • Learning curve: Requires understanding of serverless concepts and specific CloudBase Framework conventions
  • Limited documentation in English: Most documentation is in Chinese, which may be challenging for non-Chinese speakers
  • Dependency on cloud services: Tight integration with cloud providers may lead to vendor lock-in
  • Relatively new project: May have fewer community resources compared to more established frameworks

Getting Started

To get started with CloudBase Framework, follow these steps:

  1. Install the CloudBase CLI:
npm install -g @cloudbase/cli
  1. Initialize a new project:
cloudbase init my-project
cd my-project
  1. Configure your cloud provider credentials in the cloudbaserc.json file.

  2. Deploy your application:

cloudbase framework deploy

For more detailed instructions and configuration options, refer to the official documentation (primarily available in Chinese).

Competitor Comparisons

⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.

Pros of Serverless

  • Broader cloud provider support, including AWS, Azure, Google Cloud, and more
  • Larger community and ecosystem with extensive plugins and integrations
  • More mature project with a longer history and established best practices

Cons of Serverless

  • Steeper learning curve for beginners due to its extensive feature set
  • Can be overkill for simple projects or those focused on a single cloud provider
  • Configuration files can become complex for large-scale applications

Code Comparison

Serverless (serverless.yml):

service: my-service
provider:
  name: aws
  runtime: nodejs14.x
functions:
  hello:
    handler: handler.hello

Cloudbase Framework (cloudbaserc.json):

{
  "envId": "your-env-id",
  "functionRoot": "./functions",
  "functions": [
    {
      "name": "hello",
      "timeout": 5,
      "envVariables": {}
    }
  ]
}

Both frameworks use configuration files to define serverless applications, but Serverless uses YAML while Cloudbase Framework uses JSON. Serverless provides more detailed configuration options, while Cloudbase Framework offers a simpler structure focused on Tencent Cloud services.

18,294

A Git-based CMS for Static Site Generators

Pros of Decap CMS

  • More focused on content management for static sites
  • Easier integration with popular static site generators
  • Extensive documentation and community support

Cons of Decap CMS

  • Limited to content management, not a full-stack framework
  • Less flexibility for complex cloud-based applications
  • Requires additional setup for backend services

Code Comparison

Decap CMS configuration (config.yml):

backend:
  name: git-gateway
  branch: main
collections:
  - name: "blog"
    label: "Blog"
    folder: "content/blog"
    create: true
    fields:
      - {label: "Title", name: "title", widget: "string"}
      - {label: "Body", name: "body", widget: "markdown"}

Cloudbase Framework configuration (cloudbaserc.json):

{
  "envId": "your-env-id",
  "framework": {
    "name": "vue",
    "plugins": {
      "client": {
        "use": "@cloudbase/framework-plugin-website"
      },
      "server": {
        "use": "@cloudbase/framework-plugin-function"
      }
    }
  }
}

Both repositories serve different purposes. Decap CMS is ideal for managing content in static sites, while Cloudbase Framework offers a more comprehensive solution for building and deploying full-stack applications on Tencent Cloud. The choice between them depends on the specific needs of your project.

13,537

Develop. Preview. Ship.

Pros of Vercel

  • More extensive documentation and community support
  • Broader language and framework support
  • Seamless integration with popular frontend frameworks

Cons of Vercel

  • Less focus on serverless and cloud-native architectures
  • Limited customization options for complex deployments
  • Potentially higher costs for large-scale projects

Code Comparison

Vercel deployment configuration:

{
  "version": 2,
  "builds": [{ "src": "*.js", "use": "@vercel/node" }],
  "routes": [{ "src": "/(.*)", "dest": "/" }]
}

Cloudbase Framework deployment configuration:

name: my-cloudbase-app
framework:
  name: node
  plugins:
    - name: function
      use: '@cloudbase/framework-plugin-function'
      inputs:
        functionRootPath: ./functions

Both frameworks aim to simplify deployment processes, but Vercel focuses more on frontend-centric applications, while Cloudbase Framework emphasizes serverless and cloud-native architectures. Vercel offers a more streamlined experience for deploying web applications, particularly those built with popular frontend frameworks. On the other hand, Cloudbase Framework provides greater flexibility for complex, serverless deployments and integration with Tencent Cloud services.

The Firebase Command Line Tools

Pros of firebase-tools

  • More mature and widely adopted ecosystem with extensive documentation
  • Broader range of features, including real-time database and authentication
  • Strong integration with other Google Cloud services

Cons of firebase-tools

  • Potential vendor lock-in to Google's ecosystem
  • Higher costs for large-scale applications compared to some alternatives
  • Limited customization options for certain features

Code Comparison

firebase-tools:

firebase init
firebase deploy

cloudbase-framework:

cloudbase init
cloudbase framework deploy

Both tools offer similar command-line interfaces for initializing and deploying projects. However, firebase-tools generally provides more comprehensive options and configurations due to its broader feature set.

firebase-tools is better suited for developers already working within the Google ecosystem or those requiring a wide range of integrated services. cloudbase-framework may be preferable for those seeking a more flexible, customizable solution or those primarily targeting the Chinese market.

The choice between these tools depends on specific project requirements, target audience, and desired level of integration with other cloud services.

A declarative JavaScript library for application development using cloud services.

Pros of amplify-js

  • More comprehensive ecosystem with broader AWS service integration
  • Extensive documentation and community support
  • Cross-platform support for web, mobile, and desktop applications

Cons of amplify-js

  • Steeper learning curve due to its extensive feature set
  • Tighter coupling with AWS services, potentially limiting flexibility
  • Larger bundle size compared to cloudbase-framework

Code Comparison

amplify-js:

import Amplify, { Auth } from 'aws-amplify';
Amplify.configure(awsConfig);

async function signIn(username, password) {
  try {
    const user = await Auth.signIn(username, password);
    console.log('Sign-in successful:', user);
  } catch (error) {
    console.error('Error signing in:', error);
  }
}

cloudbase-framework:

import cloudbase from '@cloudbase/js-sdk';

const app = cloudbase.init({
  env: 'your-env-id'
});

async function login() {
  try {
    const auth = app.auth();
    await auth.anonymousAuthProvider().signIn();
    console.log('Anonymous sign-in successful');
  } catch (error) {
    console.error('Error signing in:', error);
  }
}

Both frameworks provide authentication functionality, but amplify-js offers more robust options with username/password sign-in, while cloudbase-framework focuses on simpler authentication methods like anonymous sign-in. amplify-js requires more configuration upfront, whereas cloudbase-framework has a more straightforward initialization process.

81,662

The open source Firebase alternative. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Pros of Supabase

  • Open-source alternative to Firebase with a strong focus on PostgreSQL
  • Offers real-time subscriptions and built-in authentication
  • Extensive documentation and active community support

Cons of Supabase

  • Limited to PostgreSQL, while Cloudbase Framework supports multiple databases
  • Requires more setup and configuration compared to Cloudbase's streamlined approach
  • Less integrated with cloud services compared to Cloudbase's Tencent Cloud integration

Code Comparison

Supabase (JavaScript):

import { createClient } from '@supabase/supabase-js'

const supabase = createClient('YOUR_SUPABASE_URL', 'YOUR_SUPABASE_KEY')
const { data, error } = await supabase.from('users').select()

Cloudbase Framework (JavaScript):

const tcb = require('@cloudbase/node-sdk')

const app = tcb.init({ env: 'YOUR_ENV_ID' })
const db = app.database()
const { data } = await db.collection('users').get()

Both frameworks provide easy-to-use SDKs for database operations, but Supabase focuses on PostgreSQL-specific features, while Cloudbase Framework offers a more generic approach compatible with various database types. Supabase's syntax is more SQL-like, whereas Cloudbase Framework uses a NoSQL-style query language.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Github License Npm version lerna download issue PRs Welcome star star

云开发 CloudBase Framework

🚀 CloudBase Framework 是云开发官方出品的前后端一体化部署工具 🔥

无需改动代码,前后端一键托管部署,基于Serverless架构,加速访问,弹性免运维。

更多特性和优势

Table of Contents

快速开始

  1. 安装 CLI
npm install -g @cloudbase/cli@latest
  1. 初始化一个应用
cloudbase init
  1. 部署应用
cloudbase framework deploy
一键部署一个 Vue CLI 创建的 项目

项目示例

下面的快速开始部分可以帮助您更快地体验 CloudBase Framework 的能力,以便尽快开始将自己的项目部署起来。

查看项目示例

每一个例子都提供了一个 **部署按钮**,可以点击之后在云端一键部署,将应用安装在您的腾讯云开发环境中。同时我们也提供了对应的源代码,可以查看源代码,Clone 或者下载项目到本地进行修改,在本地通过 CloudBase CLI 进行一键部署。


Daruk 应用

Daruk 是一款基于 Koa2,使用 Typescript 开发的轻量级 web 框架 ,使用云函数云资源


ThinkJS 应用

ThinkJS 是一款可以使用ES6/7 特性开发项目的Node.js 框架,支持TypeScript。 ,使用云函数云资源


Jenkins

Jenkins 是一个独立的开源软件项目,是基于 Java 开发的一种持续集成工具,用于监控持续重复的工作,旨在提供一个开放易用的软件平台,使软件的持续集成变成可能。 ,使用云托管,CFS云资源


Go 云函数

快速搭建一个基于 GO 语言的简单、可靠、高效的应用 ,使用云函数云资源


Java 云函数示例

快速构建开放、极简 Java 应用框架 ,使用云函数云资源


PHP 云函数示例

快速构建灵活、高效的 PHP 应用框架 ,使用云函数云资源


Omi 应用

快速构建一个跨框架的 Omi 应用 ,使用云函数, 静态托管云资源


Aqueduct (Dart Server) 云托管

快速构建一个包含多线程 HTTP 服务器框架的 Aqueduct 云托管实例 ,使用云数据库, 云托管云资源


Nextcloud

Nextcloud 是一套个人云存储解决方案,内置了图片相册、日历联系人、文件管理、RSS 阅读等丰富的应用。 ,使用云托管,CynosDB,CFS云资源


VuePress 网站应用

快速构建基于 VuePress 的网站应用 ,使用静态托管云资源


Nest 应用

快速构建一种渐进式的 Node.js 框架,用于构建高效、可靠、可扩展的服务器端应用 ,使用云函数云资源


Egg 应用

快速构建基于 Node.js 和 Koa 的 Egg 企业框架及应用 ,使用云函数云资源


Next SSR 应用

快速构建一个简单、智能、静态和服务器混合渲染的应用框架 ,使用云函数, 静态托管云资源


Bitwarden

Bitwarden 是一款自由且开源的密码管理服务,用户可在加密的保管库中存储敏感信息(例如网站登录凭据)。Bitwarden 平台提供有多种客户端应用程序,包括网页用户界面、桌面应用,浏览器扩展、移动应用以及命令行界面。 ,使用云托管,CFS云资源

点击进入应用中心查看更多应用

插件

云开发 CloudBase Framework 支持插件机制,提供了多种应用框架和云资源的插件,只需要很少的配置甚至 0 配置就可以现有应用和云开发 CloudBase Framework 框架进行集成。

查看插件说明

插件可以处理应用中的一些独立单元的构建、部署、开发、调试等流程。例如 website 插件可以处理静态网站等单元,node 插件可以处理 koa 、express 等 node 应用。插件可以组合使用。

插件的配置写在 cloudbaserc 文件中,目前仅支持 JSON 文件,后续会支持 YAML。

请参考完整的插件文档

插件的配置可以手动填写,也可以自动生成,目前针对前端框架支持自动识别填写插件。

自动检测生成插件配置流程

可以在项目目录下直接运行 cloudbase 命令进行自动检测生成插件配置文件并部署

cloudbase


✔ 是否使用云开发部署当前项目 <Projects/test/test-vue> ? (Y/n) · true
✔ 选择关联环境 · webpage - [webpage:按量计费]
   ______ __                   __ ____
  / ____// /____   __  __ ____/ // __ ) ____ _ _____ ___
 / /    / // __ \ / / / // __  // __  |/ __ `// ___// _ \
/ /___ / // /_/ // /_/ // /_/ // /_/ // /_/ /(__  )/  __/
\_________\____/ \__,_/ \__,_//_____/ \__,_//____/ \___/       __
   / ____/_____ ____ _ ____ ___   ___  _      __ ____   _____ / /__
  / /_   / ___// __ `// __ `__ \ / _ \| | /| / // __ \ / ___// //_/
 / __/  / /   / /_/ // / / / / //  __/| |/ |/ // /_/ // /   / ,<
/_/    /_/    \__,_//_/ /_/ /_/ \___/ |__/|__/ \____//_/   /_/|_|


 CloudBase Framework  info     Version v1.2.10
 CloudBase Framework  info     Github: https://github.com/Tencent/cloudbase-framework

 CloudBase Framework  info     EnvId webpage
? 检测到当前项目包含 Vue.js 项目

  🔨 构建脚本 `npm run build`
  📦 本地静态文件目录 `dist`

  是否需要修改默认配置 No
? 请输入应用唯一标识(支持大小写字母数字及连字符, 同一账号下不能相同) test-vue
? 是否需要保存当前项目配置,保存配置之后下次不会再次询问 Yes
 CloudBase Framework  info     📦 install plugins

目前支持的插件列表

插件链接插件最新版本插件介绍
@cloudbase/framework-plugin-websiteNpm version一键部署网站应用
@cloudbase/framework-plugin-nodeNpm version一键部署 Node 应用(支持底层部署为函数或者 云托管)
@cloudbase/framework-plugin-nuxtNpm version一键部署 Nuxt SSR 应用
@cloudbase/framework-plugin-functionNpm version一键部署函数资源
@cloudbase/framework-plugin-containerNpm version一键部署云托管容器服务
@cloudbase/framework-plugin-dartNpm version一键部署 Dart 应用
@cloudbase/framework-plugin-databaseNpm version一键声明式部署云开发 NoSQL 云数据库
@cloudbase/framework-plugin-denoNpm version一键部署 Deno 应用
@cloudbase/framework-plugin-nextNpm version一键部署 Next SSR 应用
@cloudbase/framework-plugin-mpNpm version一键部署微信小程序应用
@cloudbase/framework-plugin-authNpm version一键设置登录配置

配置示例

例如一个 Vue 的全栈项目,包含网站前端和云函数

查看 Vue 全栈项目的配置示例

可以在在项目下手动创建一个 cloudbaserc.json,填写如下配置文件,调用 cloudbase framework deploy 进行部署

或者直接运行 cloudbase 来进行自动检测并部署

{
  "envId": "{{env}}",
  "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
              }
            }
          ]
        }
      }
    }
  }
}

更多配置详细参数说明,可以查看配置说明文档,点击查看配置文档

Changelog

CloudBase Framework 的版本变更日志请参阅 changelog 文件

License

开源协议文档请参阅 Apache License 2.0

优秀应用案例


企业微信

🌐

腾讯直播

🌐

腾讯云微搭低代码平台

🌐

腾讯云开源应用中心

🌐

心悦俱乐部

🌐

健康码

🌐

CloudBase CMS

🌐

Hi头像

🌐

CloudBase TodoList

🌐

ShowMess实时弹幕

🌐

校拍

🌐

Pagic

🌐

衣科官网

🌐

Twikoo 评论

🌐

实时地震

🌐

可道云网盘

🌐

NiceUp

🌐

道德文章

🌐

OneDrive 图床

🌐

Waline 评论系统

🌐

编程主页

🌐

全球空气质量监测可视化

🌐

cloudbase-access

🌐

腾讯教育官网

🌐

巨应壁纸

🌐

Halo

🌐

兰空图床

🌐

持续征集优秀应用案例

在线交流群

如果在使用、安装过程中有任何问题,或者建议,欢迎加群讨论、反馈问题

CloudBase Framework 资讯

技术文章

✍️ 欢迎提交技术文章

演讲

新闻

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

📢 🐛 📝

mirageql

💻 📝 💡

Tab Liang

💻

juukee

🐛

Albert Liu

💻

SearchFan

🐛

Zira

💡 📝

代码抄写狮

🐛

lichaochao

💡

MrZhaoCn

💻 💡

xcatliu

💡

唐羲

🐛

Life

🐛

Austin Lee

💻 💡

iMaeGoo

💡

Doggy

💡

nasa.wang

💡

pandagis

💡

beet

💡 💻 📝

程序员鱼皮

💡

LanHao

💡

manfwh

💻

H

💡

二鸟

💡

Ryan Wang

💡

UCToo

📝

心谭

💻

LRCong

💻

Rin Hoshizora

📖

justyouhappy

💻

yuwuwu

📝

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

贡献指南

欢迎大家参与到 CloudBase Framework 的开发工作,贡献一份力量

您可以选择如下的贡献方式:

我们会将您加入 我们的贡献者名单

贡献方式请参考 贡献指南 文档

NPM DownloadsLast 30 Days