I’m part of the Brewing Club here at WWU, which is funny, because I pretty much only drink water. My roommate started it the spring before last, though, and since then it’s become quite popular.
One of the things people ask us most is where they can find a scoby to brew kombucha. During each fermentation a baby which be given to someone else forms. The original mother is usually reused. Unfortunately, finding someone with a baby can be difficult, as they are usually tossed if not given away, and purchasing online is expensive and not guaranteed to work.
We’ve talked about setting up a website to exchange SCOBY’s and other brewing cultures for a while, and it’s finally ready to launch.
CouchDB is very interesting for someone who’s familiar with the relational database model. Here what I’m noticing.
- Keys and values are much different. A key corresponds to value, but both can be a full objects. This allows matching entities with objects, arrays, or standard values.
- You don’t write queries like you do in SQL. You explicitly tell the database how to return your data. If you’re setting up the view at the same time as your app, neither restricts what you do; you just have to make sure they’re on the same page.
Node is great to work with. It’s much simpler than something like apache, and
is well documented. NPM is probably the best part, primarily because it
installs locally to the project. If I’ve messed something up, I can just
rm -r node_modules && npm install.
For TeaHarmony, I’m using the following modules.
- express - Web app framework
Express makes mapping post and get requests to specific urls super easy. It also let me do some nifty things to redirect to and from the login page.
- Passport - Authentication
Passport has a bunch of built in hooks for authentication through websites like Google, Twitter, and Facebook, but I’m just using username/password authentication. I wrote some code to talk to CouchDB’s _user table through nano. It essentially pretends to be a form post to get a cookie.
- Jade - Templating
Jade was the default when I used express(1) to generate a skeleton app. So far I like it, as it’s basically minimal html with some programming fun thrown in.
- nano - CouchDB ⇄ Node.js
Nano lets my app talk to CouchDB. This is the glue holding the site together. The one thing I found confusing at first, was the concept of using ‘bulk’ to update and delete information.
- nodemailer - Emails
Nodemailer lets me send emails through node. Simple enough, but I’d like to be able to send from arbitrary email addresses.
- Underscore - JS Utilities
To make my life easier, I went with Bootstrap for the frontend.