Developing on the client
You want to work on our library and offer bug fixes or new features ? That's awesome ! 🤩
Here are some inputs about working with Panoramax web client code.
If something seems missing or incomplete, don't hesitate to contact us by email or using an issue. We really want Panoramax to be a collaborative project, so everyone is welcome (see our code of conduct).
Architecture
The current code is split between various elements:
- Views: a single functional entry, like Viewer (map + picture), StandaloneMap or Editor. They share parts of code in CoreView class. They specialized the behaviour of components depending on the needs.
- Components: reusable elements, like Map, Photo or Loader. They are used in some views depending of the context.
- Utils: utility functions, splitted in various files for clarity (API, I18n, Map, Utils, Widgets).
The library is relies on various other libraries:
- Photo Sphere Viewer, for displaying classic and 360° pictures
- Maplibre GL JS, for displaying the map which shows sequences and pictures location
- JS Library Boilerplate, for having a ready-to-use development toolbox
Testing
We're trying to make Panoramax as reliable and secure as possible. To ensure this, we rely heavily on code testing. A variety of testing tools is made available:
npm start
: launches a dev web server on localhost:3000npm run test
: unit testingnpm run lint
: syntax checksnpm run coverage
: amount of tested code
If you're working on bug fixes or new features, please make sure to add appropriate tests to keep Panoramax level of quality.
Documentation
Documentation is offered through two means in this repository:
- Code itself is documented with JSDoc comments
- A broader doc is available in
docs
folder
The code documentation can be generated using the following command:
That will update the docs/02_Usage.md
file with all functions and parameters.
The broader doc can be served and viewed using Mkdocs: