Skip to content

MERN stack demo application that covers basic UI5 Web Components shown during my presentation at SAP Co-Innovation and Certification Day.

License

Notifications You must be signed in to change notification settings

gevartrix/basic-booking-ui5

Repository files navigation

Basic Booking App

A simple full-stack web application showcasing possibilities of UI5 Web Components. Used as a demo during the second day (December the 4th, 2020) of SAP Business Technology Platform: Co-Innovation and Certification Day at SAP Labs CIS.

Table of Contents

Click to expand

Summary

Demo of a single page application with RESTful API that allows SAP employees to request and book various devices for several days period. The requests are managed (accepted or denied) by administrator. There is also a build-in validation feature of the booking dates (i.e. a device can't be booked if it's already been booked by someone else for these dates). Also this demo app doesn't require a password to sign in, since it's presented as an internal web application.

Technology Stack and Tools

Project Structure

Click to expand
├── client
│   ├── src
│   │   ├── components
│   │   │   ├── elements
│   │   │   │   ├── BookingRow.jsx
│   │   │   │   ├── BookingsTable.jsx
│   │   │   │   ├── ErrorNotice.jsx
│   │   │   │   ├── Navbar.jsx
│   │   │   │   ├── PendingRow.jsx
│   │   │   │   ├── PendingsTable.jsx
│   │   │   │   └── SuccessNotice.jsx
│   │   │   └── pages
│   │   │       ├── Admin.jsx
│   │   │       ├── Login.jsx
│   │   │       └── User.jsx
│   │   ├── context
│   │   │   └── userContext.js
│   │   ├── App.css
│   │   ├── App.js
│   │   ├── index.js
│   │   └── serviceWorker.js
│   ├── package.json
│   └── package-lock.json
├── server
│   ├── api
│   │   ├── middleware
│   │   │   ├── authentication.verification.js
│   │   │   ├── authorization.verification.js
│   │   │   └── body.validation.js
│   │   ├── models
│   │   │   ├── Booking.model.js
│   │   │   ├── Device.model.js
│   │   │   └── User.model.js
│   │   └── routes
│   │       ├── auth.route.js
│   │       ├── bookings.route.js
│   │       └── devices.route.js
│   ├── .env.dist
│   ├── package.json
│   ├── package-lock.json
│   └── server.js
├── .eslintrc.json
├── .prettierrc.json
├── package.json
└── package-lock.json

Screenshots

Click to view

User's booking process

Device details window

Admin Panel

Quick Start

First, clone this repository:

git clone https://github.com/gevartrix/basic-booking-ui5.git

For the sake of convenience all required environment variables for the server are stored in a .env file. The server folder contains a .env.dist file. Copy it to server/.env file and set its values accordingly.

Please make sure you've got a MongoDB database set.

Go inside the root directory:

cd basic-booking-ui5

Install dependencies:

npm install
npm run install-deps

Start the development server:

npm run dev

The application should then open in your default browser automatically.

You are also welcome to checkout the server's auto-generated API documentation by following the link bellow:

http://localhost:{SERVER_PORT}/api/docs

Contributing

If you'd like to contribute to this little project, please follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b feature/foo.
  3. Make your changes and commit them: git commit -am 'Add foo feature'.
  4. Push your changes to the branch: git push origin feature/foo.
  5. Create a new pull request.

Pull requests are warmly welcome!

Style Guide

This application is configured with ESLint as well as a set of rules for the prettier code formatter. You may also check the configuration in the .eslintrc.json and .prettierrc.json files.

Therefore it is recommended to format the code before committing changes by running the following scripts from the root folder:

npx eslint . --fix
npm run prettify

License

Copyright (c) 2020-2021 Artemy Gevorkov. This project is licensed under the Apache Software License, version 2.0.

About

MERN stack demo application that covers basic UI5 Web Components shown during my presentation at SAP Co-Innovation and Certification Day.

Topics

Resources

License

Stars

Watchers

Forks