# Materials Atlas

## Instructions to run
- Install dependicies and populate env variables
    - `npm install`
    - Create an .env file following the .env.example file. You will need values for neo4j and OpenAI
- Create the database and seed it
    - Follow instructions in the database directory
    - Return to this directory and run `npm run seed`
- Run the project
    - `npm run dev`
    - The app will be running on *localhost:3000*


## Explination of project structure
- src (source code for the website)
    - app (contains all the pages and server routes. For more information: [https://nextjs.org/docs/getting-started/project-structure](https://nextjs.org/docs/getting-started/project-structure))
    - components (contains all the react components used in the website)
    - constants (contains some hardcoded values from the database)
    - schemas (zod schemas for all the data types used in the app (Material, User, etc.) we use Zod type inference to generate types from these schemas as well)
    - types (contains code to generate types from the zod schema, also includes interfaces that cannot be modeled as schemas)
    - styles (contains the globals.css file used by React)
    - utils (contains some files for working with the database, used by the API routes)
    
