My Library Frontend
Technologies used are:
- Next js - react js service side framework. More info: [next js](https://nextjs.org/docs/getting-started)
- Material ui - component library inspired by google. More info: [material-ui](https://mui.com/material-ui/getting-started/installation/)
- Typescript - superset of javascript that provides types when writing javascript code. More info: [typescript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
- GraphQl code generator - graphql code generator that syncs with backend graphql endpoint and generates schemas for frontend use. More info: [codegen](https://www.graphql-code-generator.com/docs/getting-started)
- Download or clone the repository
- Run
yarn install
- Go to the root directory of the application
- Create a
.env
file. - Copy the contents of
env.sample
file - Change
NEXT_PUBLIC_GRAPHQL_ENDPOINT
value to point to local instance of the backend server eg:NEXT_PUBLIC_GRAPHQL_ENDPOINT=http://localhost:3000/graphql/
- Run
yarn dev
and navigate tohttp://localhost:3000
to view the app
- Go to the root directory of the application,
- Open the graphql folder. You will see two files:
- mutations - where mutation queries are contained.
- queries - where queries are contained.
- After adding a query or a mutation in either of the folders. Navigate to the root directory and run
yarn codegen