Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/administration/administration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Harper provides rapid horizontal scaling capabilities through [node cloning func

Harper provides robust capabilities for analytics and observability to facilitate effective and informative monitoring:

- Analytics provides statistics on usage, request counts, load, memory usage with historical tracking. The analytics data can be [accessed through querying](../technical-details/reference/analytics).
- Analytics provides statistics on usage, request counts, load, memory usage with historical tracking. The analytics data can be [accessed through querying](../reference/analytics).
- A large variety of real-time statistics about load, system information, database metrics, thread usage can be retrieved through the [`system_information` API](../developers/operations-api/system-operations).
- Information about the current cluster configuration and status can be found in the [cluster APIs](../developers/operations-api/clustering).
- Analytics and system information can easily be exported to Prometheus with our [Prometheus exporter component](https://github.com/HarperDB-Add-Ons/prometheus_exporter), making it easy visualize and monitor Harper with Graphana.
Expand Down
4 changes: 2 additions & 2 deletions docs/deployments/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ Harper's logger supports defining multiple logging configurations for different

`logging.external`

The `logging.external` section can be used to define logging for all external components that use the [`logger` API](../technical-details/reference/globals). For example:
The `logging.external` section can be used to define logging for all external components that use the [`logger` API](../reference/globals). For example:

```yaml
logging:
Expand Down Expand Up @@ -1233,7 +1233,7 @@ The name of the component. This will be used to name the folder where the compon

`package` - _Type_: string

A reference to your [component](../technical-details/reference/components/applications#adding-components-to-root) package. This could be a remote git repo, a local folder/file or an NPM package. Harper will add this package to a package.json file and call `npm install` on it, so any reference that works with that paradigm will work here.
A reference to your [component](../reference/components/applications#adding-components-to-root) package. This could be a remote git repo, a local folder/file or an NPM package. Harper will add this package to a package.json file and call `npm install` on it, so any reference that works with that paradigm will work here.

Read more about npm install [here](https://docs.npmjs.com/cli/v8/commands/npm-install)

Expand Down
6 changes: 3 additions & 3 deletions docs/developers/applications/data-loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dataLoader:
files: 'data/*.json'
```

The Data Loader is an [Extension](../../technical-details/reference/components#extensions) and supports the standard `files` configuration option.
The Data Loader is an [Extension](../../reference/components#extensions) and supports the standard `files` configuration option.

## Data File Format

Expand Down Expand Up @@ -176,6 +176,6 @@ rest: true

## Related Documentation

- [Built-In Components](../../technical-details/reference/components/built-in-extensions)
- [Extensions](../../technical-details/reference/components/extensions)
- [Built-In Components](../../reference/components/built-in-extensions)
- [Extensions](../../reference/components/extensions)
- [Bulk Operations](../operations-api/bulk-operations) - For loading data via the Operations API
6 changes: 3 additions & 3 deletions docs/developers/applications/defining-schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type Brand @table @export {
}
```

Once this is defined we can use the `brand` attribute as a [property in our product instances](../../technical-details/reference/resources/) and allow for querying by `brand` and selecting brand attributes as returned properties in [query results](../rest).
Once this is defined we can use the `brand` attribute as a [property in our product instances](../../reference/resources/) and allow for querying by `brand` and selecting brand attributes as returned properties in [query results](../rest).

Again, the foreign key may be a multi-valued array (array of keys referencing the target table records). For example, if we had a list of features that references a Feature table:

Expand Down Expand Up @@ -241,7 +241,7 @@ The `@sealed` directive specifies that no additional properties should be allowe

### Defined vs Dynamic Schemas

If you do not define a schema for a table and create a table through the operations API (without specifying attributes) or studio, such a table will not have a defined schema and will follow the behavior of a ["dynamic-schema" table](../../technical-details/reference/dynamic-schema). It is generally best-practice to define schemas for your tables to ensure predictable, consistent structures with data integrity.
If you do not define a schema for a table and create a table through the operations API (without specifying attributes) or studio, such a table will not have a defined schema and will follow the behavior of a ["dynamic-schema" table](../../reference/dynamic-schema). It is generally best-practice to define schemas for your tables to ensure predictable, consistent structures with data integrity.

### Field Types

Expand All @@ -257,7 +257,7 @@ Harper supports the following field types in addition to user defined (object) t
- `Any`: Any primitive, object, or array is allowed
- `Date`: A Date object
- `Bytes`: Binary data as a Buffer or Uint8Array
- `Blob`: Binary data as a [Blob](../../technical-details/reference/blob), designed for large blocks of data that can be streamed. It is recommend that you use this for binary data that will typically be larger than 20KB.
- `Blob`: Binary data as a [Blob](../../reference/blob), designed for large blocks of data that can be streamed. It is recommend that you use this for binary data that will typically be larger than 20KB.

#### Renaming Tables

Expand Down
12 changes: 6 additions & 6 deletions docs/developers/applications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,21 @@ flowchart TD
Rest --> Networking
```

> As of Harper v4.6, a new, **experimental** component system has been introduced called **plugins**. Plugins are a **new iteration of the existing extension system**. They are simultaneously a simplification and an extensibility upgrade. Instead of defining multiple methods (`start` vs `startOnMainThread`, `handleFile` vs `setupFile`, `handleDirectory` vs `setupDirectory`), plugins only have to define a single `handleApplication` method. Plugins are **experimental**, and complete documentation is available on the [plugin API](../../technical-details/reference/components/plugins) page. In time we plan to deprecate the concept of extensions in favor of plugins, but for now, both are supported.
> As of Harper v4.6, a new, **experimental** component system has been introduced called **plugins**. Plugins are a **new iteration of the existing extension system**. They are simultaneously a simplification and an extensibility upgrade. Instead of defining multiple methods (`start` vs `startOnMainThread`, `handleFile` vs `setupFile`, `handleDirectory` vs `setupDirectory`), plugins only have to define a single `handleApplication` method. Plugins are **experimental**, and complete documentation is available on the [plugin API](../../reference/components/plugins) page. In time we plan to deprecate the concept of extensions in favor of plugins, but for now, both are supported.

Beyond applications and extensions, components are further classified as built-in or custom. **Built-in** components are included with Harper by default and can be directly referenced by their name. The `graphqlSchema`, `rest`, and `jsResource` extensions used in the previous application example are all examples of built-in extensions. **Custom** components must use external references, generally npm or GitHub packages, and are often included as dependencies within the `package.json` of the component.

> Harper maintains a number of custom components that are available on `npm` and `GitHub`, such as the [`@harperdb/nextjs`](https://github.com/HarperDB/nextjs) extension or the [`@harperdb/status-check`](https://github.com/HarperDB/status-check) application.

Harper does not currently include any built-in applications, making "custom applications" a bit redundant. Generally, we just say "application". However, there is a multitude of both built-in and custom extensions, and so the documentation refers to them as such. A complete list of built-in extensions is available in the [Built-In Extensions](../../technical-details/reference/components/built-in-extensions) documentation page, and the list of custom extensions and applications is available below.
Harper does not currently include any built-in applications, making "custom applications" a bit redundant. Generally, we just say "application". However, there is a multitude of both built-in and custom extensions, and so the documentation refers to them as such. A complete list of built-in extensions is available in the [Built-In Extensions](../../reference/components/built-in-extensions) documentation page, and the list of custom extensions and applications is available below.

This guide is going to walk you through building a basic Harper application using a set of built-in extensions.

> The Technical Details section of the documentation contains a [complete reference for all aspects of components](../../technical-details/reference/components), applications, extensions, and more.
> The Reference -> Components section of the documentation contains a [complete reference for all aspects of components](../../reference/components), applications, extensions, and more.

## Custom Functionality with JavaScript

[The getting started guide](../../getting-started/first-harper-app) covers how to build an application entirely through schema configuration. However, if your application requires more custom functionality, you will probably want to employ your own JavaScript modules to implement more specific features and interactions. This gives you tremendous flexibility and control over how data is accessed and modified in Harper. Let's take a look at how we can use JavaScript to extend and define "resources" for custom functionality. Let's add a property to the dog records when they are returned, that includes their age in human years. In Harper, data is accessed through our [Resource API](../../technical-details/reference/resources/), a standard interface to access data sources, tables, and make them available to endpoints. Database tables are `Resource` classes, and so extending the function of a table is as simple as extending their class.
[The getting started guide](../../getting-started/first-harper-app) covers how to build an application entirely through schema configuration. However, if your application requires more custom functionality, you will probably want to employ your own JavaScript modules to implement more specific features and interactions. This gives you tremendous flexibility and control over how data is accessed and modified in Harper. Let's take a look at how we can use JavaScript to extend and define "resources" for custom functionality. Let's add a property to the dog records when they are returned, that includes their age in human years. In Harper, data is accessed through our [Resource API](../../reference/resources/), a standard interface to access data sources, tables, and make them available to endpoints. Database tables are `Resource` classes, and so extending the function of a table is as simple as extending their class.

To define custom (JavaScript) resources as endpoints, we need to create a `resources.js` module (this goes in the root of your application folder). And then endpoints can be defined with Resource classes that `export`ed. This can be done in addition to, or in lieu of the `@export`ed types in the schema.graphql. If you are exporting and extending a table you defined in the schema make sure you remove the `@export` from the schema so that don't export the original table or resource to the same endpoint/path you are exporting with a class. Resource classes have methods that correspond to standard HTTP/REST methods, like `get`, `post`, `patch`, and `put` to implement specific handling for any of these methods (for tables they all have default implementations). To do this, we get the `Dog` class from the defined tables, extend it, and export it:

Expand Down Expand Up @@ -211,11 +211,11 @@ Breed.sourcedFrom(BreedSource, { expiration: 3600 });

The [caching documentation](caching) provides much more information on how to use Harper's powerful caching capabilities and set up data sources.

Harper provides a powerful JavaScript API with significant capabilities that go well beyond a "getting started" guide. See our documentation for more information on using the [`globals`](../../technical-details/reference/globals) and the [Resource interface](../../technical-details/reference/resource).
Harper provides a powerful JavaScript API with significant capabilities that go well beyond a "getting started" guide. See our documentation for more information on using the [`globals`](../../reference/globals) and the [Resource interface](../../reference/resource).

## Configuring Applications/Components

For complete information of configuring applications, refer to the [Component Configuration](../../technical-details/reference/components) reference page.
For complete information of configuring applications, refer to the [Component Configuration](../../reference/components) reference page.

## Define Fastify Routes

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/first-harper-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ http://localhost:9926/Dog/?breed=Husky&name=Balto&select(id,name,breed)

Congratulations, you now have created a secure database application backend with a table, a well-defined structure, access controls, and a functional REST endpoint with query capabilities! See the [REST documentation for more information on HTTP access](../developers/rest) and see the [Schema reference](../developers/applications/defining-schemas) for more options for defining schemas.

> Additionally, you may now use GraphQL (over HTTP) to create queries. See the documentation for that new feature [here](../technical-details/reference/graphql).
> Additionally, you may now use GraphQL (over HTTP) to create queries. See the documentation for that new feature [here](../reference/graphql).

## Key Takeaway

Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/harper-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ As you begin your journey with Harper, there are a few concepts and definitions

## Components

Harper components are a core Harper concept defined as flexible JavaScript based extensions of the highly extensible core Harper platform. They are executed by Harper directly and have complete access to the Harper [Global APIs](../technical-details/reference/globals) (such as Resource, databases, and tables).
Harper components are a core Harper concept defined as flexible JavaScript based extensions of the highly extensible core Harper platform. They are executed by Harper directly and have complete access to the Harper [Global APIs](../reference/globals) (such as Resource, databases, and tables).

A key aspect to components are their extensibility; components can be built on other components. For example, a [Harper Application](../developers/applications/) is a component that uses many other components. The [application template](https://github.com/HarperDB/application-template) demonstrates many of Harper's built-in components such as [rest](../technical-details/reference/components/built-in-extensions#rest) (for automatic REST endpoint generation), [graphqlSchema](../technical-details/reference/components/built-in-extensions#graphqlschema) (for table schema definitions), and many more.
A key aspect to components are their extensibility; components can be built on other components. For example, a [Harper Application](../developers/applications/) is a component that uses many other components. The [application template](https://github.com/HarperDB/application-template) demonstrates many of Harper's built-in components such as [rest](../reference/components/built-in-extensions#rest) (for automatic REST endpoint generation), [graphqlSchema](../reference/components/built-in-extensions#graphqlschema) (for table schema definitions), and many more.

## Applications

Applications are a subset of components that cannot be used directly and must depend on other extensions. Examples include defining schemas (using [graphqlSchema](../technical-details/reference/components/built-in-extensions#graphqlschema) built-in extension), defining custom resources (using [jsResource](../technical-details/reference/components/built-in-extensions#jsresource) built-in extension), hosting static files (using [static](../technical-details/reference/components/built-in-extensions#static) built-in extension), enabling REST querying of resources (using [rest](../technical-details/reference/components/built-in-extensions#rest) built-in extension), and running [Next.js](https://github.com/HarperDB/nextjs), [Astro](https://github.com/HarperDB/astro), or [Apollo](https://github.com/HarperDB/apollo) applications through their respective extensions.
Applications are a subset of components that cannot be used directly and must depend on other extensions. Examples include defining schemas (using [graphqlSchema](../reference/components/built-in-extensions#graphqlschema) built-in extension), defining custom resources (using [jsResource](../reference/components/built-in-extensions#jsresource) built-in extension), hosting static files (using [static](../reference/components/built-in-extensions#static) built-in extension), enabling REST querying of resources (using [rest](../reference/components/built-in-extensions#rest) built-in extension), and running [Next.js](https://github.com/HarperDB/nextjs), [Astro](https://github.com/HarperDB/astro), or [Apollo](https://github.com/HarperDB/apollo) applications through their respective extensions.

## Resources

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/what-is-harper.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ When you are ready for something a little more advanced, start [customizing your

Finally, when it’s time to deploy, explore [replication](../developers/replication/) between nodes.

If you would like to jump into the most advanced capabilities, learn about [components](../technical-details/reference/components/).
If you would like to jump into the most advanced capabilities, learn about [components](../reference/components/).

:::warning
Need help? Please don’t hesitate to [reach out](https://www.harpersystems.dev/contact).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"label": "Technical Details",
"label": "Reference",
"position": 4,
"link": {
"type": "generated-index",
"title": "Technical Details Documentation",
"title": "Reference Documentation",
"description": "Reference documentation and technical specifications",
"keywords": ["technical-details"]
"keywords": ["reference", "specifications"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ if (blob.size === undefined) {

```

See the [configuration](../../deployments/configuration) documentation for more information on configuring where blob are stored.
See the [configuration](../deployments/configuration) documentation for more information on configuring where blob are stored.
Loading