91bec9c996
* Referrals page added to sidebar; useSaveReferral; InfoBox * text color * eslint * migrate useUsers hook to react-query (#674) * Remove bet button from free response comments * Make answer replies more closely spaced together * Host Ida and Alex's MTG Guesser game (#656) * Copy over code from Mtg Guesser * Run Prettier * CSS Tweaks: Hover feedback, button positioning * Hide all but counterspell & burn, for now * Move to /mtg directory * Fix prettierignore * smaller jsons (#673) limited burn to only red cards and also added limited json files to only have fields needed to play * Add Ida's tweak to card position Co-authored-by: marsteralex <bob.masteralex@gmail.com> * Adjust card positioning * Make the select screen index.html * Remove other guessing games * Remove alternate versions; add Alex's email * Remove unused jsons * Small FR comments tweaks * Spacing tweak * Changing manalinks table UI (#665) From table to card view * Fix comment spacing on non-FR * Move "Send M$" lower in sidebar More list. * Move leaderboards up in mobile nav * eslint * prettier Co-authored-by: Sinclair Chen <abc.sinclair@gmail.com> Co-authored-by: James Grugett <jahooma@gmail.com> Co-authored-by: Austin Chen <akrolsmir@gmail.com> Co-authored-by: marsteralex <bob.masteralex@gmail.com> Co-authored-by: ingawei <46611122+ingawei@users.noreply.github.com> |
||
---|---|---|
.. | ||
components | ||
hooks | ||
lib | ||
pages | ||
public | ||
.eslintrc.js | ||
.gitignore | ||
.prettierignore | ||
.yarnrc | ||
get-manalink-url.ts | ||
next-env.d.ts | ||
next-sitemap.js | ||
next.config.js | ||
package.json | ||
postcss.config.js | ||
README.md | ||
tailwind.config.js | ||
tsconfig.json |
Manifold Markets web app
Getting started
To run the development server, install Yarn 1.x, and then in this directory:
yarn
to install all dependenciesyarn dev:dev
starts a development web server, pointing at the development database- 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.)
Tech stack
Manifold's website uses Next.js, which is a React-based framework that handles concerns like routing, builds, and a development server. It's also integrated with Vercel, which is responsible for hosting the site and providing some other production functionality like serving the API. The application code is written exclusively in Typescript. Styling is done via CSS-in-JS in the React code and uses Tailwind CSS classes.
Building and deployment
Vercel's GitHub integration monitors the repository and automatically builds (next build
) and deploys both the main
branch (to production) and PR branches (to ephemeral staging servers that can be used for testing.)
Parts of the file structure that directly map to HTTP endpoints are organized specially per Next.js's prescriptions:
public/
These are static files that will be served by Next verbatim.
pages/
These are components that Next's router 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. You should
look in here or in components/
to find any specific piece of UI you are interested in working on.
pages/api/
Modules under this route are specially interpreted by Next/Vercel as functions that will be hosted by Vercel. This is where the public Manifold HTTP API lives.
Contributing
Please format the code using Prettier; you can run yarn format
to invoke it manually. It also runs by
default as a pre-commit Git hook thanks to the pretty-quick package. You may wish to use some kind of fancy editor
integration to format it in your editor.
Developer Experience TODOs
- Prevent git pushing if there are Typescript errors?