jhvst / vertigo

Blog engine in Go (golang)
https://toldjuuso.github.io/vertigo
MIT License
264 stars 24 forks source link

WIP #1

Open jhvst opened 10 years ago

jhvst commented 10 years ago

:construction: WIP :construction:

:white_check_mark: Done:

:construction: Backlog:

:no_entry_sign: Won't be implemented:

jhvst commented 10 years ago

Let's leave WYSIWYQ out of the main package. Quill seemed to inject iframes and other black magic on to the page, which really kills the whole simplicity thing.

Homepage and complete CRUD options are now available on posts.

jhvst commented 10 years ago

Added search.

Now that I'm only menus short of some sort of milestone, I have decided to look into adding native analytics middleware to this program.

jhvst commented 10 years ago

Very simple analytics have now been added as well as documentation on all functions.

jhvst commented 10 years ago

Added RSS and Atom support even though it was not in roadmap...

Adding email sending and lost password etc to roadmap.

jhvst commented 10 years ago

Also, DB could be migrated from RethinkDB to something embedded. Getting started with the current build is kind of a horrible experience.

jhvst commented 10 years ago

It has surely been a long time since last feature commit, but yes, something as pointless as password recovery is now in place. Though I bit cut corners by implementing email sending with Mailgun, but that shall be just fine for the sake of my mental sanity. At the same time the project kind of got the basis of mail sending in place, but for the moment no other helper functions than SendRecoveryMail exist. I do not see the real point of making some welcome emails etc, but that's for further consideration.

Anyhow, since feeds.go and now the mail sending require quite a few pre-defined parameters it would probably be best idea to add some kind of site-wide settings panel or installation wizard or JSON configuration file or something along those lines.

I'll be also starting to separate the RethinkDB from the source code to make it easier to implement new database modules. I've been playing some with embedded Go databases, but for now there's not a lot to comment on that.

Also, first fork was done today by @drejohnson! Cheers!

jhvst commented 10 years ago

"Site-wide settings" were installed yesterday (@f083a8294ef7fbc404bfa8d7ad319f2e9cb5fd44). Now there is an installation wizard when the system notices a fresh installation. That also skips the need of declaring the Mailgun API keys manually in the users.go file.

The global settings can be accessed throughout the application by using the Settings keyword.

jhvst commented 9 years ago

I've recently started out making tests (a0a758a4cdf1ddd370676e3381b4c36c8d3f7798). For a start, they will be mainly covering the JSON routes, as those usually expose more data and therefore are better to be tested more throughout.

The testing library used is ginkgo, as it seems to provide a lot of useful features for web server testing. CI platform is currently wercker.

jhvst commented 9 years ago

I'm now starting a new branch where the database will be switched to SQL. The database methods will use the gorm package, which will make it easy to switch between SQLite, MySQL and PostgreSQL depending on your needs.

jhvst commented 9 years ago

Database driver used now is gorm. The old repo with the rethinkdb driver can be found in its own branch at least temporarily as I test trough everything with the new driver.

jhvst commented 9 years ago

I'm removing Embed .tmpl and other static files into the binary from the roadmap as the gobuild.io is able to include those with the binaries. That being said, the project is now downloadable as binaries in http://gobuild.io/github.com/9uuso/vertigo (hooray!). And as cute as using an embedded database in Go sounded, it would be way too much work to get it right.

The current roadmap now only includes adding tests, but dealing with some features like password reminder is bit more complicated, but surely something that should be covered as well. I'm having bit controversial thoughts on using Mailgun, as even though I'd like Vertigo to be as independent as possible, requiring the end-user to run their own mail server might just be a shot to the leg for everyone.

jhvst commented 9 years ago

As for test coverage see #13. I consider tests now as done.

jhvst commented 9 years ago

Databases clients, or more like DALs were imported as packages today. Due to constrains in language design in Go, this also required me to import some other parts of the application as packages, such as the misc, crypto and settings, as these packages need to be accessible from DALs and the main package. Since you can't do an import cycle in Go, eg. import functions from main package to DAL and vice versa, this was a necessary change.

The change is quite significant since it changes a lot of the codebase, but it will also make the application a lot more portable. One reason I started the migration was because the ORM library currently used, gorm, had some rather annoying bugs (can't change a single field in a row, a string field can't be modified to empty...) and the second is moving away from martini to some more idiomatic web "framework". Currently I've looked at negroni and gin.

I hope the current design open more possibilities to contributors or anyone who might want to use Vertigo as a starting point for their own web application.

I'll also start documenting how to extend the application, since DALs currently require you to include some necessary methods for both users and posts. I'll start it by bringing the old RethinkDB driver back to life, which should give contributors an example how the DALs might differentiate from each other. Also since @dancannon's has done such a great job with the RethinkDB driver, I believe I will end up with better code than with gorm, which should leave less question marks for anyone reading the source.

Implementing a new driver will also open up questions, such as should the structure ID's on posts and uses be switched from int64 to GUID string. This is a tough choice, since changing it will break all current Vertigo installations, but I'm unsure whether NoSQL databases such as RethinkDB can be adjusted to work with incrementing primary key. Only time will tell.

jhvst commented 9 years ago

I decided to not add tagging of posts. I think the search will be enough.

Also afaik people file most posts under uncategorized tag anyway.

jhvst commented 8 years ago

Martini removed in 210ba2035026588476198c4e084586016733cfb8.

Also on the same commit:

Next steps would be to look into making Google App Engine compatibility a reality, maybe in a different branch if master cannot be updated to work with it.

After Go authors decide on the introduction of net.Context to the standard library, start to migrate Settings and Render package into context based rather than global variable.

bubblehub commented 8 years ago

p.s. I love vertigo!

jhvst commented 8 years ago

Hi, thank you for the kind words!

I think I won't be implementing HTTPS support, since using a proxy server like CloudFlare or Caddy gives you HTTPS support a lot easier than I could ever do it.

I've been thinking of category support lately as well, since my own posts are starting to become bit scrambled on different topics. Category could just be a string array on Post struct, which could then be used on search in addition to frontend.

If you have a better idea or other improvement ideas, let me know!

bubblehub commented 8 years ago

p.s. sorry for my bad English. I'm from Russia. And I see in your future "vertigo" development.

bubblehub commented 8 years ago

You do category, and I will make a beautiful fron-end. And sent to you, if you like.

jhvst commented 8 years ago

ideally "No category parents" and don't "uncategorized"

Good point. I make sure to remember that when I write categories.

https implementation via nginx (proxy) => write manual

I think I could write a manual for Caddy, since I like to help other Go projects get publicity (even small publicity is good publicity). Caddy should also be simpler to use than nginx.

You do category, and I will make a beautiful fron-end. And sent to you, if you like.

Thanks, but no thanks. The front-end is ugly on purpose. This is because I want it to be easy to make your own beautiful front-end. You see, if the frontend would be beautiful, it would require more code, which would take more time from the developer to make it beautiful.

Also because Vertigo is mainly for coders only (you can only get it from Github) then I can assume that every user can make it as beautiful as they like. That's why I think its a bad idea to make it beautiful from the start. However, I do respect that you would like to help, but for now, Vertigo is ugly on purpose. :)

Last thing, I do have some other projects going on, so unfortunately I cannot say when I will write changes to vertigo again. It might take a long time, but I'll keep your ideas in mind!