This atlas about ITC (Faculty of Geo-information Science and Earth Observation | University of Twente) and its global activities is a Next.js project.
First, install the required dependencies using node:
npm i
Load and create the required static data sets with:
npm run setup-data
Note The
DATABASE_URL
environment variable for local development needs to be provided in a.env.local
file.
The website uses a PostgreSQL
database via the ORM prisma.
The schema names follow the prisma naming conventions: mainly, singular form and PascalCase for models and camelCase for fields.
To run single queries (a module as .ts file) run:
npx dotenv -e .env.local -- npx tsx <pathToQueryFile>
To seed the database run:
npx prisma db seed
To push the state of the Prisma schema file to the database without using migrations (usually used during prototyping and local development) run:
npx dotenv -e .env.local -- npx prisma db push
To open up Prisma Studio to inspect and edit the data via Prisma's user interface run:
npx dotenv -e .env.local -- npx prisma studio
Finally, run the development server (to check out the current state or start developing):
npm run dev
Then open http://localhost:3000 in your browser.
To start storybook (the component library) for development run:
npm run storybook
Visit storybook.js.org/docs/ for more Information on how to use storybook.js with react.
Note that building the next website will fail as long as there are unresolved TypeScript errors. You can check for possible TypeScript errors with:
npm run type-check
If no TypeScript errors are thrown, the site can be built with:
npm run build
And eventually served in production mode with:
npm run start
Run jest tests with:
npm run test