Skip to content

jakoblistabarth/itc-atlas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ITC Atlas

This atlas about ITC (Faculty of Geo-information Science and Earth Observation | University of Twente) and its global activities is a Next.js project.

Getting Started 🚀

1. Dependencies

First, install the required dependencies using node:

npm i

2. Static data sources

Load and create the required static data sets with:

npm run setup-data

3. The database

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

4. Starting the next.js app

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.

UI & Map Components 🗺

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.

Building the website 📦

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

Testing 🧪

Run jest tests with:

npm run test

About

Atlas of ITC, implemented with react and next.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages