This document is for developers of https://www.oceanics.io, a web application for high-performance computing and visualization.
Software is provided by Oceanicsdotio LLC under the MIT license as is, with no warranty or guarantee.
The top-level directory contains this README.md
along with configuration files and scripts for linting, compiling, bundling, and deploying.
The site is hosted on Netlify. The build process is setup in netlify.toml
and makefile
. Local testing requires the Netlify CLI, which is installed from the parent module.
We use yarn
to manage code. The environment configuration lives in .yarnrc.yml
, and version controlled plugins in .yarn
. Shared dependencies are defined in package.json
.
The app
directory contains our NextJS web page. Client interaction is through React Hooks and browser APIs.
Netlify serverless functions
provide our backend. These are single purpose endpoints that support secure data access and processing.
You can run the Neo4j database manager in a Neo4j container image, or use a managed service that supports cypher.
Running make out
will build packages, and make dev
will build and run a local API and web server.
Running make test
populates the connected database with the examples described in specification.yaml
.
These environment variables must be present for things to work:
NEO4J_HOSTNAME
: the hostname for Neo4j instanceNEO4J_ACCESS_KEY
: the password for Neo4j instanceSPACES_ACCESS_KEY
: for accessing storageSPACES_SECRET_KEY
: for accessing storageSTORAGE_ENDPOINT
: the region and host for cloud storageBUCKET_NAME
: the prefix to the storage endpointSERVICE_PROVIDER_API_KEY
: Provider API key for registering accountsJWT_SIGNING_KEY
: A signing key for e-mail verificationSERVICE_ACCOUNT_USERNAME
: email for service accountSERVICE_ACCOUNT_PASSWORD
: password for service accountSERVICE_ACCOUNT_SECRET
: string for salting service key passwordNEXT_PUBLIC_MAPBOX_ACCESS_TOKEN
: mapbox access token for map interface
Logging is through Logtail for JavaScript. If you want to get performance metrics from the log database, you can use a query like:
SELECT
count(*) as requests,
JSONExtract(json, 'event', 'httpMethod','Nullable(String)') AS method,
JSONExtract(json, 'event', 'path','Nullable(String)') AS function,
avg(JSONExtract(json, 'duration','INT')) AS duration
FROM {{source}}
WHERE
method IS NOT NULL
GROUP BY method, function
Some tips that could help save some time...
- Neo4j routing error: Likely that the URL or password for the database instance are out of date in the web UI. Can be applied from the commandline, by updating the
.env
to match the.envrc
.