What will the back-end look like?
Architecture
- UI - React.js front-end using Apollo GraphQL queries & mutations
- API - Node.js server, exposing an Apollo GraphQL API
- Database - Neo4j (either hosted remotely or locally within a Docker container)
All three aspects of the application will be hosted within Docker containers for portability and ease of use.
What functionality does it need for MVP?
- React front-end
- Queries
- List all resources
- List all concepts in a resource (with their nested relationships)
- Mutations
- Create a resource
- Add a root concept (with a description)
- Add nested concepts (with a description)
- Back-end
- Exposes a GraphQL API for querying the database
- Get all Resources
- Get all the Concepts inside a Resource (recursively)
- Get all the Concepts inside a Concept (recursively)
- Exposes a GraphQL API for mutating the database
- Create a Resource
- Create a Concept
- Create a Description
- Link a Description to a Concept
- Link a Concept to a Resource
- Link a Concept to a Concept
- Fills the database with seed data
docker-compose run api npm run seedDb
- Connects to the Neo4j database
What functionality might it need post-MVP?
- Add key-value pairs to edges (edge parameters) to store custom data about the link
- Example: (Concept)-[CONTAINS (not examinable)]-(CONCEPT)
- Adjusting the query to filter according to CONTAINS parameter
- Example: show ONLY examinable concepts
- Versus showing ALL concepts
- Is this supported by GraphQL? If not, how do we work around that?
- ? Making a Describable interface, which is implemented by Resource and Concepts
- Instead of having messy bi-directional relations between Descriptions nodes and Resource / Concept nodes
- If not, we could just store Resources' descriptions in a String
What's on the hit list?
Core
- [x] Figure out how to nest Concepts with GraphQL + Cypher