diff --git a/README.md b/README.md index 7416d3bd..56dceae0 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,9 @@ Operations with complicated contracts (e.g. buying shares) are provided in a sep - `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.) +- `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. @@ -34,7 +35,9 @@ Also: Our docs are currently in [a separate repo](https://github.com/manifoldmar ## 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][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. +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][discord]. We would prefer [small PRs][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. + +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. [vercel]: https://vercel.com/ [jamstack]: https://jamstack.org/ @@ -45,3 +48,4 @@ Since we are just now open-sourcing things, we will see how things go. Feel free [cloud-firestore]: https://firebase.google.com/docs/firestore [cloud-functions]: https://firebase.google.com/docs/functions [small-prs]: https://google.github.io/eng-practices/review/developer/small-cls.html +[discord]: https://discord.gg/eHQBNBqXuh diff --git a/web/README.md b/web/README.md index 8b3e65db..2bfd5056 100644 --- a/web/README.md +++ b/web/README.md @@ -2,13 +2,15 @@ ## Getting started -To run the development server, install [Yarn][yarn], and then in this directory: +To run the development server, install [Yarn 1.x][yarn], and then in this directory: 1. `yarn` to install all dependencies 2. `yarn dev:dev` starts a development web server, pointing at the development database 3. Your site will be available on http://localhost:3000 -Check package.json for other command-line tasks. (e.g. `yarn dev` will point the development server at the prod database. `yarn emulate` will run against a local emulated database, if you are serving it via `yarn serve` from the [`functions/` package][functions-readme].) +Check package.json for other command-line tasks. (e.g. `yarn dev` will point the development server at the prod +database. `yarn emulate` will run against a local emulated database, if you are serving it via `yarn serve` from the +[`functions/` package][functions-readme].) ## Tech stack @@ -24,16 +26,17 @@ branch (to production) and PR branches (to ephemeral staging servers that can be Parts of the file structure that directly map to HTTP endpoints are organized specially per Next.js's prescriptions: -### /public +### public/ These are static files that will be [served by Next verbatim][next-static-files]. -### /pages +### pages/ These are components that [Next's router][next-pages] is aware of and interprets as page roots per their filename, -e.g. the React component in pages/portfolio.tsx is rendered on the user portfolio page at /portfolio. +e.g. the React component in pages/portfolio.tsx is rendered on the user portfolio page at /portfolio. You should +look in here or in `components/` to find any specific piece of UI you are interested in working on. -### /pages/api +### pages/api/ Modules under this route are specially interpreted by Next/Vercel as [functions that will be hosted by Vercel][vercel-functions]. This is where the public Manifold HTTP API lives. @@ -52,7 +55,7 @@ integration][prettier-integrations] to format it in your editor. [nextjs]: https://nextjs.org [vercel]: https://vercel.com [tailwind]: https://tailwindcss.com -[yarn]: https://yarnpkg.com +[yarn]: https://classic.yarnpkg.com/lang/en/docs/install/ [prettier]: https://prettier.io [prettier-integrations]: https://prettier.io/docs/en/editors.html [next-static-files]: https://nextjs.org/docs/basic-features/static-file-serving