loading...

So you want to stand up your own instance of DEV? (help thread)

ben profile image Ben Halpern ・2 min read

Ever since dev.to went open source, we've had people interested in working with this codebase to build dev.to for music, dev.to for book clubs, dev.to for entrepreneurship etc.

We have a large community already contributing back to the project, so we're excited about the potential to make the underlying platform reusable. This goal is not necessarily part of our own business, but it is a use case we want to support for the broader community. However, it will take some work before we get to this point.

Here is a post I made a several months ago, well before we actually went open source, which muses on this general idea:

Work to be done

The phrase "dev.to" is currently mentioned in 172 different files throughout the codebase. Obviously, a generalized version of the app can't have "dev.to" hardcoded. This is just one example of a step that stands in the way of generalized re-use. The "about" page is also currently hardcoded, as are lots of other elements.

We believe that we can work together to generalize these features little-by-little so that we eventually have a very robust social platform that solo developers can make use of and configure for their needs.

This is not something we can put front-and-center on our own roadmap, but we can actively work with contributors that are excited to push ahead on this goal.

This thread is for any questions you might have. Basically, it is my open inbox on the subject. I'll try to respond to anyone with questions along the way about what work can be done and how. Any pull requests that improve the code and also move us towards this goal have a good chance of being merged.

Happy coding!

Posted on by:

ben profile

Ben Halpern

@ben

A Canadian software developer who thinks he’s funny. He/Him.

Discussion

markdown guide
 

This initiative is amazing Ben! Many hands makes light work. I'm an experienced Java developer but a newbie on Web development ecosystem. Dev.to is amazing and I hope to use its code base to learn.

The first step is to build the development environment, due some,restrictions I had to use Microsoft Windows as the main S.O so I'm reading how to use Docker to create containers to support this environment.

Do you have some tips on how to create a development environment to Dev.to using Docker containers ?

 

Dockerization PR here: it’s close but it’s sort of stalled. github.com/thepracticaldev/dev.to/...

We need to give it fresh eyes.

 

Once PR is done, ill throw it on my k8s cluster and see to create a helm chart. :)

Do you want to collaborate @joe . I can also help you if you are interested.

 

While most developers are trying to monetize their work you are making it for betterment of the community.

 

Well we also monetize our work. Those sponsor slots ain’t free! And we do other biz stuff, but yeah, all in the name of the community. If we just wanted to make a bunch of money we’d have started some SAAS company so it could be acquired by some tech giant. 😋

 

Can you please elaborate more about the various business models of this site?

Right now we have monthly sponsors you see on the sidebar as well as some optional paid memberships, which we don't really push that hard.

We're a small team so these basic elements have been enough, but we do want to keep pushing our business model in a dev friendly way, so we're gradually working on some more features to help organizations reach developers in ways which is healthy for the whole community.

Because we have a lot of traffic and pretty low costs, we're able to make money without selling out too hard, but we are continuing to try to build out more additive features mostly in the "career services" space. This encompasses education as well as helpful job placements, but it's all a work in progress.

 

I have a question that I didn't know where else to ask. How exactly does dev.to produce it's SPA-like navigation? I can see it's getting the document using ajax, handled by the service worker if it's cached. But what mechanism loads the new doc body? Is it just a vanilla JavaScript injection? How are the navigation actions intercepted on the client-side?

 

Here's where the code is, which is quite crappy and messy to be honest:

github.com/thepracticaldev/dev.to/...

We basically take the server response and replace the page, but we only take the body element. The nav bar and footer and basic template. But as far as the app's logic outside of this context is concerned, it's pretty much a server-rendered app.

We basically use a hacked up version of InstantClick to make this happen.

 

I'm interested in helping :) Was going to build something for spak.co, then after using Dev.to I realized it was everything I wanted and more haha

 

We still need to roadmap this out more, but a start would be to begin replacing instances of "dev.to" with ApplicationConfig["APP_DOMAIN"] wherever possible. Symbolically, at least, it's a big first step. If you want to chop away with some no-brainer PRs along this line, go for it!

 

hi @ben , I can run DEV platform on localhost. Is there any documentation for deploying it to an Ubuntu server for example?

 

Love it! Will make a note to dig into it tomorrow or this weekend at the latest :)

hi @benjaminspak , did you deploy DEV platform?

 

I would love to contribute to this goal. is there a tracker for what exactly we need to get knocked out. for this to work it needs to be easy to install, rebrand and deploy to cloud. I can see millions of companies and entrepreneurs that can use this code base internally and externally to create awesome experiences for different communities (e..g. Dev.to PaaS)

Let me know what's the current status for this and I will send a follow up of what I can exactly contribute with.

 

Hi Ben, I am interested in helping on this particular project. I want to make my own movie/book review website, and Dev.to is a great example of what I want to build. Are there any GitHub issues open for this? How can I contribute?

 

I've been thinking of building a forum for a community in the college but can't find a suitable software. I guess, I'll give dev.to a shot.

 

It will be a while before we’re fully baked, so it will work best for long term projects. But if we work closely we might be able to make it happen soonish in some capacity.

Future is definitely bright though.

 
 

That would be super cool -- maybe a Mastadon-esque blogging platform?

 

Yes, it has a lot of the same qualities. Distributed-but-compatible.

The interfaces can be pretty highly variable too. The platform could like a bit more like Instagram or Pinterest or otherwise if that was appropriate for the platform.

 

Trying out dev.to on localhost, so goood!!

 

Hey Ben, is this still the best way to contact you if one wanted to spin up a dev.to instance for a community? Twitter DM is good too ! Cheeers!

 

Hi, @ben if we want to contribute what is the best way to collaborate with your team? Do we have any slack channel or any other tools so that we can discuss it?

 

Just saying hi and thank you for the awesome work on the github repo! Setting up dev.to locally was super easy and fun. I'm thinking to turn this into a network for cooking enthusiasts.