Ubilocation-client is a map application for Ubikampus Bluetooth tracking project. See main repo here.
- Node 10+ for tooling
- docker/docker-compose for the runtime
Please see Ubilocation-client project architecture for technical overview.
- In both
client
andauth-server
directories runnpm install
(for git hooks and editor dependencies) - Generate private key to /auth-server/pkey.pem with command
openssl ecparam -genkey -name secp521r1 -noout
- Optional - install editor plugins for Tslint and Styled-components, for example if using VS code: Tslint and Styled components
docker-compose up
(usedocker-compose up --build --renew-anon-volumes
if there are changes to dependencies)- Open browser at localhost:8080
See scripts
section in package.json for other development commands. For
example run client unit tests via docker-compose exec bluetooth-client npm test
.
env variable | description |
---|---|
INITIAL_LATITUDE | latitude as float for the initial map position (WGS84) |
INITIAL_LONGITUDE | longitude as float for the initial map position |
INITIAL_ZOOM | mapbox zoom level, from 1 to 22 |
MINIMUM_ZOOM | mapbox minimum zoom level |
ADMIN_USER | username for admin login (/admin) |
ADMIN_PASSWORD | password for admin login |
JWT_SECRET | secret key for JWT sign/verify process |
MQTT_URL | URL for mqtt bus, used for location data, calibration messages and location sharing. E.g. wss://example.com:9002/mqtt |
-
Set secret environment variables (ADMIN_* and JWT_SECRET) in .env file and other configuration into docker-compose.prod.yml. See explanation for configuration parameters above.
-
Generate a separate production private key for as described above into
pkey/pkey.pem
. -
Run
docker-compose -f docker-compose.prod.yml up --build
See How to import your own floor plan and OSM basemap.
Before the current mapping solution was created, the project produced a 3D visualization. This visualization featured a 3D model of the library based on architectural schematics. To access this much earlier version of the project, see the branch 3d-visualization.