manifold/web
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
..
components Add more stats. Fix timezone. Group retention and new user retention 2022-09-19 18:41:24 -05:00
hooks daily movers: filter out numeric markets 2022-09-19 16:29:21 -05:00
lib Fix console errors from svg non-camelcase attributes 2022-09-18 15:55:39 -05:00
pages Add more stats. Fix timezone. Group retention and new user retention 2022-09-19 18:41:24 -05:00
posts Adds comments to posts (#844) 2022-09-07 23:09:20 +01:00
public WIP: add artist category (#866) 2022-09-19 18:10:14 -07:00
.eslintrc.js Add eslint plugin to remove unused imports 2022-08-26 23:49:03 -05:00
.gitignore Run a ts type checker in parallel with nextjs dev process 2021-12-19 15:26:59 -06:00
.prettierignore Host Ida and Alex's MTG Guesser game (#656) 2022-07-20 16:57:51 -07:00
.yarnrc when adding package, don't put ^ before version (#645) 2022-07-13 15:14:06 -07:00
get-manalink-url.ts initial commit for manalinks UI improvements (#642) 2022-07-13 16:57:34 -05:00
next-env.d.ts upgrade nextjs version 2021-12-15 23:49:38 -06:00
next.config.js update /about redirect 2022-09-17 14:46:59 -05:00
package.json %mentions for embedding contract card, take 2 (#884) 2022-09-15 23:37:17 -07:00
postcss.config.js Prettier: no semi, spaces 2, single quote, trailing comma 2021-12-02 17:49:46 -06:00
README.md A couple additions to help newbies out (#104) 2022-04-27 13:15:14 -07:00
tailwind.config.js Inga/bettingfix embedfix (#885) 2022-09-15 19:41:25 -05:00
tsconfig.json Typescript project references take 2 (#586) 2022-06-27 13:32:24 -07:00

Manifold Markets web app

Getting started

To run the development server, install Yarn 1.x, 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.)

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?