Update readme + add screenshot
This commit is contained in:
parent
891af5f2ba
commit
68ccb7c18d
79
README.md
79
README.md
|
@ -1,23 +1,26 @@
|
||||||
[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/grand-stack/grand-stack-starter&env=NEO4J_USER&env=NEO4J_URI&env=NEO4J_PASSWORD)
|
# PhotoView
|
||||||
|
|
||||||
# GRANDstack Starter
|
> NOTE: This software should not be used in production yet, since it is in early development, and still contains security holes.
|
||||||
|
|
||||||
This project is a starter for building a [GRANDstack](https://grandstack.io) (GraphQL, React, Apollo, Neo4j Database) application. There are two components to the starter, the UI application (a React app) and the API app (GraphQL server).
|
![screenshot](/screenshot.png)
|
||||||
|
|
||||||
[![Hands On With The GRANDstack Starter](http://img.youtube.com/vi/rPC71lUhK_I/0.jpg)](http://www.youtube.com/watch?v=rPC71lUhK_I "Hands On With The GRANDstack Starter")
|
## Aim of the project
|
||||||
|
|
||||||
## Quickstart
|
The aim of this project is to make a simple and user-friendly photo gallery application,
|
||||||
|
that is easy to host on a personal server, to easily view the photos located on that server.
|
||||||
|
|
||||||
### Neo4j
|
## Main features
|
||||||
|
> The software is still in early development, and many of the following features, have not been implemented yet.
|
||||||
|
|
||||||
You need a Neo4j instance, e.g. a [Neo4j Sandbox](http://neo4j.com/sandbox), a local instance via [Neo4j Desktop](https://neo4j.com/download), [Docker](http://hub.docker.com/_/neo4j) or a [Neo4j instance on AWS, Azure or GCP](http://neo4j.com/developer/guide-cloud-deployment) or [Neo4j Cloud](http://neo4j.com/cloud)
|
- **Closely tied to the file system**. The website presents the images found on the local filesystem of the server, directories are mapped to albums.
|
||||||
|
- **User management**. Each user is created along with a path on the local filesystem, photos within that path can be accessed by that user.
|
||||||
|
- **Photo sharing**. Photos and albums can easily be shared with other users or publicly with a unique URL.
|
||||||
|
- **Made for photography**. The website is ment as a way to present photographies, and thus supports **RAW** file formats, and **EXIF** parsing.
|
||||||
|
|
||||||
For schemas using the `@cypher` directive (as in this repo) via [`neo4j-graphql-js`](https://github.com/neo4j-graphql/neo4j-graphql-js), you need to have the [APOC library](https://github.com/neo4j-contrib/neo4j-apoc-procedures) installed, which should be automatic in Sandbox, Cloud and is a single click install in Neo4j Desktop. If when using the Sandbox / cloud you encounter an issue where an error similar to `Can not be converted to long: org.neo4j.kernel.impl.core.NodeProxy, Location: [object Object], Path: users` appears in the console when running the React app, try installing and using Neo4j locally instead.
|
## Setup development environment
|
||||||
|
> This projected is based of the [GrandStack](https://grandstack.io/) starter project.
|
||||||
|
|
||||||
#### Sandbox setup
|
### Local setup
|
||||||
A good tutorial can be found here: https://www.youtube.com/watch?v=rPC71lUhK_I
|
|
||||||
|
|
||||||
#### Local setup
|
|
||||||
1. [Download Neo4j Desktop](https://neo4j.com/download/)
|
1. [Download Neo4j Desktop](https://neo4j.com/download/)
|
||||||
2. Install and open Neo4j Desktop.
|
2. Install and open Neo4j Desktop.
|
||||||
3. Create a new DB by clicking "New Graph", and clicking "create local graph".
|
3. Create a new DB by clicking "New Graph", and clicking "create local graph".
|
||||||
|
@ -55,55 +58,9 @@ This will start the GraphQL API in the foreground, so in another terminal sessio
|
||||||
cd ./ui && npm start
|
cd ./ui && npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
![](ui/img/default-app.png)
|
The site can now be accessed at [localhost:1234](http://localhost:1234).
|
||||||
|
And the graphql playground at [localhost:4001/graphql](http://localhost:4001/graphql)
|
||||||
See [the project releases](https://github.com/grand-stack/grand-stack-starter/releases) for the changelog.
|
|
||||||
|
|
||||||
## Deployment
|
|
||||||
|
|
||||||
### Zeit Now v2
|
|
||||||
|
|
||||||
Zeit Now v2 can be used with monorepos such as grand-stack-starter. [`now.json`](https://github.com/grand-stack/grand-stack-starter/blob/master/now.json) defines the configuration for deploying with Zeit Now v2.
|
|
||||||
|
|
||||||
1. Set the now secrets for your Neo4j instance:
|
|
||||||
|
|
||||||
```
|
|
||||||
now secret add NEO4J_URI bolt+routing://<YOUR_NEO4J_INSTANCE_HERE>
|
|
||||||
now secret add NEO4J_USER <YOUR_DATABASE_USERNAME_HERE>
|
|
||||||
now secret add NEO4J_PASSWORD <YOUR_DATABASE_USER_PASSWORD_HERE>
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Run `now`
|
|
||||||
|
|
||||||
### Zeit Now v1
|
|
||||||
|
|
||||||
1. Run `now` in `/api` and choose `package.json` when prompted.
|
|
||||||
1. Set `REACT_APP_GRAPHQL_API` based on the API deployment URL from step 1 in `ui/.env`
|
|
||||||
1. Run `now` in `/env` and choose `package.json` when prompted.
|
|
||||||
|
|
||||||
## Docker Compose
|
## Docker Compose
|
||||||
|
|
||||||
To use docker-compose to quickly start please make the following changes
|
> Not written yet
|
||||||
|
|
||||||
api/.env:
|
|
||||||
```
|
|
||||||
NEO4J_URI=bolt://neo4j:7687
|
|
||||||
NEO4J_USER=neo4j
|
|
||||||
NEO4J_PASSWORD=letmein
|
|
||||||
GRAPHQL_LISTEN_PORT=4000
|
|
||||||
GRAPHQL_URI=http://api:4000
|
|
||||||
```
|
|
||||||
|
|
||||||
Now 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
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
This project is licensed under the Apache License v2.
|
|
||||||
Copyright (c) 2018 Neo4j, Inc.
|
|
Binary file not shown.
After Width: | Height: | Size: 1.8 MiB |
Loading…
Reference in New Issue