GithubHelp home page GithubHelp logo

diluisi / dotcom Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mbta/dotcom

0.0 1.0 0.0 1.69 GB

mbta.com

License: MIT License

Elixir 63.17% Dockerfile 0.03% JavaScript 8.93% CSS 6.74% HTML 5.39% TypeScript 15.47% Python 0.05% Shell 0.21%

dotcom's Introduction

Build Status

Dotcom

The new face of https://www.mbta.com/

Getting Started

  1. Request a V3 API key at https://dev.api.mbtace.com/, and request an increased rate limit for it (someone with access will need to approve this). Note that, at any given time, the site may not be compatible with the very latest API version.

  2. Install Homebrew:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
  3. Install asdf package version manager

    • Follow the instructions on https://github.com/asdf-vm/asdf

    • Install the necessary tools to set up asdf plugins:

      brew install coreutils automake autoconf openssl libyaml readline libxslt libtool unixodbc
      
    • Add asdf plugins

      asdf plugin-add erlang
      asdf plugin-add elixir
      asdf plugin-add nodejs
      

      You can verify the plugins were installed with asdf plugin-list

    • Import the Node.js release team's OpenPGP keys to install 'nodejs' plugin:

      bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring
      

      If you run into problems, you might have to update the import-release-team-keyring script.

    • If running OSX 10.15 Catalina, run export MACOSX_DEPLOYMENT_TARGET=10.14. This works around a known issue with compiling versions of Erlang prior to 22.1.4.

    • Run the install:

      asdf install
      
    • Verify that all the languages for our setup were installed:

      asdf current
      

      You should see the following output with versions specified from .tool-versions:

       elixir         <version> (set by ~/dotcom/.tool-versions)
       erlang         <version> (set by ~/dotcom/.tool-versions)
       nodejs         <version> (set by ~/dotcom/.tool-versions)
      

      If you are missing any versions, you should re-run asdf install. Related Github issue about asdf-erlang

  4. Install chromedriver (for Elixir acceptance tests using Wallaby)

    brew cask install chromedriver
    

    Note: chromedriver requires Chrome to be installed. If you don't already have it, brew cask install google-chrome is an easy way to install it.

  5. Install our Elixir dependencies. From the root of this repo:

    mix deps.get
    
  6. Install npm globally

    npm install -g [email protected]
    
  7. Install our Node dependencies. From the root of this repo:

    npm run install
    
  8. Setup serverside rendering for React:

    npm run react:setup && npm run react:build
    
  9. Build the assets:

    npm run webpack:build
    
  10. Set up required environment variables:

    cp .envrc.template .envrc
    

    Then uncomment the V3_API_KEY line and fill it in with the key you obtained in the first step. If you have direnv installed, it will automatically load and unload the environment using this file. If not, source .envrc will load or update the variables in your shell session manually.

For details on environment configuration, including optional variables, see ENVIRONMENT.md.

Running the Server

Start the server with mix phx.server

Then, visit the site at http://localhost:4001/

Additional documentation

See docs for information about testing and other development details.

dotcom's People

Contributors

phildarnowsky avatar digitalcora avatar amaisano avatar meagonqz avatar ryan-mahoney avatar thecristen avatar katehedgpeth avatar bklebe avatar paulswartz avatar dependabot[bot] avatar alicia-mbta avatar ianwestcott avatar

Watchers

James Cloos 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.