Manifold Markets: A market for every question
Go to file
2022-04-24 17:05:30 -07:00
common remove fees for sold shares 2022-04-22 12:26:47 -05:00
functions Remove workspace-specific lockfiles (#95) 2022-04-24 16:36:42 -05:00
og-image Update SEO for non-binary markets 2022-02-17 18:34:17 -06:00
web Fix generation of create market placeholder text (#92) 2022-04-24 17:14:20 -05:00
.firebaserc Allow admins to see private-users info 2022-01-24 00:48:10 -06:00
.gitignore Add create market button (#79) 2022-04-19 08:15:05 -06:00
.prettierrc move prettier config to top level 2022-01-10 17:44:42 -06:00
firebase.json Reapply Manifold for Teams config changes (#54) 2022-02-26 23:29:33 -08:00
firestore.indexes.json Merge Manifold for Teams infra into main codebase (#61) 2022-03-08 18:43:30 -08:00
firestore.rules Track latency of feed and portfolio page. 2022-04-21 01:00:08 -05:00
LICENSE.md Choose MIT license 2022-04-02 12:01:23 -07:00
package.json Yarn workspaces (#42) 2022-02-01 15:25:51 -06:00
README.md Flesh out main README 2022-04-24 17:05:30 -07:00
yarn.lock Upgrade some packages 2022-03-29 23:55:47 -05:00

Manifold Markets

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

Getting started

All dependencies for everything are managed using Yarn. (Take care to use Yarn 1.x rather than Yarn 2 for now.) Install it and run yarn to install them. Then if you want to run the website locally cd into web and run yarn dev:dev. See web/README.md for more details on hacking on the client in particular.

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

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.