To build this project or to run it locally, you need:
Before anything else, you need to properly clone the project (including large files), install dependencies, and generate the map tileset:
- Clone the project:
git clone https://github.com/grounding-ai/web-application.git grounding-ai
- Open the project:
cd grounding-ai-map
- Download the large base map file through Git LFS:
git lfs pull
- Install Node.js dependencies:
npm install
- Run various scripts to generate the public assets:
npm run make-all
At this point:
- You can run the development version of the project:
npm run app-dev
- You can build the project version of the project:
npm run app-build
(outputs the publishable web app in the./dist
folder)
The feedbacks are stored in an Airtable base, and we use a Netlify Function to feed the base through a simple API route.
If you want to create a new Airtable base, you will need the following fields:
verbatim | url | page type | topic id | date | dev |
---|---|---|---|---|---|
long text | URL | string | string | ISO date string | optional boolean |
There are two solutions to locally test the feedbacks form:
- You can specify a distant instance of the Netlify Function written at
./netlify/functions/create-record.mts
in aVITE_FUNCTIONS_BASE_URL
environment variable - You can specify the
AIRTABLE_API_KEY
andAIRTABLE_BASE_ID
environment variables so that the function can run locally, setVITE_FUNCTIONS_BASE_URL
tohttp://localhost:9999/.netlify/functions
, and serve the function locally by runningnpm run api-dev