Giter VIP home page Giter VIP logo

frontless's Introduction

Build Status version MIT license

βš™ View demo on CodeSandbox.io

Riot Isomorphic Stack

Frontless is an isomorphic web framework built for next generation web applications. It lets you build server-side rendered web applications using RiotJS and FeathersJS. At the core, Frontless is just an express.js server that provides routing, data access, web sockets and user sessions

  • It is just an express.js aplication you can customize at will
  • It is built with ❀️ RiotJS.
  • It provides natural HTTP routing [page.riot -> GET /page]
  • It uses FeathersJS on client and server
  • It allows to update components' state directly from server response
  • It renders pages after all async operations complete ✊

The Stack

Before you start, it is highly recommended to have essential understanding of following technologies:
FeathersJS | RiotJS | Turbolinks | ExpressJS

Stack summary
SERVER CLIENT
Routing [express.js] Navigation [turbolinks]
View Model [feathers] Data Representation [riot.js]
Layout Rendering [riot/ssr] User input [riot.js]
Sessions [express.js] JWT, Cookies
Realtime [feathers, socket.io] FeathersJS Client
DB Interface [@feathers/client] Rest/IO [@feathers/client]

Getting Started

  1. Clone this repo or use NPX
  npx create-frontless <app-name>
  1. Setup a MongoDB Server (optional). Frontless reads MONGODB_URI environment variable.
  # config.env
  MONGODB_URI=mongodb://localhost:27017/frontless
  1. Install dependencies and start dev. server
  npm run install
  npm start

Оpen http://localhost:6767 in your browser. Navigate to the playground for examples

Features

Natural routing

All files ending with *.riot extension that placed in the pages directory become site pages. It works similar to php scripts or html pages. For example: [index.riot -> GET /, page.riot -> GET /page].

Async SSR

The pages in Frontless are rendered after all fetch operations in children components are complete. Which means you can make asyncronous queries in children components and don't worry that the server return markup before data is fetched.

Server sent state

Some API requests can return a ready view-model for a specific component. After it happens, the target component will update its state from received response. This is convenient whenever you want to update the view after a request is done. Given that, the server should return a ready view-model which eliminates extra steps you would do to handle response.

State initialization

All Riot components rendered on the server side initialize in browser with last state they were on the server side.

Browser caching

If your application needs SPA experience you can cache the pages using webworker module.

RestAPI/Socket.io

Stay close to the database with power of FeathersJS services.

It is just Express

Everything you can do with an express application.

Documentation

Frontless Docs | Feathers Docs | Riot Docs

Contrubute ❀️

If you found a problem and know the solution:

  • Fork repository
  • Fix the problem
  • Push your fix to a separate branch
  • Make pull request to the development branch

If you need help, just open an issue

If you understand how it works under the hood, or feel like you can make this project better don't hesitate to message me directly.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Roadmap v1.0

  • Async SSR
  • Natural Routing
  • Database Interface
  • Users and Sessions
  • Server Sent State (w/feathers.js)
  • Socket IO (w/feathers.js)
  • Plugin support
  • Configuration
  • Deployment scripts
  • PWA Bootstrap [90%]
  • Documentation [20%]

Roadmap v2.0

  • Static site builder [10%]
  • Global state syncronization
  • Push Notifications

Authors

Credits

frontless's People

Contributors

nesterow avatar

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.