Giter VIP home page Giter VIP logo

nodezoo-web's Introduction

The nodezoo microservice demonstration architecture

This is a repository in the microservice demonstration system for the Tao of Microservices book (chapter 9). This code is live at nodezoo.com.

This system shows you how to construct a full microservice architecture. It is MIT licensed so that you can cut-and-paste to build your own system with minimal effort. The system consists of multiple repositories, and runs ten or so microservices in production (Kubernetes), staging (Docker), and development (fuge) modes.

The best place to get started is the nodezoo/tao repository, which links to everything else, and has the Getting Started guide.

nodezoo-web

TODO

nodezoo-web's People

Contributors

adrianrossouw avatar ckiss avatar eduardobs79 avatar georgette avatar matt-oc avatar mcdonnelldean avatar mihaidma avatar mirceaalexandru avatar naomifeehan avatar pelger avatar rjrodger avatar shakywakey avatar shanel262 avatar thefoxis avatar vislamov avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodezoo-web's Issues

github service crashing

Consecutive info queries are causing github service to fail ( I might need to move this issue to another repo)

I tried using only seneca and lodash, and able to get the service to crash by toggling between them in the route

/info/{module_name}

here is a crash report when querying for argosy

route:

/info/argosy

(so searching for argosy)

log:

Seneca Fatal Error
==================

Message: seneca: No matching action pattern found for { data:    { name: 'argosy',     user: 'jasonpincin',     repo: 'argosy',     stars: 3,     watches: 1,     forks: 2,     last: '2016-02-04T16:47:08Z',     url: 'http://github.com/jasonpincin/argosy',     'id$': 'argosy' },  role: 'search',  cmd: 'insert' }, and no default result provided (using a default$ property).

Code: act_not_found

Details: { args: '{ data:    { name: \'argosy\',     user: \'jasonpincin\',     repo: \'argosy\',     stars: 3,     watches: 1,     forks: 2,     last: \'2016-02-04T16:47:08Z\',     url: \'http://github.com/jasonpincin/argosy\',     \'id$\': \'argosy\' },  role: \'search\',  cmd: \'insert\' }' }

Stack:
    at Object.errormaker [as error] (/Users/gege/nearform/nodezoo-system/node_modules/nodezoo-github/node_modules/eraro/eraro.js:94:15)
    at Object.execute_action [as fn] (/Users/gege/nearform/nodezoo-system/node_modules/nodezoo-github/node_modules/seneca/seneca.js:1054:29)
    at Immediate._onImmediate (/Users/gege/nearform/nodezoo-system/node_modules/nodezoo-github/node_modules/seneca/node_modules/gate-executor/gate-executor.js:135:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

Instance: Seneca/1.2.0/xdveia4tagum/1459205683772/28075/undefined
  ALL ERRORS FATAL: action called with argument fatal$:true (probably a plugin init error, or using a plugin seneca instance, see senecajs.org/fatal.html)
    at Object.execute_action [as fn] (/Users/gege/nearform/nodezoo-system/node_modules/nodezoo-github/node_modules/seneca/seneca.js:1059:27)

When: 2016-03-28T22:55:18.944Z

Log: [sys,seneca,1.2.0,xdveia4tagum/1459205683772/28075/undefined,act_not_found,seneca: No matching action pattern f

Node:
  { http_parser: '2.5.2', node: '4.4.1', v8: '4.5.103.35', uv: '1.8.0', zlib: '1.2.8', ares: '1.10.1-DEV', icu: '56.1', modules: '46', openssl: '1.0.2g' },
  { debug: false, uv: true, ipv6: true, tls_npn: true, tls_sni: true, tls_ocsp: true, tls: true },
  [ 'Binding contextify', 'Binding natives', 'NativeModule events', 'NativeModule buffer', 'Binding buffer', 'NativeModule internal/util', 'Binding util', 'NativeModule timers', 'Binding timer_wrap', 'NativeModule _linklist', 'NativeModule assert', 'NativeModule util', 'Binding uv', 'NativeModule path', 'NativeModule module', 'NativeModule internal/module', 'NativeModule vm', 'NativeModule fs', 'Binding fs', 'NativeModule constants', 'Binding constants', 'NativeModule stream', 'NativeModule _stream_readable', 'NativeModule _stream_writable', 'NativeModule _stream_duplex', 'NativeModule _stream_transform', 'NativeModule _stream_passthrough', 'Binding fs_event_wrap', 'NativeModule os', 'Binding os', 'NativeModule crypto', 'Binding crypto', 'NativeModule internal/streams/lazy_transform', 'NativeModule string_decoder', 'NativeModule net', 'NativeModule internal/net', 'Binding cares_wrap', 'Binding tty_wrap', 'Binding tcp_wrap', 'Binding pipe_wrap', 'Binding stream_wrap', 'NativeModule dns', 'NativeModule url', 'NativeModule punycode', 'NativeModule querystring', 'NativeModule http', 'NativeModule _http_incoming', 'NativeModule _http_common', 'NativeModule internal/freelist', 'Binding http_parser', 'NativeModule _http_outgoing', 'NativeModule _http_server', 'NativeModule _http_agent', 'NativeModule _http_client', 'NativeModule https', 'NativeModule tls', 'NativeModule _tls_common', 'NativeModule _tls_wrap', 'NativeModule _stream_wrap', 'Binding js_stream', 'Binding tls_wrap', 'NativeModule _tls_legacy', 'NativeModule zlib', 'Binding zlib', 'NativeModule dgram', 'Binding udp_wrap', 'NativeModule console', 'Binding signal_wrap', 'NativeModule repl', 'NativeModule readline', 'NativeModule domain', 'NativeModule tty', 'NativeModule cluster', 'NativeModule child_process', 'Binding spawn_sync', 'NativeModule internal/child_process', 'Binding process_wrap', 'NativeModule internal/socket_list', 'NativeModule internal/cluster' ]

Process:
  pid=28075, arch=x64, platform=darwin,
  path=/Users/gege/.nvm/versions/node/v4.4.1/bin/node,
  argv=[ '/Users/gege/.nvm/versions/node/v4.4.1/bin/node',  '/Users/gege/nearform/nodezoo-system/node_modules/nodezoo-github/srv/github-dev.js',  '--seneca.options.tag=nodezoo-github',  '--seneca-log=type:act' ],
  env={ elasticsearch_PORT_9300: '9200',  MANPATH: '/Users/gege/.nvm/versions/node/v4.4.1/share/man:/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man',  metrics_PORT: '10001',  mesh_PORT: '10000',  TERM_PROGRAM: 'iTerm.app',  NVM_CD_FLAGS: '',  TERM: 'xterm-256color',  SHELL: '/bin/bash',  TMPDIR: '/var/folders/cl/vzm9v8gx7w57_h2xghl20j740000gn/T/',  elasticsearch_PORT_9200: '9200',  Apple_PubSub_Socket_Render: '/private/tmp/com.apple.launchd.0eR56y4VZi/Render',  NVM_PATH: '/Users/gege/.nvm/versions/node/v4.4.1/lib/node',  DOCKER_HOST: 'tcp://172.16.183.129:2376',  influx_PORT_8083: '8086',  search_PORT: '10003',  npm_PORT: '10004',  influx_PORT_8086: '8086',  USER: 'gege',  NVM_DIR: '/Users/gege/.nvm',  SERVICE_HOST: '0.0.0.0',  DOCKER_MACHINE_NAME: 'default',  SERVICE_PORT: '20005',  concorda_PORT: '10008',  SSH_AUTH_SOCK: '/private/tmp/com.apple.launchd.0WBSeFgNkY/Listeners',  TOKEN: 'f2c56d03f8652f282658cfb5c8cb0409f0fa2fb3',  __CF_USER_TEXT_ENCODING: '0x1F5:0x0:0x0',  github_PORT: '10005',  DOCKER_TLS_VERIFY: '1',  web_PORT: '10007',  PROXY_HOST: '127.0.0.1',  PATH: '/Users/gege/.nvm/versions/node/v4.4.1/bin:/Users/gege/.nvm/versions/node/v4.4.1/lib/node_modules/fuge/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',  NVM_NODEJS_ORG_MIRROR: 'https://nodejs.org/dist',  PWD: '/Users/gege/nearform/nodezoo-system/node_modules/nodezoo-github',  travis_PORT: '10006',  LANG: 'en_US.UTF-8',  ITERM_PROFILE: 'Default',  XPC_FLAGS: '0x0',  XPC_SERVICE_NAME: '0',  HOME: '/Users/gege',  COLORFGBG: '7;0',  SHLVL: '1',  DOCKER_CERT_PATH: '/Users/gege/.docker/machine/machines/default',  info_PORT: '10002',  vidi_PORT: '10009',  ITERM_SESSION_ID: 'w0t0p1:C073D28C-AD08-47A5-899F-D2FEE6FE9EDE',  LOGNAME: 'gege',  NVM_BIN: '/Users/gege/.nvm/versions/node/v4.4.1/bin',  NVM_IOJS_ORG_MIRROR: 'https://iojs.org/dist' }

SENECA TERMINATED (on timeout) at 2016-03-28T22:55:30.059Z.

Placeholders for missing data on info page

Sometimes fields do not have a value if the user hasn't filled them out in npm or github etc. It might be nice to have placeholder data for this case instead of leaving it blank or not showing the field at all.

Here is an example of fuge missing a homepage:
screen shot 2016-04-21 at 12 30 52

Move header and footer bits inside the shell

This means we end up with

<div id=app>
 <div className=shell>
  ... Whole site here

I'm not massively happy about this but I need to speak to people with more react experience to fix. For now this will allow @thefoxis to keep the design semantic so we can just pull the two top divs when we figure out the best way to do it.

@ckiss I'll get you to do this for Nodezoo please.

Better Flexgrid Wanted

The current grid is tedious when doing responsive layout

What I don't want is to have to do this:

className="col-xs-2 col-sm-2 col-md-2 col-lg-2 col-xlg-2"

to get an element to have a width of 2 columns

I want to be able to do this, and have it be 2 columns from an xs screen to the largest

className="col-xs-2"

this is more than just quality of life, but the current implementation is far too many queries than needed

As a note, bootstrap 4 is in alpha but uses flexbox and this design

Search screen feedback

Based on the following screenshot,

screen shot 2016-04-06 at 14 45 58

  • Module names should be all lower case
  • Make Star and Fork numbers links (to stars and forks respectively)
  • Change see related modules to more info and link to the info page
  • Decrease the overall size of search result elements (they could be half as tall)

Search results unavailable unless prior pulled by info page

Just to make a note of it here, when fixed we can close it.

To reproduce:

  1. Open home page
  2. Type something new that you did not search yet, e.g. "underscore"
  3. Search results page is empty
  4. Load /info/underscore URL in the browser
  5. Repeat search
  6. Search results come up with one results that's been pulled by info

Designer Wanted

Because I'm not one. I'm really great at UX, but not making things pretty. Just good enough.

Two different schools of thought :)

No coding required, just send suggested layout in any format you wish.

create components for each info result type

There are 3 different types of results (currently) in Info.js: Github, Travis, NPM.

The layout for each type of result can be split into their own component, and then imported and utilized within info.js

Include URL for each result in the info page

As of today, only the github result includes a URL to a module within git, but it would be nice to have it in all results.

Use Case: As a user, I'd like to use nodezoo-web to easily navigate to a module within any of the places it exists in the developer eco-system. I'd treat node-zoo as a convenient bookmarking system. As such, I'd like to be able to click a link in the result list and go to associated web page.

Additionally, the icons for each result list are rendered as if they are clickable (IE: the pointer changes when mousing over the icon). If we implement this feature, perhaps each icon would link to the associated result URL. If the URL doesn't exist, then perhaps link to the main page of npm/travis/git or at least remove the hover pointer change.

Allow user to copy git link to clipboard

If a user wants to copy the git link to clone a repo, it would be convenient to have the standard copy to clipboard feature (like git has when copying git http and ssh links)

should not be using uppercase in filenames

Mac and windows are case __in__sensitive, but linux cares about case deeply.

This is why the following line in client/containers/info.js was only breaking when i was trying to build docker containers with it.

import {TravisInfo} from '../components/TravisInfo'

The filename was components/travisInfo.js, which would work everywhere but on linux.

The node way (tm) to do this is to name the file components/travis-info.js.

Bring in NPM Download Info to search results

In search-result.js, remove the git watch/fork/stars

Bring in NPM Download *Last Month Info *

@mcdonnelldean Do you agree with this? I think all 3 (day/week/month download info is too much for a search result, but last month is probably the best. )

Have an icon with text layout as seen here

c857870e-fca2-11e5-9de1-cd0895b6a7ee

Move to Stylus

Processor is now in place, we should be good to go to convert our css to stylus and take advantage of variables, etc

Only show connected services

In the search result items, in the top left hand corner. There are little service gems. These are supposed to represent the services we have data for. With that in mind each service gem should only show when there is data from that service included in the search result.

To check if a service is available, check the data like so. item.github.connected. This value will be true or false. In cases where there is no connected service item.github.connected will be false and you will know not to read data from it.

The following services are included in the search payload travis, github, npm.

Update Toolbag

As discussed, used the newer version with the broken out plugins.

take advantage of more stylus features

This isn't really that important, but for anyone looking to learn a preprocessor language (we use stylus), this might be fun.

using this site as a reference on which css3 properties still require vendor prefixes, I'd like to see some mixins generated

for example, although vendor prefixes is no longer needed for this property

Mixin for border-radius

border-radius(radius)
  -webkit-border-radius radius
  -moz-border-radius radius
  border-radius radius

used by doing:

border-radius(5px)

Also, I'd like see more use of features like @extend, and whatever feels nice. You can get crazy concise with these things, but its not necessary as it all compiles the same :)

Placeholder for loading results

Due to our implementation using websockets, the results will trickle in at their leisure.

The issue with this is that the user may not be aware that more results are loading (on the info page). Therefore, it would be nice to have placeholder widget that alerts the user that the information is in the process of being pulled.

Info.js

Can we get a listing of available information we can pull from git/travis/npm?

Create a readme header png or gif

Hey @thefoxis Can you produce a non svg version of the nodezoo logo so we can use it on the README's? You can dump it in the imgs/ folder and I will find a proper home for it.

Github doesn't like SVG's in the readme and using the change header trick sometimes fails on npm so I think a regular graphic will do fine. Pretty much like we do on the seneca ones.

I'll have someone else run through all the readme's with the file.

search item changes

screen shot 2016-01-17 at 23 31 59

- make npm / github logo's as big as the hex logo - add some vertical padding between icons and 'See similar modules' - drop fontsize of 'See similar modules' to demphasis it a little. - make info / star / fork icons bigger to emphasis them more

Improve frontend devs data experience

People working on the frontend need to have an up to date data reference to work from. With this in mind I think we need the following actions.

Add sample calls and data to readme's

@matt-oc please make an issue on npm, github, travis. This issue asks to update the readme with sample data from each response. The expectation is each pattern in handled and emitted section will have some sample code on how to call the pattern and a sample result that gives people a solid idea of what to expect in cases of a valid response. Assign these issues between yourself @CodeWriterWriter and @shanel262 and @powerbrian

Add Isolated Mode to npm and travis

Add isolated mode to Travis and Npm. This is already been done in Github. For ports us 8053 for travis and '8051' for npm. @matt-oc please make issues for these and assign them myself. Adding isolated mode will allow designers to npm run isolated and test what data comes back easy

Use mem-store in Isolated Mode

We have added redis for hard caching in npm, travis and github. In Isolated mode this is an additional uneeded overhead. We have a flag that can control the mode we are in. When in isolated mode we should not load the redis store plugin. This will instead use mem-store and not require additional infrasturcture to be ran. @CodeWriterWriter can you make an issue on each library (npm, travis, github) nothing this so we can assign it out to people later?

Improve responsiveness

It seems there are a lot of 'inbetween' sizes where the site is two small or has too much padding as the size decreases. It looks like we need more comprehensive responsive points.

/info should redirect to /

When no module name is provided info/ should redirect to / This can be handled in the client router by adding a route for it.

UI Refresh

Hey @thefoxis

I added notes below. You can do all this on your static fork, I wasn't able to open an issue there so I stook it here. I'm happy for you to convert to stylus too if you want, you don't need to set up a pipeline, it's fine to manually run the process, I'll automate it when when I move it in.

If you have changes to the header feel free to bring em in.

attachment-2

  • Make the search bar wider, button size is perfect
  • In the module list, use the three samples provided below
  • Removed the body text in each list item
  • Add in the a hex logo for each list item using the rating

attachment-3

  • Update the npm section to match the sample data
  • Add the github section same as the npm section
  • Style the items in each section to have a bigger header and no bullet.
  • Add a refresh icon to the blue bar / remove the button, I'm going to use this if slow loading
  • Make the module name larger and stand out more
  • Add npm and github icons beside the header

Data - npm

name: seneca
version: 1.0.0
created: 01/01/2013
url: npmjs.com/seneca
rating: 4

name: seneca-user
version: 0.4.2
created: 01/04/2014
url: npmjs.com/seneca-user
rating: 2

name: seneca-auth
version: 0.5.3
created: 01/05/2013
url: npmjs.com/seneca
rating: 3

Data - Github

name: seneca
version: 1.0.0
created: 01/01/2013
url: github.com/senecajs/seneca
rating: 4

name: seneca-user
version: 0.4.2
created: 01/04/2014
url: github.com/senecajs/seneca-user
rating: 2

name: seneca-auth
version: 0.5.3
created: 01/05/2013
url: github.com/senecajs/seneca-auth
rating: 3

As a user of nodezoo-web, I'd like to be able to:

The more feedback we have, the better an interface becomes. Nodezoo-Web is a way for newcomers to microservices to see them in action, however, we are also exploring our own neat little search engine for modules that is not intended to compete with anything.

Background: The general purpose of this interface is to pull information from various sources related to any particular module. So for instance, if I search for seneca, a microservice framework for node.js, it will pull back information from github, travis, and npm (We will be adding more). So I ask, what information would you find useful, and/or features. The most basic use case is to have everything in one place about a module, but what is "everything."?

So I'm asking, what would you like to see on this interface that would increase the efficiency of our day to day software workflow?

Move UI to React / Redux

This needs to be done for each iteration. The UI is not part of the workshop as such so all iterations of the workshop should have the same UI.

@thefoxis I think we will get the UI work completed on a branch off master and do the latest iteration too. We should be able to hand off to our interns then to replicate the work we have done in the earlier iterations.

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.