This Startup Kit is written in TypeScript and uses Apollo Client + React + Material-UI + Parcel.
All the source files are located in the src folder which is divided into following directories:
client- all the files needed to setup Apollo Clientcomponents- components used in the app (also reusable ones)graphqlqueries- all the GraphQL queries used in the appmutations- all the GraphQL mutations used in the app
pages- components used as pages in routingtypes- some TypeScript types defined to be used as component property types
The test files are located in the tests directory.
To run project locally in development mode, first you have to create .env file in the root directory of the project. You shouldn't commit this file. File content should look like:
GRAPHQL_URL=http://localhost:4000Next you can run project by executing command:
npm run devIn your CI tool you have to define environment variables. Here is a list of variables:
GRAPHQL_URL=http://localhost:4000Next you have to build project by running command:
npm run buildTo test project, you have to run command:
npm run test