Page 1 of 1

Open Source Site Files

Posted: Mon Mar 10, 2014 7:09 pm
by edwardrford
Last weekend I buckled down and spent several evenings whipping up a new landing page, and a few sub-pages for the shapeoko domain. This is the second step (the first was moving to a new host!) in a complete overhaul of the site.Not only did I want to give the project a new landing page, with more information, but I also wanted to add a feature that would let us (forum users) submit projects that are more accessible to the outside world.

Right now, there are so many cool things being made with Shapeoko that it seemed like an injustice to not be showcasing them more. After brainstorming for a long while, and consulting with a few people who's judgement I trust and respect, I ended up developing a project system that I hope to start beta testing (forum users only) by tomorrow.

As I was creating the pages and project system, I started wondering about making the site itself accessible to the community for editing/tweaking/improving. After all, the rest of the project is open source.. .why not the site too? Much the same as the design of shapeoko, I am an OK designer and an OK developer, but I'm sure that having more eyes on the code will (just like the project) improve the project immensely.

There are some inherent problems to open sourcing the actual website: (Please reply with opinions about any/all of these)

1.) Security: Because the project system is making calls to the database, authentication had to be done in order to write new projects to the table. To prevent any sort of breach, I removed the connection string from the source files and also removed the connection file from the repository. It is being ignored by git. Otherwise, the files you see on github are the same files that are found on the server.

2.) Environment / requirements: In order to actively develop, one needs the proper developer environment setup on their workstation.

3.) Workflow Although there are several systems already in place to edit on github and have the changes 'automagically' update the production site, I'm not utilizing any of those at the moment. This means that changes to the source (github) will need to be manually transferred to the production server. It's a simple process (drag and drop), but it should be noted that changes to the production site will not take place until this action is done.

So, right now I'm finishing up a few details on the projects feature, and then we should be ready to roll that out for testing. Until then, here are some features of the new system:
- One thing I really wanted (and what took me the longest) was to integrate the forum authentication with the project system. My though being that having yet another password for the website seemed silly. As it is, we already have 2 (wiki, forum) and adding a 3rd would have been tragic.
- Automatic posting to forum. One of the great parts of posting projects on the forum is participating in feedback and reading everyone's comments. I didn't want to loose that. So, when you post a project through the system, it automatically creates a new topic under the Member Projects forum! The initial post is whatever description you put in for your project, and the picture that you uploaded to represent it. Future improvements may be to show the comments from the topic on the project page as well.
- Simplicity - I really like simple things, and I really like to get things going quickly. To start off with, I have implemented what I believe to be the minimum amount of 'stuff' in order to submit a useful project to the community. I'm sure as we go, many more features will be suggested and implemented. First on my list at the moment is Rich Text.

As I said, once I'm finished up with these last couple of things, I'll post a new thread with details on how to get started.

Until then, I'd really appreciate everyone's feedback!


Re: Open Source Site Files

Posted: Mon Mar 10, 2014 8:14 pm
by criznach
Your open sourcing problems seem completely acceptable.
  • It's common practice to exclude configuration files that contain server-specific connection strings. That's how we do it with Drupal projects.
  • Developers that work with CMS, forums, etc, pretty much expect to need a local setup. It might be nice to provide a tutorial or link for doing this to ease the process, but it's not out of the ordinary. A tight project with trusted developers might provide a private dev environment, but not generally a wide open project.
  • Your workflow might be a good isolation step and keep things simple. I do a simple git pull on my production servers, but some teams use tools like Jenkins, git hooks that act on commits to a production branch, etc...
Depending what systems you're using, I might be able to help with login integration. The forum looks like phpbb, correct?

Re: Open Source Site Files

Posted: Mon Mar 10, 2014 8:36 pm
by edwardrford
Thanks for the reply criznach! And thanks for confirming some of my assumptions about this process.

I've used git hooks in the past, and for previous prejects, they were great, but using them here seems like overkill. I like how you suggested it just be considered an isolation step. That's a nice way to put it.

Regarding the authentication: Amazingly, i already have that completed. After sifting through the phpbb3 api docs (or lack there of) I managed to cobble together a decent script. If you go to the home page (, you should either see yourself logged in (top right of nav) or see where you can log in. Give it a whirl and let me know if it works for you too.

I just managed to break my submit project script.. but once I get that done, I'll have something to show :-)


Re: Open Source Site Files

Posted: Mon Mar 10, 2014 11:12 pm
by criznach
Works great! Can we get a link to the main site from the forum? If I need to go to the wiki or the store I always end up opening a new tab and typing in the full URL.