Giter VIP home page Giter VIP logo

beubo's Introduction

Hi there ๐Ÿ‘‹

I'm Uberswe. I started as a backend PHP developer but work mostly with Go now. Lately I have worked in management positions as I find myself to be a natural leader and enjoy working with others to solve problems.

Here on GitHub I share a lot of my personal projects that I enjoy working on. I hope that publishing my code can connect me with like-minded collaborators but also help others learn from the projects I have created.

beubo's People

Contributors

uberswe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

beubo's Issues

Multiple Users and Roles

We need to be able to handle multiple users who can have various different roles. This will require a permission system.

  • Custom roles
  • Plugin defined permissions to consider in #4
  • Admin users
  • Single site users or users limited to a subset of sites
  • Guest or public users who comment on articles in #5 for example

A Wiki module

Something similar to MediaWiki would be really nice to have. Keep the features minimal to begin with. This ticket still needs to be filled out with requirements.

Fix js and css files for default theme

Currently I have decided to commit jquery and trumbowyg to make the WYSIWYG editor work. In the future we should host these on a CDN or make have download during the install process. I would prefer not having dependencies in the git repository.

Allow plugins to call each other

Currently a plugin will get called by Beubo but in the future it would be nice to allow a way for one plugin to call another plugin. I have not thought much about the implementation and I am open to suggestions.

Dynamic models/structs

I have had this idea for a long time so I thought it would be good to write it down. As I write this I am starting to get the functionality of components like fields down. Currently it directly correlates with frontend components in html templates but my future plan is to make these fields work for API endpoints as well even if it's not part of the core of Beubo. Once these fields are working well we can start making dynamic models and structs. I would like to make it easy for the user to work with data. A user should be allowed to make a form which adds data to the application, this data could then be stored in its own table with proper relations to the user or whatever model it should relate to. This allows a user to create things like product pages with categories without the need for any kind of plugin. These dynamic structs could then have their own API endpoints created with various API plugins.

Wordpress made it easy to make a basic website with dynamic pages and forms that send emails. What if Beubo could do the same but for databases and APIs?

Make menus dynamic

Currently there is no way to manage menus. It would be good if menus are stored in the database similar to how pages work.

A Blogging/Article Module

I want a simple module that can do the basics of what Wordpress does. I want to be able to create posts, edit them and delete them. There should be a focus on SEO and SEO by Yoast is a good example. This module should have the following features.

  • Create, edit and delete posts
  • Schedule posts, preview drafts
  • Visible word count
  • WYSIWYG editor that is not too heavy on JS or CSS
  • Revision history with ability to undo
  • Support for text and embedded content such as images
  • Support for editing raw HTML

When it comes to SEO focus on the following

  • SEO friendly URLs with ability to change the url manually
  • Meta tags for description/keywords
  • Social meta tags for facebook, twitter etc.
  • A simple check of word count, sentences that are too long, keyword analysis would be a nice plus.

This ticket can be divided up into sections. I am also open to partial pull requests. As always simplicity and minimalism should be the focus while still creating a good user experience.

Support Markdown for posts

Currently posts take html input via a frontend WYSIWYG editor. I would like to switch to markdown instead to get rid of the extra frontend clutter.

Jekyll importer

Similar to #28 this should import posts from Jekyll to Beubo. Probably better as it's own standalone application but could work as a module or plugin. Originally mentioned in #20.

Unit tests

Add unit tests and coverage check and setup automatic testing on push/merge to master. To begin with we could aim for 50% coverage.

Use hashicorp/go-plugin to allow plugins to connect via RPC/gRPC

Use https://github.com/hashicorp/go-plugin

After playing around with different plugin options I think the plugin package from hashicorp will offer the most flexibility for Beubo without many downsides. The biggest downside is performance so when implementing this, some consideration will need to be put towards the number of calls per plugin. We could consider still supporting the standard go plugin package if they can be kept general enough.

Benchmarks: https://github.com/uberswe/go-plugin-benchmark

Admin backend

There should be an admin backend where sites can be added or removed. A theme can also be selected for each site. For each site the following should be configured.

  • Site name
  • Domain

Wordpress importer

Ability to import Wordpress posts to Beubo. This should probably be a standalone application but could work as a module or plugin. From #20

Installation to setup backend

Currently the installation is working and redirects to a blank page which will be the admin dashboard but there are a few considerations to make it better.

  • What information do we really need during installation
  • Should installation configure a host for the admin area?
  • What is the best way to ask for an admin username and password? Should we use some other form of authentication?

Replace MySQL

MySQL is really slow for keeping state and uses a lot of resources. We should look for and implement an alternative if possible. Not only should it be good for small static sites but it should also work for larger installations such as ecommerce websites.

Advertising Module

This module should allow you to place ads across many sites. In this sense this module is more like a admin module rather than a site module which might need to be considered in #4. It would also be nice if one website could use this module to sell ads but this might be another feature better suited for an e-commerce module which could talk to the advertising module.

This module should show image and text ads. It would be nice to think of clever ways to integrate this with other modules. For example: This module could be configured to replace strings in the article module with affiliate links or links that earn based on CPM.

[sessions] ERROR! securecookie: the value is not valid

Sometimes this error will occur which is really annoying to try to track down. I want to open this bugfix so that I or anyone else who searches for this problem sees that it's most likely not an issue with Beubo. You will get this error if your browser has cookies generated by Beubo but you change the SESSION_KEY inside the .env file. The SESSION_KEY changes if you delete the .env and install Beubo or if you simply change the key. This will invalidate all existing cookies and this error will be shown but nothing is probably wrong with Beubo.

[beubo] 2021-01-16T02:43:48+01:00 | [sessions] ERROR! securecookie: the value is not valid

What is Beubo?

This issue is for brainstorming a description and a slogan for Beubo. Here are some initial thoughts.

Description - Beubo is a free, minimal CMS written in Go which allows users to create anything from a simple blog to a full e-commerce site with millions of users.

Slogan: ?

Configure Docker for local development

I would like to make a local docker configuration so it's easier to get going with Beubo locally. I currently run it from my terminal behind caddy to get the local SSL certificate. Here are the requirements for docker:

  • A Beubo instance configured with defaults and seeding. The following env variables should be set
ENVIRONMENT=local
SEED_DATABASE=true
  • A MySQL instance with a database which Beubo is configured to work with
  • Local SSL support, this could be done with Caddy but I am open to suggestions.

E-Commerce Module

#9 mentions e-commerce. This is a ticket to discuss and implement e-commerce support in Beubo along with a way to support payment gateway modules. The addition of sub modules such as payment gateways may need to be considered in #4.

A plugin/module repository plugin

This would serve as a central repository where plugins and modules could be uploaded and then shown inside Beubo and easily installed. Certain considerations have to be taken when deciding if anyone can upload to this repository or if the system should be more flexible where anyone can host a repository which has to be added to Beubo like add-apt-repository on ubuntu.

XSS vullnerabilities

Currently most forms in Beubo which has input which is later echoed back to the user is vulnerable to XSS. This needs to be fixed,

Plugin/Module Support

I want to have some kind of plugin/module system but I am not 100% sure what the best way to implement it is. The admin are could configure plugins for each site and then those plugins define how the admin area of the site should look. I know how Wordpress plugins work and I like the setup but I also know it's not scalable and the API is limited. I want something that meets the following criteria.

  • Easy to understand and simple to create modules/plugins
  • Can work behind a load balancer
  • Can work across multiple hosts, the plugin or module can be on a different hosts from Beubo
  • The API should be very open if possible so that we don't have to make new API methods as we implement new features

Theme support with components

I would like the ability to have themes in folders similar to how Wordpress structures themes. Theme files and components could also be added via plugins in the future.

Components are anything that might build a page. To me a component can be a form, table or a text field. A component such as a form may contain many other components.

Refactor complex functions

pkg/template/render.go
	Line 47: warning: cyclomatic complexity 21 of function (*BeuboTemplateRenderer).RenderHTMLPage() is high (> 15) (gocyclo)
database.go
	Line 101: warning: cyclomatic complexity 17 of function databaseSeed() is high (> 15) (gocyclo)

As reported in #45

Add page functionality

Part of #2 and also relates to #5. The initial implementation of pages and blog functionality will be part of Beubo until I get plugins/modules to work better.

  • Add/Edit/Remove pages for a site
  • Resolve pages based on URL slug
  • Page categories so that we can have pages that list other pages
  • Ability to select page templates
  • A basic WYSIWYG editor

IP whitelisting

Add the ability to whitelist IPs in the config for the admin area

Incorrect conversion between integer types

Found via CodeQL

Converting the result of strconv.Atoi, strconv.ParseInt, and strconv.ParseUint to integer types of smaller bit size can produce unexpected values.

Incorrect conversion of a 64-bit integer from strconv.ParseInt to a lower bit size type int without an upper bound check.

pageIDInt, err := strconv.ParseInt(pageID, 10, 64)

siteIDInt, err := strconv.ParseInt(siteID, 10, 64)

pageIDInt, err := strconv.ParseInt(pageID, 10, 64)

siteIDInt, err := strconv.ParseInt(siteID, 10, 64)

Localization

Currently Beubo has been developed without localization. How could this be implemented and should it be a core feature of Beubo or a plugin?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.