Giter Site home page Giter Site logo

experimental-berlin / muzhack Goto Github PK

View Code? Open in Web Editor NEW
12.0 6.0 7.0 2.14 MB

Web application for publishing music hardware projects.

Home Page: http://muzhack.com

License: MIT License

JavaScript 86.00% CSS 8.70% HTML 0.78% Python 4.25% Shell 0.28%
javascript hardware webpack2 music app docker gke ramdajs

muzhack's Introduction

MuzHack

Gitter Stories in Ready Docker Repository on Quay.io Circle CI

MuzHack is a Web application for publishing musical instrument designs.

[Support via Gratipay](https://gratipay.com/~Arve Knudsen/) Flattr this git repo

Editing

Please install EditorConfig in your editor of choice, since we control the code standard through that (e.g. 2 spaces indentation). Specifically the EditorConfig settings are defined in the .editorconfig file.

Please also install ESLint in your editor, in order to make sure you conform to our code standards. This is configured via .eslintrc.

Development

MuzHack is developed with Node (via hapi.js) on the server and Omniscient (a functional, top-down rendering, React wrapper). The code standard is ES2015 JavaScript. We use Babel to be able to write ES2015 both on the server and on the client.

For the database we use RethinkDB, a NoSQL technology.

Local Installation

  1. Enter the MuzHack Git repository.
  2. Get Git submodules: git submodule update --init --recursive
  3. Install nvm.
  4. nvm install.
  5. npm install.
  6. If you don't have Python 3 already, install it with brew: brew install python3.
  7. pip3 install -r requirements.txt
  8. Install RethinkDB.
  9. ./rethinkdb/setup-rethinkdb.py.

Running Locally

  1. In one terminal, enter the MuzHack repository.
  2. Run the Node server: ./run-server
  3. In another terminal, enter the MuzHack repository.
  4. Run the Webpack dev server: ./run-webpack-dev-server. This serves as a front-end to the Node server, which automatically compiles resources via Webpack.
  5. Access the Webpack dev server at http://localhost:8080 in your browser. The app will automatically be refreshed when you make changes to the source code thanks to Webpack's hot reload feature.

Deployment

MuzHack is deployed as a set of Docker containers to Google Container Engine (GKE), which is a Kubernetes service for managing Docker clusters. GKE is for all intents and purposes Kubernetes, so read up on the latter in order to understand how MuzHack is deployed.

We are using two different clusters, staging and production. In order to work with each cluster, we use the local kubectl command; to configure which cluster kubectl operates on at any given time, issue the command gcloud container clusters get-credentials $CLUSTER, where $CLUSTER is the cluster in question (e.g. production or staging).

Updating Deployed Resources

In order to update a deployed resource, f.ex. a replication controller, use kubectl apply. For example, if the staging web-controller.yaml has changed, issue the following command: kubectl apply -f docker/staging/web-controller.yaml.

muzhack's People

Contributors

aknuds1 avatar gitter-badger avatar greenkeeperio-bot avatar hkwid avatar jorgenbs avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

muzhack's Issues

Add pictures to project tiles

Project tiles should be adorned with pictures in order to improve their appearance. We should strive for something similar to how Thingiverse looks.

Fix generating of zip when creating project

After creating a project, the zip file's size is shown to be 0 - it's perhaps not generated??

  • Generate zip on server and upload to S3
  • Save correct S3 URL
  • Implement loading view in client while waiting for server to finish

Improve design

Could use some help with the general design.

According to user feedback we should go with a more neutral, GitHub like design.

Implement deploying to DigitalOcean (Docker)

Implement deploying a Dockerized version to DigitalOcean, for use as a staging instance. In the future, we'll want to deploy for production in the same way.

  • Make Docker image of app
  • Define scheme for running app container linked to Mongo container
  • Make app use SSL
  • Deploy both staging and production instances, so that we can switch between the two

Implement pruning of backups

  • After a certain cutoff time, backups should be pruned if their source files are gone
  • After a certain cutoff time, backups should be pruned if their source projects are gone

Write acceptance tests

Write acceptance tests, in order to stabilize functionality.

These tests should use data from the production database, in order to ensure that the new version actually works with this.

Support adding pictures to projects

When creating/editing projects, adding pictures should be supported.

  • Implement uploading pictures to S3 via CollectionFS
  • Implement removing pictures from S3 via CollectionFS
  • Implement including existing pictures in Dropzone
  • Implement not re-uploading existing pictures when saving
  • Implement removing deleted existing pictures when saving

Implement backup

Create "stable" site, with backup of database. Probably entails deploying site to DigitalOcean, running database at compose.io or some such.

  • Implement DB backup -> Being solved via MongoDB Cloud
  • Implement S3 backup - Copy files to another S3 bucket

Ensure searchability

  • Ensure that muzhack.com is crawled and indexed properly
  • Ensure that staging.muzhack.com isn't crawled
  • Consider structured data to customize Google search results

Make sure that project pages are search optimized

Make sure that projectpages are properly search optimized, so that they show up in Google searches.

  • Expose tags to crawlers, so that searches for these will bring up corresponding pages
  • Expose description/instructions/title to crawlers
  • Expose author to crawlers

Add breadcrumbs

Add breadcrumbs for instance when visiting a project page.

Fix forgot password form

Forgot password on staging server currently fails due to invalid SMTP password by the looks of it:

2015-05-07 10:47:11.165 debug: [Mail] SMTP server URL: 'smtp://arve.knudsen%40gmail.com:[email protected]:587' 2015-05-07 10:47:11.172 debug: [Populate] Found a license: cc-by-sa-3.0 Exception while invoking method 'forgotPassword' AuthError: Invalid login - 435 4.7.8 Error: authentication failed: at Object.Future.wait (/built_app/programs/server/node_modules/fibers/future.js:398:15) at smtpSend (packages/email/email.js:76:1) at Object.Email.send (packages/email/email.js:153:1) at Object.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:421:1) at [object Object].Meteor.methods.forgotPassword (packages/accounts-password/password_server.js:365:1) at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1617:1) at packages/ddp/livedata_server.js:648:1 at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1) at packages/ddp/livedata_server.js:647:1 at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1) - - - - - at SMTPClient._actionAUTHComplete (/built_app/programs/server/npm/email/node_modules/simplesmtp/lib/client.js:826:23) at SMTPClient._onData (/built_app/programs/server/npm/email/node_modules/simplesmtp/lib/client.js:329:29) at CleartextStream.emit (events.js:95:17) at CleartextStream.<anonymous> (_stream_readable.js:765:14) at CleartextStream.emit (events.js:92:17) at emitReadable_ (_stream_readable.js:427:10) at _stream_readable.js:420:7 at process._tickCallback (node.js:448:13)

Disable hot code push while user is editing

While user is editing something, hot code push must be disabled.

The following is example code for accomplishing this:

Meteor._reload.onMigrate(function(reloadFunction) {
  // Check to see if you should stop migration.
  if (Meteor.router.templateEquals('templateThatShouldPreventReload')) {
    // Set up an autorun that watches a reactive source. When that changes to
    // a value that shouldnt stop migration, go ahead and call reloadFunction().
    Deps.autorun(function(c) {
      if (!Meteor.router.templateEquals('templateThatShouldPreventReload')) {
        c.stop();
        reloadFunction();
      }
    });
  } else {
    // If you are ready to migrate, just return [true]
    return [true];
  }
});

Consider transitions between tabs and pictures

Consider implementing content transitions when switching tabs for a smoother user experience. Consider also smoothing transitions between pictures when the user clicks on thumbnails.

Not sure if this can be best implemented via CSS or JavaScript.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.