Skip to content

GREEB/trakr.app

Repository files navigation

License Build Status issues Join the chat at https://gitter.im/trakr-app/community

Data

Really not sure how to do data atm we parse on server and on client to get nice data to animate car. Saving raw bytes would be 200MB/h at ~160 packets/second. So for now to test we only save XYZ to build worldmaps saved every 1000/2 ms. Frontend still gets full telemetry at 12 packets/second. We save the full telemetry bytes, frontend does parsing. Maybe implement Draco

Features

  • Three: Dynamic point rendering
  • Nuxt: Discord oauth
  • Nuxt: Usable Frontend
  • Three: Little "stress" page
  • Nuxt: Start of modular system for input data
  • Nuxt/Three: Custom Shader frontend
  • Nuxt: Simple Camera System
  • Nuxt: Simple Global maps

Contributing

Contributions are always welcome!

Development

To run the production version which takes URL into consideration for callbacks and CORS and also redirects to /about if not logged in

If you only wanna see the code for the WebGl/Three stuff there look at the assets folder.

First make sure you copy the example.env to .env

cp example.env .env

Read "Environment Variables" below

  yarn Install
  yarn dev

Games

This basically implements games assets/js/games

Url

Not really sure about this but for now, x is a uuid

Map

  • /map/x
    • /map/x/x

User

  • /user/x
    • /user/x/session/x
    • /user/x/map/x

Challange

  • /c/12345

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

IOPORT Socket.io port

URL Url for CORS and ssl later not really implemented yet if empty defaults to localhost

PORT App port also for CORS and stuff

JWTSECRET Secret used for JWT, can be generated with:

node -e "console.log(require('crypto').randomBytes(256).toString('base64'));"
#or
openssl rand 256 | base64

POSTGRES Postgres URL

DISCORDID Discord oAuth id

DISCORDSECRET Discord oAuth secret

Dump

Acknowledgements