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.)
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.
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:
These are static files that will be served by Next verbatim.
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.
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.