Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.

Overview

My friend, "Gotoro"

Ponzu

Current Release GoDoc CircleCI Build Status

Watch the video introduction

Ponzu is a powerful and efficient open-source HTTP server framework and CMS. It provides automatic, free, and secure HTTP/2 over TLS (certificates obtained via Let's Encrypt), a useful CMS and scaffolding to generate content editors, and a fast HTTP API on which to build modern applications.

Ponzu is released under the BSD-3-Clause license (see LICENSE). (c) Boss Sauce Creative, LLC

Why?

With the rise in popularity of web/mobile apps connected to JSON HTTP APIs, better tools to support the development of content servers and management systems are necessary. Ponzu fills the void where you want to reach for Wordpress to get a great CMS, or Rails for rapid development, but need a fast JSON response in a high-concurrency environment.

Because you want to turn this:

$ ponzu gen content song title:"string" artist:"string" rating:"int" opinion:"string":richtext spotify_url:"string"

Into this:

Generated content/song.go

What's inside

  • Automatic & Free SSL/TLS1
  • HTTP/2 and Server Push
  • Rapid development with CLI-controlled code generators
  • User-friendly, extensible CMS and administration dashboard
  • Simple deployment - single binary + assets, embedded DB (BoltDB)
  • Fast, helpful framework while maintaining control

1 TLS:

  • Development: self-signed certificates auto-generated
  • Production: auto-renewing certificates fetched from Let's Encrypt

Documentation

For more detailed documentation, check out the docs

Installation

$ go get -u github.com/ponzu-cms/ponzu/...

Requirements

Go 1.8+

Since HTTP/2 Server Push is used, Go 1.8+ is required. However, it is not required of clients connecting to a Ponzu server to make HTTP/2 requests.

Usage

$ ponzu command [flags] <params>

Commands

new

Creates a project directory of the name supplied as a parameter immediately following the 'new' option in the $GOPATH/src directory. Note: 'new' depends on the program 'git' and possibly a network connection. If there is no local repository to clone from at the local machine's $GOPATH, 'new' will attempt to clone the 'github.com/ponzu-cms/ponzu' package from over the network.

Example:

$ ponzu new github.com/nilslice/proj
> New ponzu project created at $GOPATH/src/github.com/nilslice/proj

Errors will be reported, but successful commands return nothing.


generate, gen, g

Generate boilerplate code for various Ponzu components, such as content.

Example:

            generator      struct fields and built-in types...
             |              |
             v              v    
$ ponzu gen content review title:"string" body:"string":richtext rating:"int"
                     ^                                   ^
                     |                                   |
                    struct type                         (optional) input view specifier

The command above will generate the file content/review.go with boilerplate methods, as well as struct definition, and corresponding field tags like:

type Review struct {
	Title  string   `json:"title"`
	Body   string   `json:"body"`
	Rating int      `json:"rating"`
}

The generate command will intelligently parse more sophisticated field names such as 'field_name' and convert it to 'FieldName' and vice versa, only where appropriate as per common Go idioms. Errors will be reported, but successful generate commands return nothing.

Input View Specifiers (optional)

The CLI can optionally parse a third parameter on the fields provided to generate the type of HTML view an editor field is presented within. If no third parameter is added, a plain text HTML input will be generated. In the example above, the argument shown as body:string:richtext would show the Richtext input instead of a plain text HTML input (as shown in the screenshot). The following input view specifiers are implemented:

CLI parameter Generates
checkbox editor.Checkbox()
custom generates a pre-styled empty div to fill with HTML
file editor.File()
hidden editor.Input() + uses type=hidden
input, text editor.Input()
richtext editor.Richtext()
select editor.Select()
textarea editor.Textarea()
tags editor.Tags()

build

From within your Ponzu project directory, running build will copy and move the necessary files from your workspace into the vendored directory, and will build/compile the project to then be run.

Optional flags:

  • --gocmd sets the binary used when executing go build within ponzu build step

Example:

$ ponzu build
(or)
$ ponzu build --gocmd=go1.8rc1 # useful for testing

Errors will be reported, but successful build commands return nothing.


run

Starts the HTTP server for the JSON API, Admin System, or both. The segments, separated by a comma, describe which services to start, either 'admin' (Admin System / CMS backend) or 'api' (JSON API), and, optionally, if the server should utilize TLS encryption - served over HTTPS, which is automatically managed using Let's Encrypt (https://letsencrypt.org)

Optional flags:

  • --port sets the port on which the server listens for HTTP requests [defaults to 8080]
  • --https-port sets the port on which the server listens for HTTPS requests [defaults to 443]
  • --https enables auto HTTPS management via Let's Encrypt (port is always 443)
  • --dev-https generates self-signed SSL certificates for development-only (port is 10443)

Example:

$ ponzu run
(or)
$ ponzu run --port=8080 --https admin,api
(or) 
$ ponzu run admin
(or)
$ ponzu run --port=8888 api
(or)
$ ponzu run --dev-https

Defaults to $ ponzu run --port=8080 admin,api (running Admin & API on port 8080, without TLS)

Note: Admin and API cannot run on separate processes unless you use a copy of the database, since the first process to open it receives a lock. If you intend to run the Admin and API on separate processes, you must call them with the 'ponzu' command independently.


upgrade

Will backup your own custom project code (like content, add-ons, uploads, etc) so we can safely re-clone Ponzu from the latest version you have or from the network if necessary. Before running $ ponzu upgrade, you should update the ponzu package by running $ go get -u github.com/ponzu-cms/ponzu/...

Example:

$ ponzu upgrade

add, a

Downloads an add-on to GOPATH/src and copies it to the Ponzu project's ./addons directory. Must be called from within a Ponzu project directory.

Example:

$ ponzu add github.com/bosssauce/fbscheduler

Errors will be reported, but successful add commands return nothing.


version, v

Prints the version of Ponzu your project is using. Must be called from within a Ponzu project directory. By passing the --cli flag, the version command will print the version of the Ponzu CLI you have installed.

Example:

$ ponzu version
> Ponzu v0.8.2
(or)
$ ponzu version --cli
> Ponzu v0.9.2

Contributing

  1. Checkout branch ponzu-dev
  2. Make code changes
  3. Test changes to ponzu-dev branch
    • make a commit to ponzu-dev
    • to manually test, you will need to use a new copy (ponzu new path/to/code), but pass the --dev flag so that ponzu generates a new copy from the ponzu-dev branch, not master by default (i.e. $ponzu new --dev /path/to/code)
    • build and run with $ ponzu build and $ ponzu run
  4. To add back to master:
    • first push to origin ponzu-dev
    • create a pull request
    • will then be merged into master

A typical contribution workflow might look like:

# clone the repository and checkout ponzu-dev
$ git clone https://github.com/ponzu-cms/ponzu path/to/local/ponzu # (or your fork)
$ git checkout ponzu-dev

# install ponzu with go get or from your own local path
$ go get github.com/ponzu-cms/ponzu/...
# or
$ cd /path/to/local/ponzu 
$ go install ./...

# edit files, add features, etc
$ git add -A
$ git commit -m 'edited files, added features, etc'

# now you need to test the feature.. make a new ponzu project, but pass --dev flag
$ ponzu new --dev /path/to/new/project # will create $GOPATH/src/path/to/new/project

# build & run ponzu from the new project directory
$ cd /path/to/new/project
$ ponzu build && ponzu run

# push to your origin:ponzu-dev branch and create a PR at ponzu-cms/ponzu
$ git push origin ponzu-dev
# ... go to https://github.com/ponzu-cms/ponzu and create a PR

Note: if you intend to work on your own fork and contribute from it, you will need to also pass --fork=path/to/your/fork (using OS-standard filepath structure), where path/to/your/fork must be within $GOPATH/src, and you are working from a branch called ponzu-dev.

For example:

# ($GOPATH/src is implied in the fork path, do not add it yourself)
$ ponzu new --dev --fork=github.com/nilslice/ponzu /path/to/new/project

Credits

Logo

The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com) The design is licensed under the Creative Commons 3.0 Attribution license. Read this article for more details: http://blog.golang.org/gopher

The Go gopher vector illustration by Hugo Arganda @argandas (http://about.me/argandas)

"Gotoro", the sushi chef, is a modification of Hugo Arganda's illustration by Steve Manuel (https://github.com/nilslice).

Issues
  • on windows

    on windows

    Got generate to complete on windows. Had to do stuff like the following:

    func setFieldView(field *generateField, viewType string) error { var err error var tmpl *template.Template buf := &bytes.Buffer{}

    //pwd, err := os.Getwd()
    pwd, err := osext.ExecutableFolder() // import "github.com/kardianos/osext"
    if err != nil {
    	panic(err)
    }
    //tmplDir := filepath.Join(pwd, "cmd", "ponzu", "templates")
    tmplDir := filepath.Join(pwd, "templates")
    

    Haven't tried this on linux. On to build. Similar issues in there I think.

    opened by jksmithiii 20
  • Please Support TiDB

    Please Support TiDB

    Being able to use TiDB (also developed in go) would allow us to have a lot more flexibility specifically with complex queries. I really like the simplicity behind ponzu but I strongly believe a different db engine will be required sooner or later once the CMS gains adoption.

    I would not consider a database engine other than [TiBD] its performance is amazing and would still allow to produce a single binary when deploying a ponzu app.

    opened by sebastianmacias 20
  • unresolved reference select

    unresolved reference select

    I have referenced table from 2 table "author" and "category" . But neither they are listed on post table. Plus on editor it gives error: "unresolved reference select"

    opened by rebootcode 17
  • Filterable Interface?

    Filterable Interface?

    Again, just thinking out loud. I know we discussed queries/reports early on and I'll quite happily do this in the client app, but it keeps striking me that a filterable interface could be useful.

    A single method item.filter(data) (data) {}

    This would allow some basic data manipulation of item type resultset, by ranging through it and making comparisons.

    One example, removing items with a timestamp in the future - unpublished as yet if you like. This could be simply achieved if this behaviour was preferred.

    Taking it further, if multiple filters could be specified and the API could also accept filter in the querystring to select which filter to use, items could have their own stored procedures in effect.

    This cuts down on the handballing of data client side and is maintainable and extendable.

    I don't think I could put this together, but wanted to log it. Hope that's ok.

    in progress 
    opened by olliephillips 16
  • Docu request: Kitchen sink demo

    Docu request: Kitchen sink demo

    It would be great to have a "kitchen sink" demo that shows all available widgets. It would consist of a long "ponzu gen" command plus some additional instructions to modify the generated files to get additional widget types, for example a Richtext editor widget.

    opened by fbaube 16
  • Help request: Dockerfile for ponzu

    Help request: Dockerfile for ponzu

    enhancement help wanted in progress 
    opened by nilslice 15
  • ponzu add <addon URI>

    ponzu add

    Reference issue #85. As discussed, this adds a ponzu add command to the CLI. It fetches the addon from its URI by wrapping go get then copies it to the projects local ./addons directory.

    There is no switch for automatically installing. Based on the issue discussion that feature needs more thought, so has been omitted.

    I've updated the README to include documentation on the command.

    It's been tested as per the approach in the README.

    opened by olliephillips 15
  • make slug editable

    make slug editable

    Started from my question on #308 about my needs to edit slug, I make some changes myself to achieve that. First time contributing here. Honestly I'm not that familiar about the design of this repo. I've tried to make changes as unobtrusive as possible, but let me know if the changes is not acceptable.

    Actually there are several concerns when I'm working on this:

    1. I'm not sure whether slug is should to be editable or not
    2. Currently on the editor slug data is sent twice, from a hidden field and a disabled text field. Not sure if it's intended or not, but I'm using both value to check if slug is being edited by user
    3. value.Get("field_name") only return the first value of the specified field, I use value["field_name"][1] to get the second value of a field. Not sure if it's deemed not neat

    Let me know what you guys think :)

    opened by junnotantra 14
  • Syntax highlighting

    Syntax highlighting

    Hi,

    Nice work on this CMS, it's very nice. There's just one obstacle I haven't been able to work around: the lack of ability to display snippets of code in a richtext field. I tried using highlight.js in my frontend, with the standard <pre><code>...</code></pre> syntax in my body field, but the editor strips it out.

    Beyond changing the field to a plain textarea for now, any other suggestions? Could this be considered for a potential feature?

    Thanks

    opened by Riari 14
  • Features suggestions

    Features suggestions

    Hi,

    Hope you are all well !

    I am testing ponzu cms those days and made myself a couple of remarks about what could be awesome to have embedded in it.

    It would be awesome to have:

    • Searchkit, for some advanced search features
    • vue-admin for more backend oriented widgets
    • admin-on-rest a rest admin boilerplate for content browsing, editing and filtering
    • An html ui composition interface, eg lib-compose

    What is the current road-map for ponzu ? What are your goals with this framework ?

    Cheers, Richard

    opened by roscopecoltran 14
  • analytics.batchInsert accept apiRequest channel by param instead of global variable requestChan; fix err != nil never run

    analytics.batchInsert accept apiRequest channel by param instead of global variable requestChan; fix err != nil never run

    analytics.batchInsert accept apiRequest channel by param instead of global variable requestChan; fix err != nil never run

    opened by iannil 0
  • Error with

    Error with "go get..."

    when i type:
    go get -u github.com/ponzu-cms/ponzu/...

    Return:

    cannot find package "github.com/blevesearch/zap/v11" in any of:
            c:\go\src\github.com\blevesearch\zap\v11 (from $GOROOT)
            C:\Users\eloyf\go\src\github.com\blevesearch\zap\v11 (from $GOPATH)
    cannot find package "github.com/blevesearch/zap/v12" in any of:
            c:\go\src\github.com\blevesearch\zap\v12 (from $GOROOT)
            C:\Users\eloyf\go\src\github.com\blevesearch\zap\v12 (from $GOPATH)
    cannot find package "github.com/blevesearch/zap/v13" in any of:
            c:\go\src\github.com\blevesearch\zap\v13 (from $GOROOT)
            C:\Users\eloyf\go\src\github.com\blevesearch\zap\v13 (from $GOPATH)
    cannot find package "github.com/blevesearch/zap/v14" in any of:
            c:\go\src\github.com\blevesearch\zap\v14 (from $GOROOT)
            C:\Users\eloyf\go\src\github.com\blevesearch\zap\v14 (from $GOPATH)
    PS E:\AAAPLICACIONES\PONZU\ponzu>
    

    I dont understand why

    thx

    opened by EloFran 5
  • Only latest tag saving

    Only latest tag saving

    I'm writing a lot of tags with enter, but after save entry, only latest one shown. How can I fix that?

    opened by gokaybiz 0
  • There is three CSRF vulnerability that can add the administrator account, delete administrator account, edit configuration.

    There is three CSRF vulnerability that can add the administrator account, delete administrator account, edit configuration.

    After the administrator logged in, open the following three pages:

    1. add_admin.html

    Add a administrator.

    <html>
      <body>
        <form action="http://localhost:8888/admin/configure/users" method="POST" enctype="multipart/form-data">
          <input type="hidden" name="email" value="[email protected]" />
          <input type="hidden" name="password" value="321" />
          <input type="submit" value="Submit request" />
        </form>
      </body>
    </html>
    

    2. delete_admin.html

    Delete a administrator use username(email), and the param 'id' is not useful, you can delete any user you think username(email).

    <html>
      <body>
        <form action="http://10.157.41.81:8888/admin/configure/users/delete" method="POST" enctype="multipart/form-data">
          <input type="hidden" name="email" value="[email protected]" />
          <input type="hidden" name="id" value="80" />
          <input type="submit" value="Submit request" />
        </form>
      </body>
    </html>
    

    3. configure.html

    It can edit configure, example:

    1. Change HTTP Basic Auth User&Password to download a backup of your data via HTTP.
    2. Change administrator email and used with add_admin.html.
    3. Change Client Secret which is used to validate requests.
    <html>
      <body>
        <form action="http://10.157.41.81:8888/admin/configure/users/delete" method="POST" enctype="multipart/form-data">
          <input type="hidden" name="email" value="[email protected]" />
          <input type="hidden" name="id" value="80" />
          <input type="submit" value="Submit request" />
        </form>
      </body>
    </html>
    
    opened by piaolin 0
  • Redis Support for ponzu

    Redis Support for ponzu

    At least ponzu team should consider "Redis" alongn with boltDB key-value store. https://db-engines.com/en/system/BoltDB%3BRedis

    opened by amjadniazi48 0
  • how to  change to Summernote

    how to change to Summernote

    the video does not work ,could you help me upgrade materialNote to Summernote?

    opened by yhyf 0
  • The

    The "must" search operator in blevesearch can't be passed into ponzu

    E.g. a query "+fielda:xxx +fieldb:bbb" will be recognized as " fielda:xxx fieldb:bbb" in ponzu, and got wrong search result.

    opened by necokeine 1
  • ponzu 0.11.0 fails to build

    ponzu 0.11.0 fails to build

    Unable to build ponzu cli

    OS: Arch Linux 4.20 go version go1.14.3 linux/amd64

    go get -d -v ./... go build -o build ./...

    package github.com/blevesearch/zap/v11: cannot find package "github.com/blevesearch/zap/v11" in any of:
    	/usr/lib/go/src/github.com/blevesearch/zap/v11 (from $GOROOT)
    	/home/crow/go/src/github.com/blevesearch/zap/v11 (from $GOPATH)```
    opened by ragouel 2
  • Zap v11 was deleted

    Zap v11 was deleted

    go get -u github.com/ponzu-cms/ponzu/...

    Return error after blevesearch/zap/v11 was deleted from git. Dependencies need to be updated

    opened by coldestheart 13
  • CLI is not working

    CLI is not working

    ➜ ~ ponzu zsh: command not found: ponzu

    opened by hadooping 14
Releases(v0.11.0)
  • v0.11.0(Sep 30, 2019)

    This release includes new features.

    1. Snap support. Install Ponzu CMS as a snap. See #313 & #307. Thanks @igorljubuncic

    2. Editable slug. Ponzu users can now maintain the slug as part of their item maintenance. See #309. Thanks @junnotantra

    3. BeforeAPIResponse and AfterAPIResponse hooks added offering opportunities to modify API response. See #305

    Source code(tar.gz)
    Source code(zip)
  • v0.10.1(Mar 25, 2019)

  • v0.10.0(Jan 1, 2019)

    Happy New Year

    Thanks to everyone’s contributions over the past months! This release includes a number of fixes, documentation updates and more from folks including:

    @mavimo, @lucperkins, @torniker, @nanohard, @fedir, & @vkuznecovas

    Thanks to the @ponzu-cms/team for the continued support with issue management. Your help is very much appreciated.

    Cheers!

    Source code(tar.gz)
    Source code(zip)
  • 0.9.4(Jan 14, 2018)

    Ponzu's ACME implementation to integrate with Let's Encrypt needed to be updated (based on the acme/autocert package) to meet the required "http-01" challenge. For more background, read: https://community.letsencrypt.org/t/2018-01-11-update-regarding-acme-tls-sni-and-shared-hosting-infrastructure/50188

    Source code(tar.gz)
    Source code(zip)
  • 0.9.3(Aug 14, 2017)

    woah

    In celebration of the 3,000 stars (!) Ponzu has received to-date, we're releasing v0.9.3 ...we are far past due for a release. Lots has happened since releasing v0.9.2, including:

    1. @martint17r's fantastic refactoring of our CLI, now using the legendary cobra package by @spf13. This will make it much easier for others to contribute to the CLI, not to mention the organizational benefits it offers. Huge thank you to @martint17r for taking the lead on this.

    2. @torniker's fix for some really pesky bugs that would occur when using multiple selects or repeaters - this one saved me a huge headache on a real project, and I imagine tons of others. Additionally, @torniker fixed a number of bugs in the approve handlers when merging externally created content. Thank you @torniker for your work on these!

    3. @guycalledseven fixed the system and database initialization steps which had a conflict when Ponzu users implemented the search.Searchable interface on their content types and were using UI-enabled addons. This was really tricky and took a lot of work.. especially in undocumented territory - so thank you, @guycalledseven! More to come from us on the addon user and developer experience, so keep an eye out.

    4. @tom-f responded to my issue / feature request to add a crucial search index backup routine in the same vain as the system / analytics / uploads backups via HTTP. This included a nice abstraction of file system archival which is now available in the system/backup package. Big thank you to @tom-f for helping on this!

    5. A handy CSV export feature from the admin UI. Just implement the CSVFormattable interface and you get a nice export / download button for your admins to use. This is part of the new family of Format interfaces which can be extended to add various export formats.

    There were many more contributions (listed below) made by community members and all of them are truly appreciated - thank you all!

    This release includes contributions from: @torniker, @tom-f, @bradleyfalzon, @guycalledseven, @ivanov, @martint17r, @nilslice


    Everything new in v0.9.3:

    • [f43c8b9] include .gitignore in new projects, add hostname default to init, security enhancement, HTML unescape reference options
    • [a931ae0] add --bind option to run cmd on CLI to set address of listener
    • [3734011] update addon api to support non-domain bind addresses
    • [abd0e59] fixed approve handler losing data for string slices - thank you @torniker!
    • [efbc295] fix issues #59 and #167 regarding multiple repeaters and data inconsistency - thank you @torniker!
    • [0a1d7d9] add backup routine for search indexes - thanks @tom-f!
    • [30dea40] create filesystem backup/archive abstraction package - thanks @tom-f!
    • [f4c5d79] fix for db initialization and addon compatibility when using full-text search indexing - thanks to @guycalledseven!
    • [e3fb3ab] provide --docs & --docs-port flags to run local docs server
    • [1b15bb3] hydrate item with data in Hookable methods - thanks to @ivanov!
    • [fa6a490] refactor for unix consistency and to use @spf13/cobra package - thanks to @martint17r!
    • [f176e7d] add CSV export support with new CSVFormattable](https://docs.ponzu-cms.org/Interfaces/Format/#formatcsvformattable) interface
    • [70a0164] docs typo fixes - thanks to @bradleyfalzon!
    • [ed0922f] Included video walkthrough / introduction to Ponzu

    Breaking Changes:

    • item.Pushable & item.Omittable now have slightly different method sets. See the updated documentation here: https://docs.ponzu-cms.org/Interfaces/Item
    type Pushable interface {
        // the values contained in []string fields returned by Push must be URL paths
        Push(http.ResponseWriter, *http.Request) ([]string, error)
    }
    
    type Omittable interface {
        Omit(http.ResponseWriter, *http.Request) ([]string, error)
    }
    

    With these changes, you can now intercept the request/response from within your implementation and act accordingly. For example, you may want to omit a field only if the request contains certain data.

    Source code(tar.gz)
    Source code(zip)
  • 0.9.2(May 7, 2017)

    It's been a busy few weeks with lots of great stuff added and fixed. We've had some fantastic contributions from the community for features ranging from core enhancements to HTTP backup efficiency to Docker support.

    I'm excited to announce the official Ponzu documentation site: https://docs.ponzu-cms.org (Source)

    Thank you to everyone who helped by contributing code, comments, thoughts and participated in the discussions on the issue tracker.

    New in 0.9.2:

    • [#140] Generate content references from the CLI
    • [#138] More hooks added to item.Hookable:
      • Admin triggered by CMS actions: {Before|After}Admin{Create|Update|Delete}
      • Addon triggered by status change: {Before|After}Addon{Enable|Disable}
        • allows addons to do setup/teardown during runtime
    • [#137] File Metadata API
    • [#132] Context Cancellation for backup routines (by @eticzon)
    • [#131] Race condition fix in configCache map (thank you @golang race detector!)
    • [#126] Reserved names fix in CLI (bug reported by @gedw99)
    • [#123] Performance improvement to sort and storage (by @kkeuning)
    • [#116] Full-text search using Bleve for any content type (disabled by default, single-method to enable)
    • [#115] Dockerfile and example app (by @krismeister)
    • [#107] Add optional input view specifier in CLI for each field
    Source code(tar.gz)
    Source code(zip)
  • 0.9.1(Mar 20, 2017)

    This is a minor release to fix a bug in the CMS editor - which would ignore changes made to content if a field was not present in the POST request (such as unchecking a checkbox), but there was intent to overwrite the value in the database.

    In this release, we have separated the functionality of merging data (such as in the Update method in the Updatedable interface), into it's own exported function within the system/db package: UpdateContent(target string, data url.Values) (int, error). It is now solely responsible for merging fields into existing data in the database, whereas SetContent(target string, data url.Values) (int, error) will exclusively insert or replace data into the database.

    This way Ponzu developers have access to both of these individually to use as needed, rather than hiding them inside the HTTP handlers.

    To get the latest version:

    $ go get -u github.com/ponzu-cms/ponzu/...
    $ cd $PROJ
    $ ponzu upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 0.9.0(Mar 15, 2017)

    This is an important release! v0.9.0 is introducing some breaking changes. If you have been using the api.Externalable interface to accept content from external clients, you will need to update a couple methods and change some client code for API endpoints.

    1. Huge thanks to @kkeuning for his work on the api.Updateable interface, enabling outside clients to update content via the Content API. This allows Ponzu systems to handle POST requests to /api/content/update?type=<Type>&id=<id> and will merge in updated fields to the database.

    2. A new api.Deleteable interface is available, with a single method: Delete(http.ResponseWriter, *http.Request) error - this enables external clients to delete content from the database via the Content API endpoint: /api/content/delete?type=<Type>&id=<id>

      Note: along with both of the additions above come item.Hookable methods so Ponzu users can hook into the req/res lifecycle and do validation, logging, trigger notifications, modify data etc.

    3. BREAKING CHANGE: api.Externalable and its method Accept(http.ResponseWriter, *http.Request) error have been renamed to follow the convention set with Updateable and Deleteable, and are now api.Createable and Create(http.ResponseWriter, *http.Request) error

      This also means that the Content API endpoint for creating content from external clients is now /api/content/create?type=<Type> instead of /api/content/external?type=<Type>

    I apologize for any inconvenience this brings, and for making breaking changes, but the clarity and consistency this adds are nicer to work with. I believe it will set a precedence for naming patterns that will keep the codebase cleaner and easier to pick up down the line.

    From here, we have only a bit of clean-up, a Filterable interface (#86) proposed by @olliephillips which acts as a stored procedure of sorts, and optimizations to the db.SortContent function which is causing issues when large amounts of external content is created at once. Unless there are other suggestions that would change the overall Ponzu API, completion of these items and more testing should allow us to hit the v1.0.0 mark!

    To get the latest release:

    $ go get -u github.com/ponzu-cms/ponzu/...
    $ cd $PROJ
    $ ponzu upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 0.8.5(Mar 1, 2017)

    This release is made possible by several contributions from @Sirikon, @olliephillips, @rohanpai

    #78 adds better Windows support & fixes an issue with the CLI

    #87 includes a new CLI command $ponzu add <import path> to go get & copy addon packages into a Ponzu project

    Additionally, there was a bug in the internal omit func called during the contentsHandler of the content API. This is now fixed, and we advise everyone to upgrade your projects to v0.8.5 after updating your ponzu package.

    To get the latest release:

    $ go get -u github.com/ponzu-cms/ponzu/...
    $ cd $PROJ
    $ ponzu upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 0.8.4(Feb 13, 2017)

    With a new system/item package interface, item.Omittable, Ponzu content API responses can now be told to keep arbitrary struct fields from being exposed. The Omit method implements this interface by returning a []string containing the names of the JSON struct tags for the type whose fields you want omitted.

    type Omittable interface {
        Omit() []string
    }
    

    As usual, upgrade by:

    $ go get -u github.com/ponzu-cms/ponzu/...
    $ cd $PROJ && ponzu upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 0.8.3(Feb 6, 2017)

    v0.8.3 introduces support for custom user-definable indexes through a simple API in the system/db package.

    func Index(namespace, key string) ([]byte, error) {}  // getter
    func SetIndex(namespace, key string, value interface{}) error {} // setter
    func DeleteIndex(namespace, key string) error {} // delete key in index
    func DropIndex(namespace string) error {} // remove index and all key/values
    

    To get the latest version:

    $ go1.8rc3 get -u github.com/ponzu-cms/ponzu/...
    $ cd $PROJ && ponzu upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 0.8.2(Jan 30, 2017)

    #55 (feature) - types that implement api.Externalable now return responses if data was sent and saved successfully. This will help apps/clients to use data to build UI or confirm to users that requests were successful or redirect a user to their content.

    Example response to a POST /api/content/external?type=Review which also implements api.Trustable

    {
      "data": [
        {
            "id": "6", // will be omitted if status is pending
            "type": "Review",
            "status": "public"
        }
      ]
    }
    
    Source code(tar.gz)
    Source code(zip)
  • 0.8.1(Jan 26, 2017)

    Ponzu developers now have more control over the request/response lifecycle inside the content types through many of the interface methods provided in packages such as api and item.

    #47 (feature) #45 (bugfix)

    Source code(tar.gz)
    Source code(zip)
  • 0.8.0(Jan 24, 2017)

    Happy to add some new features and minor fixes:

    #39 - now the repeater inputs will have consistent order based on how they are displayed in the CMS #42 - system.db, analytics.db and uploads can be backed up using http endpoint: /admin/backup and providing a query param source set to {system,analytics,uploads}. See the comment explaining usage: https://github.com/ponzu-cms/ponzu/pull/42#issue-202902075 (will be documented in the wiki)

    To get it, run:

    $ go1.8rc2 get -u github.com/ponzu-cms/ponzu/... # sub go1.8rc2 with your Go binary if you run 1.8
    $ cd $GOPATH/src/your/project && ponzu upgrade
    
    Source code(tar.gz)
    Source code(zip)
  • 0.7.2(Jan 19, 2017)

    The plan for Ponzu as we move closer to Go 1.8 release is to make minor updates (like this release -- all small fixes to the CLI) and patches, bumping the release tag up to 0.9.0 along with Go 1.8 release.

    Once we have the official release and more people have 1.8 installed, we'll work on locking down the APIs and finalizing the set of interfaces and how they work to tag a 1.0.0 by end of February 2017.

    Source code(tar.gz)
    Source code(zip)
  • 0.7.1(Jan 18, 2017)

    Finally ready to share this - based on my own production apps running for weeks, it's pretty much ready for use.

    Need some feedback on internals, how to test things, what I'm missing and generally what is good/bad!

    Source code(tar.gz)
    Source code(zip)
Owner
Ponzu
Organization for Ponzu: JSON API Server Framework & Headless CMS + Addons
Ponzu
Gin is a HTTP web framework written in Go (Golang).

Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

Gin-Gonic 49.8k Jul 23, 2021
An efficient, extensible and easy-to-use RPC framework.

eRPC eRPC is an efficient, extensible and easy-to-use RPC framework. Suitable for RPC, Microservice, Peer-to-Peer, IM, Game and other fields. 简体中文 Ins

henrylee2cn 2.2k Jul 18, 2021
A quick and easy way to setup a RESTful JSON API

Go-Json-Rest A quick and easy way to setup a RESTful JSON API Go-Json-Rest is a thin layer on top of net/http that helps building RESTful JSON APIs ea

Antoine Imbert 3.5k Jul 14, 2021
REST Layer, Go (golang) REST API framework

REST Layer REST APIs made easy. REST Layer is an API framework heavily inspired by the excellent Python Eve. It helps you create a comprehensive, cust

Olivier Poitrey 1.1k Jul 13, 2021
🍐 Elegant Golang REST API Framework

An Elegant Golang Web Framework Goyave is a progressive and accessible web application framework focused on REST APIs, aimed at making backend develop

Goyave 867 Jul 24, 2021
Yet Another REST Framework

YARF: Yet Another REST Framework YARF is a fast micro-framework designed to build REST APIs and web services in a fast and simple way. Designed after

null 62 Jun 30, 2021
:zap: Go web framework benchmark

go-web-framework-benchmark This benchmark suite aims to compare the performance of Go web frameworks. It is inspired by Go HTTP Router Benchmark but t

smallnest 1.5k Jul 22, 2021
⚡️ Express inspired web framework written in Go

Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development w

Fiber 14.3k Jul 24, 2021
henrylee2cn 1.6k Jul 17, 2021
gin auto binding,grpc, and annotated route,gin 注解路由, grpc,自动参数绑定工具

中文文档 Automatic parameter binding base on go-gin doc Golang gin automatic parameter binding Support for RPC automatic mapping Support object registrati

xxj 180 Jul 16, 2021
Gerasimos (Makis) Maropoulos 20.9k Jul 19, 2021
go-zero is a web and rpc framework written in Go. It's born to ensure the stability of the busy sites with resilient design. Builtin goctl greatly improves the development productivity.

go-zero English | 简体中文 0. what is go-zero go-zero is a web and rpc framework that with lots of engineering practices builtin. It’s born to ensure the

好未来技术 9.6k Jul 16, 2021
Flamingo Framework and Core Library. Flamingo is a go based framework for pluggable web projects. It is used to build scalable and maintainable (web)applications.

Flamingo Framework Flamingo is a web framework based on Go. It is designed to build pluggable and maintainable web projects. It is production ready, f

Flamingo 217 Jul 19, 2021
go-zero is a web and rpc framework that with lots of engineering practices builtin.

go-zero is a web and rpc framework that with lots of engineering practices builtin. It’s born to ensure the stability of the busy services with resilience design, and has been serving sites with tens of millions users for years.

null 104 Jul 14, 2021