Code Monkey home page Code Monkey logo

marketing's Introduction

home

Maybe Marketing Site

This is the repo for the former (and hopefully soon to be "present") marketing site for Maybe, an OSS personal finance and wealth management platform.

The marketing site was home to a half dozen financial mini-tools and dozens of in-depth articles on personal finance.

Now that Maybe is getting a new lease on life, we're working on getting the marketing site back up as well!

The README details below are likely somewhat dated, but we're working to get everything cleaned up and functioning as quickly as possible.


Getting Started

  1. Install Ruby (directions below use the rbenv method)
    • Install rbenv (docs)
    • cat .ruby-version in the root of the project to find required Ruby version
    • rbenv install x.x.x
    • rbenv global x.x.x - sets Ruby version used by rbenv
  2. Install Ruby on Rails (helpful guide here)
  3. Install Postgres 12.x
  4. Create a Postgres user (Rails defaults the Postgres user to your computer's username)
  5. Find the Bundler version at the bottom of Gemfile.lock and install that version with gem install bundler -v x.x.x
  6. Run bin/setup

Run the app using:

bin/dev

Running Tests

While this app does not have extensive testing setup, as a sanity check, there are a few basic integration tests for the mini-tools along with unit tests as necessary.

All integration tests have the naming convention testname.integration.test.(ts|tsx) and should be placed in the __tests__ folder in the appropriate tool.

All unit tests have the naming convention testname.unit.test.(ts|tsx) and should be placed next to the relevant file being tested.

To run the tests:

yarn test # runs all tests
yarn test:unit
yarn test:integration

Syncing equity prices

Signup for an account on twelvedata.com and export your api key:

export TWELVE_DATA_API_KEY=your-api-key
export ALPHA_VANTAGE_API_KEY=your-api-key
rake equity_prices:sync

GET /api/equity_prices/BTCUSD

Syncing market cap

Signup for an account on coinmarketcap.com/api and export your api key:

export COIN_MARKET_CAP_API_KEY=your-api-key
rake market_cap:sync

Crypto Index Fund

In order to add, remove or update a fund you need to perform the following steps:

Fund

Update the funds file (app/javascript/tools/crypto-index-fund/data/funds.json) as you want.

Note: The top 4 currencies will have the logo displayed in the fund select.

If you are not including a new currency, you are done.

If you are including a new currency, you need to continue with the next steps.

Name, color and logo

Run the script app/javascript/tools/crypto-index-fund/helpers/fetch-data.js.

COIN_MARKET_CAP_API_KEY=your-api-key node fetch-data.js

The script will automatically:

  • Download and save the logo to public/img/crypto-index-fund/logos/
  • Update the currencies file (app/javascript/tools/crypto-index-fund/data/currencies.json) with currency name and color (the dominant color of the logo)

Note: The data is fetched from CoinMarket API.

Equity prices

Include the symbol in the TwelveDataEquityImporter (app/services/twelve_data_equity_importer.rb)

Market cap

Include the symbol in the CoinMarketCapImporter (app/services/coin_market_cap_importer.rb)

Podcast

Podcast episodes come from Transistor.fm.

There is a task (podcast:sync) scheduled to run daily that syncs episodes with Transistor.fm.

This task will check for all episodes published and update the database if there is any change (ex. episode description).

When a new episode is published, a webhook is send by Transistor.fm and received in the /podcast/webhook endpoint. This will call a job (PodcastSyncJob) that will update the episodes, exactly the same as running the podcast:sync task.

To manually sync the episodes, execute the following command:

TRANSISTOR_API_KEY=transistor-api-key rake podcast:sync

Credits

The original marketing site had nearly a dozen contributors! Massive thanks to @pieterbeulque, @zachgoll, @TWilson023, @benface, @sauloantuness, @ffiller, @Tobolka, @jaobrown, @justinfar, @marcqualie and @narciero!

Copyright & license

The Maybe marketing site is distributed under an AGPLv3 license. "Maybe" is a trademark of Maybe Finance, Inc.

marketing's People

Contributors

shpigford 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.