Peppubuild is an open-source no-code builder, where you can visually create your websites, applications, and plug into a CMS of their choice. We appreciate your interest and efforts to contribute to Peppubuild. See the LICENSE for licensing information.
This repository contains all the folders necessary to setup Peppubuild, except the website (peppubuild.com), whic is hosted at Peppubuild Front. Here's a summary of the folders, what they hold, and where they're hosted.
-
Playground: This folder contains the frontend application for Peppubuild (https://app.peppubuild.com), hosted with Netlify. It makes calls to server.js, which is hosted in Cpanel's Node.js server.
-
Plugins: Since Peppubuild is built on Grapesjs, we have some plugins to enhance the default editor. From page management, bootstrap, and panel enhancement.
-
Server.js: This contains the functions for our server-side calls to Peppubuild. The utils folder is used by
server
.js.
This section contains a detailed overview of all the functions in the client, server, and plugin folders.
- startServer
- getContent
- Clientdeploy
- createSub
- listFiles
- Logout
- Login
- createFrontend
- updateDB
- deleteContent
- Retrieve_Project
- Delete_Project
- Save_Project
- Publish_Project
Peppubuild uses Firebase for authentication and Google Drive (appDataFolder) to store user information. Since we are only accessing (appDataFolder), we can't access the users files in drive, only information we have created. For more information, checkout https://developers.google.com/drive/api/guides/appdata.
All of our functions are wrapped around the startServer() function. At the end of the file, we call this function and listen to port 1404.
This function retrieves the gjs JSON content, which forms our website page, from Google's Drive (appDataFolder).
app.post('/clientdeploy/:pname', (req, res) => {}) Route serving deploy, to publish project. We use FTP server to upload files. We also call uploadFrom() with params readablestream and file name.
pname
string Project namepage
callback gjs page data.
Create Subdomain This function creates a subdomain for our user in our Namecheap shared hosting account.
name
string Subdomain name
This function lists all projects created with Peppubuild, from Google's Drive (appDataFolder).
accessToken
string Oauth Access Token
app.get('/logout', (_req, res) => {}) This route deletes the cookie pepputoken, which contains our Oauth.
pepputoken
string res.clearCookie
app.get('/logout', (_req, res) => {}) This route retrieves Oauth token after authentication with firebase. Next, it stores the cookie pepputoken, which contains our Oauth.
providerToken
string Oauth token
Create File to store application's data on Google Drive (appDataFolder).
Update the project file created on Google Drive (appDataFolder), with gjs JSON.
Function to delete file and the content of the project.
app.post('/pdelete/:id', (req, res) => {}) Route to delete project from Google Drive.
Id
string File Id
app.post('/project/:id', (req, res) => {}) Route to retrieve the data of a single project. Useful route for loading editor with pre-saved project.
Id
string File Id
app.post('/pdelete/:id', (req, res) => {}) Route to retrieve all of the projects from Drive.
token
string Oauth Token
app.put('/save/:id', (req, res) => {}) Route to save changes to corresponding file on Drive.
token
string Oauth Token
app.post('/publishfront/:name', (req, res) => {}) Route to publish file to Namescheap