Giter Club home page Giter Club logo

riess.js's Introduction

Riess.js

Riess is a full stack JavaScript application framework.

It's backend origins are from the meanjs JavaScript project team, and thus Riess serves as the next evolutionary phase of the MEAN.JS framework.

Status Notice

This repository and project status is very raw.

Work on repository is fairly new and started only in December 2016 so many of the pushed functionality in the project could be half-baked, hanging for more commits to "finish" or better approach the code (expect many re-factoring).

On the plus side, it means there's a room for contribution and ideas to be implemented.

MEAN.JS 1 to Riess.js

The following table summarizes enhancements and changes made in Riess.js to update the original MEAN.JS project with current Node.js and JavaScript technology tools.

Already implemented:

Subject MEAN.JS 1 Riess.js
Testing:Tools supertest, mocha, should.js request, ava
Testing:Tests Automation All tests run as one task separates tasks to unit tests, integration tests
Testing:ExpressJS supertest wraps expressjs app gulp instantiates a real ExpressJS API service
Testing:Seed seeds based on global seed.js file, only user and pass seed tasks resets the db/models to clear data and is separated to own gulp task
Developer:Community commit guidelines advised in PR uses commitizen to streamline commit guidelines
Developer:Debug node-inspector (missing v7 support) uses v7's builtin debug and inspect options
Node.js v4 v7 with --harmony
Async Functionality Callbacks Async/Await and native Node.js Promise
SQL N/A Sequelize ORM

Planned:

Subject MEAN.JS 1 Riess.js
Documentation:API N/A Swagger
Documentation:Code N/A Docco
Developer:Lint MEAN.JS specific eslint rules Standard JS

Ideas:

  • RethinkDB or alternative?
  • Redis
  • JWT
  • Replace existing implementation of social logins with Passport or consider integration with Auth0

Architecture

Directory Structure

To keep a technology agnostic and developer-freedom approach, Riess implements the following directory structure which de-couples the frontend project and the backend project completely. As such, they are developed in completely separated directories, each with it's own node modules, task runner, module builder, and so on.

It is depicted as follows:

server/
client/

This approach provides the following benefits:

  • The server is completely de-coupled from the frontend, so anyone can take the server directory and use it for a pure API backend server that is suitable for microservices architecture, or just plug it in to another frontend project.
  • The client providing the frontend project is not dependent on the server, and therefore a developer is free to implement their own client frontend code using create-react-app, angular-cli, or vue.js. The choice is yours.

About the name

Riess is named after Adam Riess, an astrophysicist who won the Nobel prize for providing evidence that our universe is in a state of accelerated expansion.

Greatly inspired, Riess.js seeks to provide a solid structure and flexible framework for improved developer experience and increased productivity, while staying in par with the accelerated pace of the JavaScript ecosystem.

riess.js's People

Contributors

lirantal avatar mleanos avatar

Stargazers

Dan Ichim avatar  avatar Rick Delhommer avatar thanos avatar  avatar uncledlm avatar  avatar MOHAMED FARHAT avatar Tomer avatar devSamsane avatar  avatar Mikael Korpela avatar Dahlia Witt avatar  avatar  avatar

Watchers

Mikael Korpela avatar  avatar rafaMontoya avatar MOHAMED FARHAT avatar Royee Shemesh avatar wiscii avatar  avatar Rick Delhommer avatar Sedky Haider avatar  avatar thanos avatar  avatar

riess.js's Issues

Databases Support

I saw in the README you use Sequelize ORM, but what if I want to use a NoSQL DB? Should I delete this dependency and refactor the code?

If this is the case, maybe there is a better way, an ORM for SQL and NoSQL DBs something like waterline.

Suggestion: Plugin-style module architecture

Currently, MEAN.JS is very monolithic. API modules are integrated fairly tightly into the server application when they could be encapsulated as modules and kept independent of the application.

Essentially, my suggestion is to turn Riess into a shell-server whose API endpoints are plugged in and bootstrapped at application start. We could bake in some modules like for user and and auth endpoints, but keep everything else separate.

An architecture like this would ideally provide the following benefits:

  • improved stability of the core server shell -- some code churn would be isolated to endpoint modules

  • improved maintenance of downstream projects -- Ideally, the core shell of downstream projects would be more similar to the origin/master and thus bug fixes and improvements would be easier to merge. I've found that most of the changes I make in my MEAN.JS downstream projects are related to the user module. If this were encapsulated separately, it would be easier to merge security updates from the master branch

  • Just thought of this one... downstream projects could even consume the shell application as a module which would be awesome from a maintenance standpoint. Updating the shell for bug fix and security updates would be as simple as running yarn or npm upgrade

  • a more flexible architecture that users could independently write plugins for to provide additional functionality -- I'm currently working on a project that is conceptually similar to a microservice marketplace. I started with MEAN.JS, but ended up changing a lot as the architecture required me to make a monolithic application when ideally, I would put each microservice in its own repository and require it in to the shell. Right now, I'm doing all the development myself, but my vision is to eventually provide a platform that other people could ~~~contribute to and write their own microservices for or even~~~ roll their own custom service using my application as a starting point.

There are a few downsides that I can think of:

  • Fairly large refactor
  • Dependency hell if the core shell is maintained poorly and churns its interfaces too much

Edit: The part I struck through was dumb and half baked, but I think the rest is still good

Feature: Make session store configurable

Session store currently requires MongoDB/Redis stores available.
Instead, rely on in-memory store unless prompted otherwise from configuration and then apply the given session store.

Directory Structure

In order to de-couple the framework business form the app/business logic business I was thinking of creating the following directory structure:

 - lib/    - all the library bootstrapping, services, etc, goes here
 - lib/core/express.js
 - lib/core/config.js
 - lib/connectors/mongoose.js
 - app/    - user own app logic. inside there will be a modules/ directory to hold a vertical modules structure
 - app/modules/
 - app/modules/helloworld/
 - app/modules/helloworld/controllers/
 - app/modules/helloworld/routes/
 - app/modules/helloworld/tests/
 - db/     - database migrations, seeds, etc. will probably need to support more than one db (sequelize, mongoose, etc)
 - db/mongodb/migrations/
 - db/sql/migrations/

Some question about the Client side

I managed to config MEAN to work with Angular-cli using the proxy and concurrently method, now a question I read some where in the posts...cant seam to find it now, about not using an api method call to retrieve the shared-configs and User on the client side since the html index is held by the cli something about not rushing through the door....anyway why is that a bad idea, also will you change to token authentication and will Angular be based on ngrx.

To many questions sorry, but I had given up on Angular....why upgrade and returned to my other studies, that was until I read about Progressive Web Apps pulled me right back in...will this option be included in the upcoming release

Front-End Part Angular

Hello,

I start the Front-End part with Angular + Angular-CLI + Angular Material (for the moment).
I'm thinking about keeping gulp to build the front-End or should use angular-cli ?

@lirantal @mleanos

Feature: Testing

Old mean.js uses a combination of mocha, should and related libraries.
I had some experience with ava.js (in riess.js, at work and some other libraries) but I'm leaning towards jest which seems to be the de-facto one from facebook so we win on having one tool for both frontend and backend.

WDYT?

Feature: configuration

Due to some work on configuration management and handling at work I have some ideas on how we can make it better:

  • Configuration file should be just one, to encapsulate all config items regardless of environments.
  • Environments shouldn't be exposed in code. Code should check configuration items, not environment its on.
  • Configuration should be moderated through a configuration service so you can access items like config.get('dbHost', 'localhost') providing the key, and a default value if not exists. This allows to later extend configuration items beyond files (such as key/value store like consul), implement time-to-live to refresh config items, etc.

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.