Website for the Design, Technology, and Research (DTR) program at Northwestern University. View live at http://dtr.northwestern.edu/.
- Make sure you have Node.js and pnpm (recommend install with corepack) installed.
- Clone the repository, and change the
.env.examplefile to.env, filling in the required environment variables. - Run
pnpm installto install packages.
To develop locally, run pnpm dev and navigate to localhost:3000 in your browser. Changes in code will automatically cause the website to be re-built and update the browser.
To test a production build:
pnpm build
pnpm startOnce started, navigate to localhost:8080 in your browser.
We use DigitalOcean's App Platform to host https://dtr.northwestern.edu/. It is configured to re-build the website whenever changes are pushed to the main branch of this repository. Because of that, we recommend you create a new branch when you have changes that you want to make, and create a pull request to merge into main once they are completed and tested.
The website implements a two-tier caching system to minimize Airtable API usage:
- Data Caching: Airtable table data is cached using Next.js
use cachewith automatic revalidation based oncacheLife(new feature from Next.js 16, default 12 hours). - Image Caching: Images are downloaded once from Airtable and cached in Cloudflare R2 Bucket with hash-based invalidation and long-term caching headers.