Skip to content
Pablo Mayrgundter edited this page Jul 26, 2022 · 15 revisions

Share is a Single Page Application written in HTML, CSS, JavaScript(es6+) and JSX.

Frameworks

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.

Development

We test with Jest, lint with eslint, build with esbuild.

Hosting

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.

Detailed Design

URL Structure

See the full URL-Structure specification.

Privacy

See Share: Privacy Design

Code Walks

IFC Scene Load

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

Clone this wiki locally