A boilerplate Next.js + Airtable project
I made this project with the purpose of getting acqauinted with Next.js and using the Airtable API. This project will get you some basics in place with a working example once you have created an Airtable Base.
https://nextjs-airtable-starter.vercel.app/
Deploy with Vercel
Start a new Airtable 'Base' from a template called 'Project Tracker' by following the link (if you do not already have an Airtable account, creating your free Airtable account will be included in the creation flow.. fricken beautiful!).
-
Run the following in terminal to clone the project folder with files:
git clone nextjs-airtable-starter
-
Install libraries:
npm install
-
Create a
.env.local
file in your project root or rename the included example.env.local.example
to.env.local
-
Open
.env.local
in your editor of choice and add your Airtable credentials. It'll look something like this:AIRTABLE_API_KEY=key************** AIRTABLE_BASE_ID=app**************
Visit your Airtable Account page to get your API key.
The Airtable Base ID can be found in the Airtable API documentation under 'RATE LIMITS' or 'AUTHENTICATION'.
-
Run the following in terminal:
npm run dev
That part is not covered here and is up to your discretion. Might I suggest Vercel?
-
Run the following in terminal:
npm run test
This will run a Jest test on the app.
jest-fetch-mock is included to mock the fetch call to Airtable.