Hamster is a simplistic backend as a service(BaaS).It provides a REST interface to datastores for CRUD operations plus some helper services.
A proper documentation will be released when the code is more stable. Code is well commented with feature complete test coverage.
"Writing test code is better than writing documentation" - Lazy and Procastinating Anonymous Guy.
Auto-Generated godoc: http://godoc.org/github.com/hamsterhq/hamster/core
Installation
$ go get github.com/hamsterhq/hamster
Getting started with docker-compose
$ docker-compose run api go test -v
$ docker-compose up
Without docker-compose
- Mongodb: default port.
- Redis: default port.
$ SERVER_PORT=8181 MONGODB_URL=mongodb://127.0.0.1:27017/hamster REDIS_URL=127.0.0.1:6379 go test -v
$ SERVER_PORT=8181 MONGODB_URL=mongodb://127.0.0.1:27017/hamster REDIS_URL=127.0.0.1:6379 go run main.go
Why Mongodb?
Hamster is primarily focussed on mobile apps which need quick and dirty datastores. Another reason was the awesome Go mongodb driver:
http://labix.org/mgo. Thank you Gustavo Niemeyer!. It helped me getting started very quickly.
That said, there is no reason why we can't have sql databases as an option. Open to implementing MySQL, PostgreSQL integration
in the future.
What is Redis for?
Caches, message(push notifications) and task(send emails, long running) queues.
Why reinvent the wheel?
As far as I know there are not many modern open source BAAS solutions out there. And though my opinion is highly subjective, I think
Go provides an oppurtunity to build something simple, stable, fast and scalable. In any case, it always good to have a free and open source
project at our hands.
Features Implemented:
- Developer Accounts.
- Mutlple Apps( with individual api-key and api-secret).
- CRUD schemaless objects for the apps.
- Save and Get Files( stored in GridFS).
Please go through hamster_test.go
. I will try to get to documentation soon.
Roadmap
- Better Authentication
- Android, iOS clients
- Push Notifications(ios, android, browser)
- API metering and throttling
- Email service(email verification, forgot password etc.)
- Javascript, Python, Ruby, Java, PHP clients.
- Dashboard
- Analytics.