This is a default React Front-end.
- Standard react + typescript
- Routing, private and public routes
- Context api en hooks
- Folder structure
- Styling (SASS)
- Default requests (REST)
- Authentication
- Some example components
GraphQL
The default react app is setup for an Laravel Rest API. To use GraphQL instead of rest use Apollo GrapQL. Click the following link to get started: https://www.apollographql.com/docs/react/get-started/
Installation
- Make sure you have node and npm installed
- Clone the project repo to your local device
- Run
npm install
- Copy .env.example and name the copy to .env.local
Development
- Run
npm start
Production
- Run
npm run build
- Point the server to the build folder
All content is in the src folder
- /assets
- /icons
- /images
- /components
- All react components should be in this folder
- Components should not have any direct connection to the api
- /contexts
- All react context are in this folder
- /models
- Contains a base Model Class a well as all the models that extend it
- /requests
- All request types are in this folder
- /styles
- Styles are in this folder as .scss files
- All style sheets need to be imported either in styles.scss or in a file that's imported in styles.scss