This repository has been archived by the owner on May 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 161
Added Vue example Front End #123
Open
adam-cowley
wants to merge
1
commit into
grand-stack:master
Choose a base branch
from
adam-cowley:web-vue
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
# GRANDstack Starter | ||
|
||
``` | ||
``` | ||
npx create-grandstack-app myNewApp | ||
``` | ||
|
||
|
@@ -18,7 +18,7 @@ _Hands On With The GRANDstack Starter Video_ | |
|
||
The easiest way to get started with the GRANDstack Starter is to create a Neo4j Sandbox instance and use the `create-grandstack-app` command line tool. | ||
|
||
(If you have a running Neo4j database on localhost via Neo4j Desktop or a Neo4j server installation, change the password in `api/.env`) | ||
(If you have a running Neo4j database on localhost via Neo4j Desktop or a Neo4j server installation, change the password in `api/.env` ) | ||
|
||
### 1. Create A Neo4j Instance | ||
|
||
|
@@ -46,31 +46,31 @@ After that you can return to setting up your app with the credentials from the p | |
|
||
### 2. Run the `create-grandstack-app` CLI | ||
|
||
``` | ||
``` | ||
npx create-grandstack-app myNewApp | ||
``` | ||
|
||
or with Yarn | ||
|
||
``` | ||
``` | ||
yarn create grandstack-app myNewApp | ||
``` | ||
|
||
![create grandstack app output](img/create-grandstack-app.png) | ||
|
||
This will create a new directory `myNewApp`, download the latest release of the GRANDstack Starter, install dependencies and prompt for your connection credentials for Neo4j to connect to the GraphQL API. | ||
This will create a new directory `myNewApp` , download the latest release of the GRANDstack Starter, install dependencies and prompt for your connection credentials for Neo4j to connect to the GraphQL API. | ||
|
||
### 3. Seed the database (optional) | ||
|
||
Make sure your application is running locally with `npm start` or `yarn start`, open another terminal and run | ||
Make sure your application is running locally with `npm start` or `yarn start` , open another terminal and run | ||
|
||
``` | ||
``` | ||
npm run seedDb | ||
``` | ||
|
||
or with Yarn | ||
|
||
``` | ||
``` | ||
yarn run seedDb | ||
``` | ||
|
||
|
@@ -86,20 +86,20 @@ The GRANDstack Starter is a monorepo that includes a GraphQL API application and | |
|
||
The root directory contains some global configuration and scripts: | ||
|
||
- `npm run start` and `npm run build` | ||
- ESLint (.eslintrc.json) for code linting | ||
- Prettier (.prettierrc.json) for code formatting | ||
- Git hooks for applying formatting on commit | ||
* `npm run start` and `npm run build` | ||
* ESLint (.eslintrc.json) for code linting | ||
* Prettier (.prettierrc.json) for code formatting | ||
* Git hooks for applying formatting on commit | ||
|
||
### [`/api`](./api) | ||
### [ `/api` ](./api) | ||
|
||
![](img/graphql-playground.png) | ||
|
||
This directory contains the GraphQL API application using Apollo Server and neo4j-graphql.js. | ||
|
||
- Change environment variable settings in `.env`: | ||
* Change environment variable settings in `.env` : | ||
|
||
``` | ||
``` | ||
# Use this file to set environment variables with credentials and configuration options | ||
# This file is provided as an example and should be replaced with your own values | ||
# You probably don't want to check this into version control! | ||
|
@@ -120,58 +120,68 @@ GRAPHQL_SERVER_PATH=/graphql | |
|
||
``` | ||
|
||
### [`/web-react`](./web-react) | ||
### [ `/web-react` ](./web-react) | ||
|
||
![](img/grandstack-app.png) | ||
|
||
The frontend React web application is found in this directory. | ||
|
||
It includes: | ||
|
||
- Material UI | ||
- React router | ||
- Apollo Client / React Hooks | ||
- Create React App | ||
* Material UI | ||
* React router | ||
* Apollo Client / React Hooks | ||
* Create React App | ||
|
||
### [`/web-angular`](./web-angular) | ||
### [ `/web-angular` ](./web-angular) | ||
|
||
![](web-angular/img/angular-ui.jpg) | ||
|
||
A UI built with [Angular](https://angular.io), [Apollo](https://www.apollographql.com/docs/angular/) and the [Clarity Design System](https://clarity.design) is also available. | ||
|
||
_Start the Angular UI server_ | ||
|
||
``` | ||
``` | ||
cd ./web-angular && npm start | ||
``` | ||
|
||
### [`/mobile_client_flutter`](./mobile_client_flutter) | ||
### [ `/mobile_client_flutter` ](./mobile_client_flutter) | ||
|
||
![](img/grandstack-flutter.png) | ||
|
||
A mobile client built with [Flutter](https://flutter.dev) which supports Android, iOS, and web. See the [README](./mobile_client_flutter/README.md) for detailed setup instructions. | ||
|
||
``` | ||
``` | ||
cd ./mobile_client_flutter && flutter run | ||
``` | ||
|
||
### [`/web-react-ts`](./web-react-ts) | ||
### [ `/web-react-ts` ](./web-react-ts) | ||
|
||
A UI built with [CRA](https://reactjs.org/docs/create-a-new-react-app.html) | ||
|
||
_Start the React dev server_ | ||
|
||
``` | ||
``` | ||
cd ./web-react-ts && npm start | ||
``` | ||
|
||
### [ `/web-vue` ](./web-vue) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add a line here that it can only be manually selected until the CLI is updated. |
||
|
||
A UI built with [Vue.js](https://vuejs.org/), [vue-apollo](https://apollo.vuejs.org/) and [vue-material](https://vuematerial.io/). | ||
|
||
_Start the Vue dev server_ | ||
|
||
``` | ||
cd web-vue && npm run serve | ||
``` | ||
|
||
## Deployment | ||
|
||
### Netlify | ||
|
||
This monorepo can be deployed to Netlify. The frontend application will be served over Netlify's CDN and the GraphQL API will be provisioned as a serverless GraphQL API lambda function deployed to AWS (via Netlify). A netlify.toml file is included with the necessary build configurations. The following environment variables must be set in Netlify (either via the Netlify web UI or via the command line tool) | ||
|
||
``` | ||
``` | ||
NEO4J_URI | ||
NEO4J_USER | ||
NEO4J_PASSWORD | ||
|
@@ -181,12 +191,12 @@ See the "Hands On With The GRANDStack Starter" video linked at the beginning of | |
|
||
### Vercel | ||
|
||
Vercel can be used with monorepos such as grand-stack-starter. [`vercel.json`](https://github.com/grand-stack/grand-stack-starter/blob/master/vercel.json) defines the configuration for deploying with Vercel. | ||
Vercel can be used with monorepos such as grand-stack-starter. [ `vercel.json` ](https://github.com/grand-stack/grand-stack-starter/blob/master/vercel.json) defines the configuration for deploying with Vercel. | ||
|
||
1. get [vercel cli](https://vercel.com/download) | ||
2. Set the vercel secrets for your Neo4j instance: | ||
|
||
``` | ||
``` | ||
vercel secret add grand_stack_starter_neo4j_uri bolt://<YOUR_NEO4J_INSTANCE_HERE> | ||
vercel secret add grand_stack_starter_neo4j_user <YOUR_DATABASE_USERNAME_HERE> | ||
vercel secret add grand_stack_starter_neo4j_password <YOUR_DATABASE_USER_PASSWORD_HERE> | ||
|
@@ -198,13 +208,13 @@ vercel secret add grand_stack_starter_neo4j_password <YOUR_DATABASE_USER_PASSWOR | |
|
||
You can quickly start via: | ||
|
||
``` | ||
``` | ||
docker-compose up -d | ||
``` | ||
|
||
If you want to load the example DB after the services have been started: | ||
|
||
``` | ||
``` | ||
docker-compose run api npm run seedDb | ||
``` | ||
|
||
|
Submodule web-vue
added at
62cb45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we could reduce the diff size by taking out these extra spaces, don't know if this is a standard format, maybe markdown? on save that you could update somewhere or if this is an intentional action. If there is a reason behind it no worries, otherwise we could strip down the PR to just the essential README update.
If there is a decent reason behind it and it is a markdown formatting option, add it into the PR as a config option.