Open Source Code for Real Time Wine

As I promised in the closing down email and the post mortem "lessons learned" article - here is the code for Real Time Wine.

A couple of things:

a) Thank you to Prezence Digital for compiling this. I know agencies haven't quite embraced the "open source" thing, so I think it was a big step for them and I hope they get some joy and cool community engagement out of it.

b) That said, there are a few modules used in Real Time Wine that remain proprietary to them and are not in this download. Mainly it's their handset adaption tech (phone recognition and rendering a mobi style site according to screen size) and image manipulation tool.

c) This download excludes images (that download would be about 4GB). I'm also not sure that it can just be executed as is (in fact, it probably can't)... There are a few notes (included at the bottom of this post) that Prezence provided. If you're a developer, you should understand what's going on.

d) Remember the apps weren't built natively. To remain lean, we built a sexy mobi interface and the wrapped that up in some native code which controlled GPS, camera and a few other functions.

e) The Blackberry 10 App was native though.

f) If you use any of this, just let us know. Keep us in the loop. Or not. But it'd be nice. If we did something wrong, no haters. If we did something cool, pats on back absolutely welcome.

g) Any questions, chat to me on Twitter.

Enjoy. Hope it helps. Without further ado...

(sorry, code repository was removed / not maintained)

If you need any context on Real Time Wine, suggest scrolling through all the posts on this blog. This link will get you there: early posts with context and launch info / more recent posts with the closure announcement and post mortem.

Or read some of the early PR: TechCentral article / Daily Maverick Article


Developer Notes on Real Time Wine

Android Configuration:
These are the project folders:
realtime_wine_android

These depend on the Facebook android library project which can be found in the "android_facebook" project.

To change environment variables, see com.real_time_wine.BaseActivity:
public String baseUrl = "http://www.realtimewine.com";
protected static final String URL_HOMEPAGE = "/wine/trending";
protected static final String URL_LOGOUT_IDENTIFIER = "/users/logout";

BB10 Configuration:
BB10 source can be found in the folder real_time_wine_bb10.

To change the environment variables see the CustomDatasource.cpp file. The project is reliant on an api that is produced by the mobi site. The api_url has to be set to wherever the mobi site is deployed.

IOS Configuration:
iOS source can be found in the folder realtimewine_ios.

To change the environment variables see the RTWViewController file.
The BaseURLString has to point to wherever the mobi site is deployed.

Web Configuration:
The web files (front-ends and api) can be found in the folder realtimewine_web.

/app/config/core.php
For the front-end, the following values will need to be modified:

Configure::write('blog_url', 'http://blog.example.com/');
Configure::write('advertising_url', 'http://blog.example.com/p/advertise.html');
Configure::write('info_email', 'info@example.com');
Configure::write('Bitly.User', '');
Configure::write('Bitly.Key', '');
Configure::write('Google.analytics_key', '');
Configure::write('webserviceUrl', 'http://api.example.com/api/');
Configure::write('imageUrl', 'http://api.example.com/files/');
Configure::write('frontendUrl', 'http://example.com/');
Configure::write('apiUrl', 'http://api.example.com/');
Configure::write('cdnUrl', 'http://example.com/');

Social Links and App download links should be configured in core.php
Configure::write('app.download.itunes', '');
Configure::write('app.download.google', '');
Configure::write('app.download.samsung', '');
Configure::write('app.download.vodacom', '');
Configure::write('app.download.amazon', '');

/app/config/device_sniffer.php
Sidekicker API details required for content adaptation - see prezence.co.za for contact details.

// The authentication username.
$config['DeviceSniffer']['username'] = '';
// The authentication password.
$config['DeviceSniffer']['password'] = '';
// The encryption key used when interacting with the api.
$config['DeviceSniffer']['key'] = '';

/app/config/database.php
Database details required.

public $live = array(
        'driver' => 'mysql',
        'persistent' => false,
        'host' => '',
        'login' => '',
        'password' => '',
        'database' => '',
        'prefix' => '',
        'encoding' => 'utf8',
    );

Regarding Proprietary Code:
Certain parts of the web souce have been encoded with popular encryption software, ionCube.
The software to run the encrypted source, can be obtained free of charge on the ionCube website http://www.ioncube.com/.

~fin~


Image credit: Roo Reynolds. https://www.flickr.com/photos/rooreynolds/8574509123

Comments

  1. Bold to open source it! Your transparency is really commendable.

    First file opened, and already a real gem of PHP in the products controller:

    $word_array = array(
    'boogers' => 'You said boogers ... WHAHAHAHAHA',
    'snot' => 'You said snot ... snot klap you need',
    'poop' => 'You said poop ... ahahahha',
    'shucks' => 'You said shucks ... OMG you are an idiot',
    'argh' => 'You said argh ... arghargharghargharghargharghargharghargharghargharghargh'
    );

    ReplyDelete
    Replies
    1. You should see the bigger list of "banned words" - they were quite fun. Lemme see if I can find them (I think this was some of the code to handle that, use a snobby word in a review and we spat out an error message)... Looking... Found it.

      Delete
    2. In the design, identify the word, then show the error message – either in brackets or behind a hyphen/fullstop or some other way.

      assimilated - Are you talking about The Borg?

      austere tannins - Severe tannins? Strict tannins? Unadorned tannins? We lost you just after tannins.

      bottle shock - Sounds like a medical condition. We sympathise.

      bouquet - Are you drinking flowers or wine?

      breathtaking integration - You’re breathtaking. No, you’re breathtaking. No you. Ugh. That word means nothing anymore.

      calibration - Wine is not a machine. At least we don’t think so…

      candlewax thread - Your connection to the real world is now hanging by a thread. Come back to us!

      capsicum - Oh come on! Call it a freakin’ green pepper already. You’re welcome to try and sound smart, but using a green pepper as your base? For shame!

      cassis - Really? The blackcurrant syrupy liquer produced in Burgundy? Nah, we didn’t think so either. How about “blackcurrant”?

      color / colour - Describing taste or smell might help us a little more? Red, dark red, ruby red, blood red, moody red – they’re all just red to most people!

      compote - You mean like “stewed fruit”? Well then just say so man!

      cool climate / cool-climate - Brrrrrr. You must be cold after coming up with such a technical word. Here. Let us warm you up with some normal language!

      cool climate stamp - Can you collect them? If not, this phrase is BANNED! But we’d love for you to find a better way of describing this so we can all understand?

      elegant/elegance - Are you describing a lady? Or a fine cover drive on Day 2 of a Cricket Test?

      gush - Are you sure that isn’t a word you’d rather keep between you and your Doctor?

      harmony - 4 part or 2 part?

      herbaceous - It’s like bodacious, but not? Gotta be a better word yo…

      influence - That must be an influential grape! Does it take campaign donations? Can we get an autograph?

      integrated tannins - We might let you get away with tannins. But integrated tannins? That’s very postmodern of you. Please try again.

      lanolin - A greasy yellow substance chemically akin to wax that is secreted from wooly animals – that’s digusting. Get it out of your wine, quick!

      lees - Ok, ok. So you’re super clever and understand winemaking. Normal people don’t. Please come back to our level. You’re a one-person wolf pack out there.

      length - Yeah, we only gave you 100 characters or so. Sorry. But we find the length stops people from talking too much shit.

      minerality - When last did you suck on a bunch of small rocks? If you’ve eaten minerals, we think you may have bigger problems than this banned word. Seek help. After the wine.

      note / notes - This isn’t music. “Note” is a pretty snobby word if you’re describing something other than music. Isn’t it? Yeah, it is. Go Mozart yourself while you Bachspace and Chopin another word. You see what we did there?

      palate - Say AAAHHH. Whose palate? Yours? Mine? Ours? Or does it stick to the roof of one like peanut butter? We’re confused. Gotta be a better word…

      Palette / palette / pallete - Say AAAHHH. Hang on. You spelt that wrong, didn’t you? Unless you’ve found a way to describe wine akin to a wooden board holding colours for painting? If so, you’re cool.

      residual - You don’t have much wine left? Oh no!

      resplendently - We have resplendently banned this word because we think it is gloriously snobby!

      robust - Robust adj. Sturdy in construction. As in with bricks. Not grapes.

      stern tannins - Don’t be so grumpy man. It’ll all be ok.

      streamlined tannins - How about you streamline this review with something a leeeetle more understandable? K thx bye!

      sweaty saddle - If you’ve ever tasted a sweaty saddle, please get hold of us… Actually, don’t. Yuck.

      vinosity - That’s not even a word! Shame on you!

      warm climate / warm-climate - Getting hot in here with all those technical descriptors. Help us help you help everyone by explaining that concept better!

      Delete
  2. I really hope that all the work done on this will live on as an open source project; and very brave of all involved to let the skirt of a project of such ambition be lifted. Well done to AH + Prezence.

    ReplyDelete
    Replies
    1. It probably needs to go into a github or one of those open source community things, I'm just not sure how to do that. You're welcome to champion :) Thanks for the comment...

      Delete
    2. Will happily do that. I'll drop it in GitHub and share the details with you so if anyone wants to contrib or search the code easily they can.

      Again, well done!

      Delete
    3. Yay! Andy, please post an update with github links if you can :)

      Delete
    4. Oh, wait, nm - just saw Andrew's followup. Thanks both!

      Delete
  3. Ok, on GitHub:

    https://github.com/capetonian/realtimewine

    ReplyDelete

Post a Comment

Popular Posts