Manifold Markets: A market for every question
Go to file
marsteralex 44deaf7b0a
WIP: add artist category (#866)
* fix https

* add beasts

* Remove extra file

* Prettier-ify code

* Prettier-ify

* add basic land guesser

also added fetcher to filter all cards instead of only unique art

* default to original

makes basic better

* added set symbol to basics

added set symbol to the basics game mode. Changed name to "How Basic"

* cleanup

* changed some pixels

* only load set data if needed

* hacked fix for removing image from name

* removed check from original

* remove check from original

* sort names by set instead of by set symbol

* include battlebond

* update cards for categories

update for dominaria united

* added commander category

commander category

* update basic land art

* can use double feature

* removing racist cards upstream

this way we don't have to store the cards in the json

* remove generated cards from digital commanders

* fix counterspell setting default

* added difficulty rating

* updated padding

* add dfc support for commanders

* add artists

* use latest non-digital if possible

* change vsCode settings for python

* update with latest non-digital printing

* update artist list

* update algo to select k samples

* cleanup code

* equally weight artists

* weight everything equally

* updated for all artists

* update artists

* add allowlist

* update artists to min 50 art

* allow promo to be replaced

* update jsons

* update with min 100 arts

* update code to be smaller jsons

* updated to 18 artists per game

* update ui

* update importing artists

* update to 21

* move num artists to top of js file

* update artistList to not include artist sigs

* update to 50 artists

* update for ub

* update artist list

* update ub defaults

* update jsons

* allow non-english cards to be replaced

* update allowlist

* update jsons

* add watermark

* update jsons

* update jsons

* make jsons slightly smaller

* add checkmarks and x's

* remove python

* add no answer and checkbox and x

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-09-19 18:10:14 -07:00
.github Set up github action to remove unused imports 2022-08-26 23:56:38 -05:00
.vscode add tailwind to recommended vscode extensions 2022-06-23 14:25:55 -05:00
common Add more stats. Fix timezone. Group retention and new user retention 2022-09-19 18:41:24 -05:00
docs Add group endpoint note in api docs 2022-09-09 07:22:31 -06:00
functions Add more stats. Fix timezone. Group retention and new user retention 2022-09-19 18:41:24 -05:00
og-image Remove chance from FR og-images 2022-09-06 09:36:41 -06:00
web WIP: add artist category (#866) 2022-09-19 18:10:14 -07:00
.firebaserc Allow admins to see private-users info 2022-01-24 00:48:10 -06:00
.gitignore add tailwind to recommended vscode extensions 2022-06-23 14:25:55 -05:00
.prettierrc move prettier config to top level 2022-01-10 17:44:42 -06:00
dev.sh Allow to follow/unfollow markets, backfill as well (#794) 2022-08-24 10:49:53 -06:00
firebase.json [WIP] Fully customizable notifications (#860) 2022-09-12 10:34:56 -06:00
firestore.indexes.json Tidying some feed code up (#818) 2022-08-30 20:28:30 -07:00
firestore.rules Add user.homeSections to firestore rules 2022-09-18 17:00:35 -05:00
LICENSE.md Choose MIT license 2022-04-02 12:01:23 -07:00
package.json Upgrade Typescript, ESLint, Prettier (#817) 2022-08-30 01:44:45 -07:00
README.md Mention /docs package in README 2022-05-31 15:16:18 -07:00
yarn.lock Add node-fetch, add secret to function config 2022-09-19 15:25:16 -05:00

Manifold Markets

This monorepo has basically everything involved in running and operating Manifold.

Getting started

  1. Make sure you have Yarn 1.x
  2. $ cd web
  3. $ yarn
  4. $ yarn dev:dev
  5. Your site will be available on http://localhost:3000

See web/README.md for more details on hacking on the web client.

General architecture

Manifold's public API and web app are hosted by Vercel. In general, the web app runs as much as possible on the client; we follow a JAMStack architecture. All data is stored in Firebase's database, Cloud Firestore. This is directly accessed by the client for most data access operations.

Operations with complicated contracts (e.g. buying shares) are provided in a separate HTTP API using Firebase's Cloud Functions. Those are deployed separately from the Vercel website; see functions/README.md for more details.

Directory overview

  • web/: UI and business logic for the client. Where most of the site lives. The public API endpoints are also in here.

  • functions/: Firebase cloud functions, for secure work (e.g. balances, Stripe payments, emails). Also contains in functions/src/scripts/ some Typescript scripts that do ad hoc CLI interaction with Firebase.

  • common/: Typescript library code shared between web/ & functions/. If you want to look at how the market math works, most of that's in here (it gets called from the placeBet and sellBet endpoints in functions/.) Also contains in common/envs configuration for the different environments (i.e. prod, dev, Manifold for Teams instances.)

  • og-image/: The OpenGraph image generator; creates the preview images shown on Twitter/social media.

  • docs/: Manifold's public documentation that lives at https://docs.manifold.markets.

Contributing

Since we are just now open-sourcing things, we will see how things go. Feel free to open issues, submit PRs, and chat about the process on Discord. We would prefer small PRs that we can effectively evaluate and review -- maybe check in with us first if you are thinking to work on a big change.

By contributing to this codebase, you are agreeing to the terms of the Manifold CLA.

If you need additional access to any infrastructure in order to work on something (e.g. Vercel, Firebase) let us know about that on Discord as well.