This application is intended to show good practices when building Single Page Applications with mithril. It is used for educational purposes. The server side is provided by an extended version of json-server
that provides authentication, authorization, and a basic integration of peerjs-server
: json-server-plus
It enforces several principles:
- Separation of concerns. This is applied to both client and server:
- Client: Model View Controller
- Low coupling: each component of the application is designed to be reused
The technologies used are:
- Mithril 2
- Webpack 4
- Bootstrap 4
Prerequisites:
- Nodejs 14 installed
To run the application:
- Clone and execute
json-server-plus
- Clone this repo
- Execute
npm install
- Execute
npm run start
. This starts a webpack dev server - Load the project at
http://localhost:9000
This is a very simple application that managed two entities:
- Users
- Orders
And Order belongs to a user, and a user can own multiple orders