# Boplan Upgrade
## Thoughts
After we turned off the switch on the Boplan configurator, it turned out that it was still very much in use. Thomas has told them that the reason we took it offline was that
- the software is very outdated and poses a security risk
- there was not hosting or maintenance paid by Boplan
Boplan has therefore asked us to bring it back online as soon as possible BUT with the necessary updates that could also open up the possibility for new features.
We have to make a plan on how we would ideally bring it back online, including the updates we think are essential. This could be a gradual process since we don't want to scare them off with a +100 day development effort. We also have to be careful with the 3D part since Fre is the only one that can manage it today.
## As-is
### Front end
[Repository](https://git.bagaar.be/project/boplan-frontend)
#### Dependencies
- Vue.js: v1.0.24 - released on May 11, 2016
- The current latest stable version of Vue is v3.3.4
- Uses JSON:API
- Should we go to GraphQL?
- Vue has an [Apollo client](https://apollo.vuejs.org/)
- Is the Cordova/Fastlane needed to build it for iPad?
- TODO ask BoPlan if they are using the app version and/or a PWA version would also work for them
- Last app store publish was 25th October 2017
##### Code wise
- 16 components and 15-16 modals
- SASS
- Migrate to CSS/tailwind?
- Not essential? Looks like a lot of work is there is no migration tool
- Interesting if Elon can explain https://tailwindcss.com/docs/using-with-preprocessors#using-post-css-as-your-preprocessor to me
- Not a problem with Ember boilerplate. Can be directly migrated
2 options:
- Keep in Vue and upgrade
- First to v2 and then v3?
- Which third-party packages are still supported?
- 8 different vue-* packages used
- Is there anyone at Pegus that can help with Vue?
- Rewrite FE in Ember
- Start from boilerplate
Other jobs to do
- Update build process
- webpack, eslint
- Update deploy process
#### Approach
- Set up vanilla Ember project with boilerplate
- Set up authentication with Passport
- Migrate business logic and models one by one
Rough estimate: 12-16 days
### 3D
[Repository](https://git.bagaar.be/project/boplan-3d)
#### Dependencies
- Three.js: r109 - was updated three (no pun) years ago by Fre
### Back end
[Repository](https://git.bagaar.be/project/boplan-api)
#### Main functionalities:
- JSON:API
- Authentication (+ forgot/reset password)
- Password grant
- Sockets (PDF exported event)
- Render 2/3D screenshots
- PDF export
- XLSX export (for the stats command)
- no CMS(?)
#### Dependencies
- Laravel 5.2 - released December 21st, 2015 (security fixes until December 21st, 2016 - not an LTS version)
- Upgrade path to 10.x includes 12 upgrade steps
- Bagaaravel to serve JSON:API
- Bagaaravel can upgrade Laravel 10
- composer.bagaar.be
##### Code-wise
- 9 controllers
- 6 models (Category, Client, Configuration, Location, Product and Translation)
- 2 jobs (generate PDF, generate screenshots)
- 4 commands ()
Most complex class looks the `app/Gateways/ConfigurationGateway.php`
### Approach
- Set up vanilla Laravel 10.x project
- Set up Nova
- Set up authentication with Passport
- Choose between Bagaaravel or GraphQL
- Latter is more work
- Migrate business logic and models one by one
Rough estimate: 12-16 days