Skip to content

🏢 Project Asuna is a scalable, brand-ready, and open-source building management system. Built for research!

License

Notifications You must be signed in to change notification settings

lauslim12/Asuna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asuna

Project Asuna is an open-source, scalable, 'brand-ready', and user-friendly building management system. This full-stack web application is open-source, under MIT License, and the research about this is published in a free-for-all, strictly non-commercial open-access academic journal about science and technology.

Research Paper: Scalable Building Management System for Offices and Co-Working Spaces (2021).

screenshot

Disclaimer

Project Asuna is strictly non-commercial and is used for education and academic research purposes only. You can use this as a base if you want to create a scalable system with the accompanying tech stack, but please do not use this project 'as it is' in your production scenarios. All of the assets in this website are dummy data and dummy assets, and all rights reserved to their original owners of the assets.

Abstract

Co-working spaces and offices are two of the most growing and essential businesses in Asian countries. Several factors contribute to the development of this business, such as the offered interiors, facilities, events, etc. However, the most important factor for the development of this business is the community itself, as it can generally result in a collaborative environment where one could collaborate or assist each other. In this research, we implement a highly scalable and flexible information system for offices and co-working spaces building management. This research also encompasses creating a friendly user interface that conforms to the Eight Golden Rules. Several cutting-edge technologies, such as Next.js, Chakra UI, Express.js, Mongo DB, Vercel, and Heroku, are used in the development phase of this system. The prototype built then is tested by using Technology Acceptance Model. We got a satisfactory result, where most respondents claimed that the system could be used in production phase due to its ease of use, performance, and simplicity to manage the business process. It is also proven that scalability will not be a problem when using this system because the technologies used are always ready to be scaled.

Keywords: Building Management System, co-working spaces, cutting-edge technologies, offices, Technology Acceptance Model.

Introduction

Coworking space is one of the newest business trends in Indonesia and Asian countries in general (Bouncken, 2016). One of the most important metric that we have to understand in order for these kinds of business to flourish is the community of the coworking space. People enjoy coworking spaces with great facilities and good communities (Seo, 2017). If handled correctly, coworking space could make people feel connected to one another and cause them to enjoy the environment, and even create new social circles along the way (Bianchi, 2018).

There have not been a single application to manage these coworking spaces with extremely flexibility. In this application, flexibility means the ability for one to create n rooms and floors, where n itself means infinite. In short, this application is an open-source building management system that allows one to create infinite number of rooms and floors for their own buildings. Users of this application could also place their orders online, shall this application comes to the production version.

Not only built with performance and scalability in mind, this research also encompasses on how to create a friendly user interface to create a simple personal brand. We use assets and brands in order to showcase an example of the previous statement.

Tech Stack

  • JavaScript (programming language)
  • Next.js (front-end)
  • Chakra UI (front-end framework)
  • Express.js (back-end)
  • MongoDB (Atlas) (database, and database on cloud)
  • Vercel (front-end hosting)
  • Heroku (back-end hosting)
  • GitHub Actions (CI/CD)

Features

  • Simple, colorful, but intuitive UI. This is subjective and differs according to the reader's interpretation.
  • Ability to create infinite amount of rooms and floors. Only the reader's database size limits the number.
  • Users can book a room, edit their own profile, and see their transactions.
  • Multiple role support: user, admin, owner.
  • Admins can perform CRUD operations on floors, rooms, employees.
  • Admins can manage the available orders from the users. An admin can change the status or cancel an available order.
  • Admins can see the earnings of the lifetime of this application.
  • Admins can create visitors via an interface in the admin panel.
  • Admins can create vouchers via API endpoints.
  • Dark mode support for the front-end.
  • High-performance support with pre-loaded pages, image lazy-loading, and caching.
  • Server-side rendering support for pages requiring authentication.
  • API-proxy via Next.js's serverless functions to provide extended security.
  • Personal and secure authentication utilizing httpOnly / sameSite cookies and JWT (stateless but secure).
  • Accessibility support (a11y).

Requirements

Installation

To use this repository, both front-end and back-end must be active simultaneously. We will describe on how to set up each parts. As an initial setup, please clone the repository first.

  • Clone the repository first.
git clone https://github.com/lauslim12/Asuna.git
cd Asuna

For the next steps, it is assumed that your working directory is Asuna, the root directory of this repository.

Web Setup

  • Switch to the web directory.
cd web
  • Then, we have to fill the environment variables for both web and api. For the web, the settings are as follows.
export JWT_COOKIE_EXPIRES_IN=<YOUR_VARIABLE>
export PRIVATE_API_URL=<YOUR_VARIABLE>
export NEXT_PUBLIC_API_URL=<YOUR_VARIABLE>
  • Alternatively, you can change the .env.development file and set the variables from there. Don't forget to rename it to .env.local so that it can be used.
nano .env.development
mv .env.development .env.local
  • Install the website!
yarn --frozen-lockfile
  • Start the website in development mode.
yarn dev
  • Start the website in production mode.
yarn build
yarn start

API Setup

  • You need to spawn another terminal process. Change to the api directory.
cd api
  • For the api, the environment variables that you need to fill are as follows.
export CLIENT_SIDE_URL=...
export DATABASE= # this has to be your 'complete URL string' - complete with username, password, and database name
export JWT_SECRET=
export JWT_EXPIRES_IN=
export JWT_COOKIE_EXPIRES_IN=
  • Or, same as above, change the .env.development file and rename it to .env.
nano .env.development
mv .env.development .env
  • Then, we can just install the application.
yarn --frozen-lockfile
  • Before starting our API, we migrate the database first with dummy data.
yarn migrate
  • Start our API. Remember we need two terminal processes, one for web, and one for API!
yarn dev
  • Or you can also start the API in production mode.
yarn start

You're totally done! Open http://localhost:3001 for the web frontend, and http://localhost:3000 for the API backend.

Deployment

GitHub Actions have already been set in this repository to implement the CI/CD part of the web application. It will deploy the frontend to Vercel, and will deploy the backend to Heroku.

Updating

To update the dependencies, you can run the following commands in both api and web.

yarn outdated
yarn upgrade-interactive --latest

Contribution

I accept all kinds of contributions. Feel free to submit a pull request or submit an issue if you encounter any issues!

License

This application is licensed under MIT License, and the research paper is under Creative Commons. For the application's license, please see the LICENSE file for more information.

Acknowledgements

In some parts of the website, we use assets from Unsplash and Genshin Impact (for the room picture only) in order to make a user-friendly interface and as an example on how to implement a simple personal brand (two topics that we also investigate and research here, as stated above). All rights reserved to their respective owners. We have both acknowledged and cited all of the assets' respective owners in the research paper and in this repository properly.

References

Following are the scholarly references for this research project.

About

🏢 Project Asuna is a scalable, brand-ready, and open-source building management system. Built for research!

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks