-
-
Notifications
You must be signed in to change notification settings - Fork 31
Design
Share is a Single Page Application written in HTML, CSS, JavaScript(es6+) and JSX.
Share uses the React component framework and MUI Component Library.
As the user interacts with the application, major state changes are reflected as URL-based events with React Router.
The 3D viewer for IFC is IFC.js.
Authentication is handled via integrated with Auth0.
We store settings in HTTP cookies, and use Google Analytics to anonymously measure usage and effectiveness of the tool and track country of origin and demographic cohort to better understand user and market interest.
We test with Jest, lint with eslint, build with esbuild.
The code and issue tracking are at https://github.com/bldrs-ai/Share. The website is as a static page using GitHub Pages and reachable at http://bldrs.ai.
See the full URL-Structure specification.
We inspect the URL in src/BaseRoutes and src/ShareRoutes. If it matches an *.ifc from the project or somewhere on github, we load src/Containers/CadView with its path
CadView then has a bunch of react hooks to setup UI components and loads the scene with IFCjs:
https://github.com/bldrs-ai/Share/blob/main/src/Containers/CadView.jsx#L113
https://github.com/bldrs-ai/Share/blob/main/src/Containers/CadView.jsx#L146
The call to IFC.js is here: https://github.com/bldrs-ai/Share/blob/main/src/Containers/CadView.jsx#L159
and setting up some click listeners here: https://github.com/bldrs-ai/Share/blob/main/src/Containers/CadView.jsx#L228