Git Product home page Git Product logo

cave_static's Introduction

cave_static

A react based static web app to be used as a data consumer for the cave_app.

Installation

Before you begin we suggest you use the version of node that this application version was developed on. We recommend using NVM to manage node environments.

  • Current CAVE supported Node Version: node 18

You can install all dependencies and run the app by running npm run setup from the root of the project.

npm run setup
  • Notes:
    • you may need to chown and chmod your project folder to be able to execute from inside these files.
      • sudo chown -R your-username . && sudo chmod -R 700 .
    • To ensure good practices and a consistent style code, the following packages for the Atom IDE are strongly suggested: linter, linter-eslint.

Clean Code

ESLint and Prettier automatically lint your staged changes before committing.

At any time, you can apply the lint command to format your code to our standards by running:

npm run lint

Run in development

From the project root:

npm start
  • Compiles client, available in the browser at localhost:3000
  • Notes:
    • cave-test-app does NOT currently support a standalone mode. For functionality you should have an instance of cave_server running.
    • The cave_static should be accessed through the cave_server UI at localhost:8000, and not directly at localhost:3000.

Create a static build

  1. Edit your .env file accordingly
  2. Build the app
npm run build
  • This will create a static build located at the BUILD_PATH found in your .env.
  • Notes:
    • The build process uses the PUBLIC_URL specified in your .env file
    • To test the build locally, you should build with the PUBLIC_URL matching that of your localhost

Analyze Bundle Size and Dependency Cost

  1. Install source-map-explorer globally:
  • npm install -g source-map-explorer
  1. Edit your .env file accordingly
  • Make sure to set GENERATE_SOURCEMAP=true
  1. Create a static build (see above)
  2. Analyze your bundle
  • source .env && source-map-explorer $(find $BUILD_PATH/static/js* -name "main*.js")

Deploy your static build

  1. Edit your .env file accordingly
  2. Deploy your static build:
./deploy.sh
  1. (First Time Only) Route a Route 53 Subdomain to the Cloudfront distribution

License Notice

Copyright 2022 Massachusetts Institute of Technology (MIT), Center for Transportation & Logistics (CTL)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

cave_static's People

Contributors

luisvasq avatar mrkwanzaa avatar connor-makowski avatar brianzheng205 avatar maxtkc avatar katherineyli avatar aiizhao avatar sheepjenga avatar mwinkenb avatar jgbilla avatar

Forkers

ahmedmustafamo

cave_static's Issues

Add extra info and formatting to the cave create function

Add some new lines between relevant output items

Add context for how to set up a mapbox token (steal from the readme)

Add some context at the end for where to find all the variables (.env)

Add any other output you might find helpful or missing

Use websockets for all connections from cave_static to cave_app ?

I am considering using websockets inside of cave_static to do all communications out to cave_app over a single connection using a simple messaging framework.

Currently all requests are post requests sending data and returning simple success responses while all actual data flows back over the websocekt. It just feels a bit silly to open a ton of connections when we already have a socket in place.

Just initial my initial thoughts here. Trying to get your opinions.

Improve the UI/UX of KPIs

Tasks

  • Add margin between the title and the bookmark icon
  • KPI headers should resemble an actual header
  • Improve the overall appearance of the KPI components

`1.0.0`

Creating this issue to keep track of breaking changes as we move towards 1.0.0

Please, feel free to add any issues containing breaking changes to this list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.