Introducing Discette - a minimal ember-cli front end to Discourse

api
javascript

(etewiah) #1

Now for another of my mad experiments :wink: This time I tried to answer the question of what the simplest ember front end to discourse would look like and this was my answer:

http://ed.klavado.com/home

Its been a great learning experience for me and I would recommend that anyone who really wants to understand Discourse well should have a go at creating a very simple front-end for it. Ember-cli is currently a joy to work with and after the frustration of waiting on the Rails asset pipeline each time I make a change in the main Discourse ember app I am pretty desperate to find a way to carry on hacking on Discourse without the asset pipeline.

I have kind of found a way. I came up with the concept of ‘discettes’, which are lightweight ember apps that consume the Discourse api. I am using a manual and rather cumbersome technique to host these discettes in my current Discourse site at the moment but I hope to come up with something smarter and more automated soon.

For now I am happy to offer anyone who comes up with their own ember-cli front-end the chance to host it on my site. Just send me a private message with details of your github repository and I will take care of the rest. To make it easier, I suggest you fork my ‘discette-template’ on github and take it from there. I’ve done a little screencast to explain myself better.

I hope this makes sense. Will be great to get some feedback so please let me know what you think.

Thanks


Sectioned discourse - an experiment
(Jeff Atwood) #2

Liked just for the word “Discettes” which is adorable :heart_eyes:


(Régis Hanol) #3

I don’t know how to pronounce that in English, but this makes me think of the French word “disquette” (floppy disk) :slight_smile:


(se oli tonnin seteli) #4

I think this shows great promise. I like modularity.


(Kane York) #5

Does it not currently work when proxied to a real Discourse site?

I get this:

Failed to load resource: the server responded with a status of 404 (Not Found)   http://localhost:4200/drive/section/topics
Error while processing route: home.default

Command is DISABLE_MOCK=true ember serve --proxy https://meta.discourse.org/. I don’t think /drive/section/topics is a real route…


(etewiah) #6

Hey @riking , first thanks for trying it out!

Its probably not very prominent but in the github repository I recommend using mocks for now. I aim to make some changes in the “Drive” plugin before I recommend people use it. I hope this will be ready in the next few days. I will update this topic when it is.

Here is the extract from the github repository:

Running / Development

Please note that by default, when in development it will use mock data served by the built-in express server. This means that the topics and posts remain the same as you navigate the app.
It is possible to connect to a real discourse server while in development by starting the server so:

DISABLE_MOCK=true ember serve --proxy http://madrid.lvh.me:3000/

You will however need to install this plug-in to your discourse server:

You will also have to make sure CORS is set up correctly on the discourse server or use api keys: I will provide more detailed instructions on this when I get the chance.

Right now I’d recommend that you stick with the default of using mock data. Once I have the plug-in better developed, I will update this readme.


(etewiah) #7

@zogstrip The other plugin which I use to host these “Discettes” on my server is called “Discourse-Drive” so yes the floppy disk analogy is right. I’ll just have to add a rule limiting code size to 1.44mb now :wink:

I’ll write a bit more about the Drive component once I improve on it a bit.