Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Make the API a 'monolith' and also include the frontend #183

Open
viktorsmari opened this issue Sep 4, 2020 · 2 comments
Open

Idea: Make the API a 'monolith' and also include the frontend #183

viktorsmari opened this issue Sep 4, 2020 · 2 comments
Assignees
Labels
enhancement web SmartCitizen Web related issues

Comments

@viktorsmari
Copy link
Collaborator

viktorsmari commented Sep 4, 2020

This is a big decision and will require a lot of effort. Noting down pros/cons.

Right now the Smart Citizen is split in 2 parts:

Problem:

  • We have the SC Front End written in Angular.js which is out of date, and maybe not maintained anymore?
  • We need to update / rewrite at some point
  • We need specialized knowledge to maintain Angular
  • We could rewrite everything in a newer Angular version, React, or another JS framework

Other options and ideas

Convert the API into a full-stack 'monolith' so it also includes HTML view files. Not only an API anymore.

  • We will of course have the API endpoints availble
  • Instead of relying heavily on a JavaScript framework that will go extinct in 5 years we can:
    • Sprinkle the HTML with JavaScript when needed.
  • It does not have to use any big JS libraries like React or Angular
  • Make it simple and use as much of plain HTML / CSS when possible
  • Everything in one place, faster to implement changes.
    • Not needing 2 developer profiles to maintain, (Rails + Angular), only Rails knowledge

A lot of innovation is happening in the Ruby on Rails Javascript community

@oscgonfer oscgonfer added enhancement web SmartCitizen Web related issues labels Mar 1, 2023
@oscgonfer oscgonfer mentioned this issue Mar 1, 2023
@oscgonfer oscgonfer reopened this Apr 11, 2024
@oscgonfer
Copy link
Contributor

This has been reopened after our internal discussions.

To summarize, we will:

  1. Move kit (device in backend) and user views for edit, add, delete over to the monolith. Ideally this would replace not only views from smartcitizen-web, but also from the onboarding
  2. Upgrade angular front-end with ng-update gradually, removing those views that are moved over to the monolith, and leave only views for data visualisation. An interesting approach would be to think of a modular system that can help us leverage community effort and better connect with our audience. This is not defined, but initially we can do so by co-designing some components.

@oscgonfer oscgonfer added this to the Usability and integration milestone Apr 11, 2024
@oscgonfer
Copy link
Contributor

More on this:

Rails app

  • First iteration:
    • User management (create, delete, modify)
    • Device management (create (handshake), delete, modify)
    • Experiment management (create, delete, modify, add and remove devices...)
    • Sensors and measurements for admins?

Second iteration:

  • Experiment and device exploration (views for people to show/see)
  • Views for fleet health management (specific request by the user and processed externally by python)
  • User story
  • Onboarding newcomers (create user + device) - low prio. start.smartcitizen.me does the job

Python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement web SmartCitizen Web related issues
Projects
None yet
Development

No branches or pull requests

4 participants