You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-3Lines changed: 36 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,29 @@
1
1
# README
2
2
3
-
test webhook trigger 6
3
+
## Introduction
4
+
5
+
BookWorm is a full stack application allowing users to query bibliometric data, sourced from [OpenAlex's data snapshot](https://docs.openalex.org/download-all-data/openalex-snapshot), and provides the option of viewing the resulting data in a graph-based data visualization.
6
+
7
+
On opening, users are presented with a blank canvas.
8
+
9
+

10
+
11
+
In the top left corner is a button to open the "Query Panel", which utilizes GraphiQL to provide an embedded GraphQL interface for creating queries, as well as documentation for the structure of the graph.
12
+
13
+

14
+
15
+
If the query is valid and successful, the API will return a JSON object that mirrors the structure of the request.
16
+
17
+

18
+
19
+
On closing the query panel, users can view and interact with the generated graph visualization.
20
+
21
+

22
+
23
+

24
+
25
+
26
+
This uses a [GraphQL API](https://graphql.org/learn/queries/) for the query structure.
4
27
5
28
## Production Setup
6
29
@@ -16,7 +39,7 @@ Quickstart:
16
39
17
40
## Development Setup
18
41
19
-
The recommended development setup is to run the rails development server and the react npm development server independently.
42
+
To run a local development setup, you can run the rails development server and the react npm development server independently.
20
43
21
44
Requires a working installation of Postgres, npm, and bundler, and Ruby 3.2.2.
22
45
- If you do not have a ruby version manager, I recommend `rbenv`.
@@ -44,7 +67,7 @@ In the `/react` folder:
44
67
45
68
### Automated Tests
46
69
47
-
This repository uses RSpec for testing the rails application.
70
+
This repository uses RSpec for testing the rails application. (These need to be reworked as they haven't been maintained in recent changes).
48
71
49
72
In the `/rails` folder:
50
73
- Run `rspec` to run all of the rspec tests, or `rspec spec/path/to/*_spec.rb` to run a specific test.
@@ -54,3 +77,13 @@ Coverage reports are generated using [simplecov](https://github.com/simplecov-ru
54
77
The test suite is configured to use [vcr](https://github.com/vcr/vcr) for tests that interact with any external APIs, primarily the OpenAlex API. If you encounter errors related to `vcr` while running tests, try deleting the recorded 'cassette' files in `spec/fixtures/vcr_cassettes/` and running `rspec` again to re-record them.
55
78
56
79
Planning on trying Jest for testing front end. WIP.
80
+
81
+
## Data Source
82
+
83
+
Data is sourced from [OpenAlex's data snapshot](https://docs.openalex.org/download-all-data/openalex-snapshot), which also provides information about the structure of the source data and some basic instructions for uploading to a relational database, such as the Postgres database used in BookWorm.
84
+
85
+
There are rake tasks in `/rails/lib/tasks/` for reading from CSV files to the database - this process could be optimized by running rake tasks in parallel or making adjustments to the insertion batch sizes in each file.
86
+
87
+
## Data Visualization
88
+
89
+
The data visualization is generated using a combination of [React Flow](https://reactflow.dev/) for rendering nodes and edges, and [D3](https://d3js.org/) for calculating node positions.
0 commit comments