Code Monkey home page Code Monkey logo

jsinkx / traffic-accident-frontend Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.62 MB

Frontend web app for forecast traffic accident via backend with ML model on the weather conditions at Moscow north

License: BSD 3-Clause "New" or "Revised" License

HTML 1.17% TypeScript 97.09% Shell 0.15% Dockerfile 1.55% Batchfile 0.03%
axios mui react styled-components typescript react-chartjs-2 react-helmet-async react-i18next react-hooks react18 reactcontextapi vite

traffic-accident-frontend's Introduction

Traffic accident frontend app

Create traffic accident forecast wia weather conditions in Moscow at north


Stack

  • Typescript
  • React 18
  • Context API / hooks
  • axios
  • react-window
  • react-helmet
  • react-i18next
  • react-chartjs-2
  • react-router-dom
  • styled-components
  • MUI

Lighthouse & Web Vitals

LightHouse

Web Vitals

Config app

An example of the config is in .env.example, but to use it you need to create .env

Integration of the config from .env into javascript variables and all constants are in ./src/shared/constants.ts

Production mode

By docker

Way without create .env

docker build -t traffic-accident-frontend-build --build-arg GENERATE_SOURCEMAP=false --build-arg VITE_API_URL=<API_URL>  .

Warning: don't forget to create .env

docker build -t traffic-accident-frontend-build .

Run build container

docker run --name traffic-accident-frontend-build --restart=always -d -p 80:80 traffic-accident-frontend-build

By package manage (don't recommended)

Check installation part

pn build
pn serve

Dev mode & installation

Via system

  1. git
  2. Node.js
  3. pnpm
  4. Install all dependencies package.json

Warning: before use pn command, need to read alias in .bashrc or alias.bat, also instead pn can called pnpm

Terminal

source .bashrc

Cmd

alias.bat

Install all dependencies

cd traffic-accident-frontend
pn i

Run pn dev

traffic-accident-frontend's People

Contributors

jsinkx avatar

Watchers

 avatar

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.