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
Harper provides robust capabilities for analytics and observability to facilitate effective and informative monitoring:
24
24
25
-
- 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).
25
+
- Analytics provides statistics on usage, request counts, load, memory usage with historical tracking. The analytics data can be [accessed through querying](../reference/analytics).
26
26
- 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).
27
27
- Information about the current cluster configuration and status can be found in the [cluster APIs](../developers/operations-api/clustering).
28
28
- 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.
Copy file name to clipboardExpand all lines: docs/deployments/configuration.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -715,7 +715,7 @@ Harper's logger supports defining multiple logging configurations for different
715
715
716
716
`logging.external`
717
717
718
-
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:
718
+
The `logging.external` section can be used to define logging for all external components that use the [`logger` API](../reference/globals). For example:
719
719
720
720
```yaml
721
721
logging:
@@ -1233,7 +1233,7 @@ The name of the component. This will be used to name the folder where the compon
1233
1233
1234
1234
`package` - _Type_: string
1235
1235
1236
-
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.
1236
+
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.
1237
1237
1238
1238
Read more about npm install [here](https://docs.npmjs.com/cli/v8/commands/npm-install)
Copy file name to clipboardExpand all lines: docs/developers/applications/defining-schemas.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ type Brand @table @export {
78
78
}
79
79
```
80
80
81
-
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).
81
+
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).
82
82
83
83
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:
84
84
@@ -241,7 +241,7 @@ The `@sealed` directive specifies that no additional properties should be allowe
241
241
242
242
### Defined vs Dynamic Schemas
243
243
244
-
Ifyoudonotdefineaschema 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.
244
+
Ifyoudonotdefineaschema 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.
245
245
246
246
### Field Types
247
247
@@ -257,7 +257,7 @@ Harper supports the following field types in addition to user defined (object) t
257
257
- `Any`: Any primitive, object, or array is allowed
258
258
- `Date`: A Date object
259
259
- `Bytes`: Binary data as a Buffer or Uint8Array
260
-
- `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.
260
+
- `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.
Copy file name to clipboardExpand all lines: docs/developers/applications/index.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,21 +67,21 @@ flowchart TD
67
67
Rest --> Networking
68
68
```
69
69
70
-
> 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.
70
+
> 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.
71
71
72
72
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.
73
73
74
74
> 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.
75
75
76
-
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.
76
+
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.
77
77
78
78
This guide is going to walk you through building a basic Harper application using a set of built-in extensions.
79
79
80
-
> The Technical Details section of the documentation contains a [complete reference for all aspects of components](../../technical-details/reference/components), applications, extensions, and more.
80
+
> The Reference -> Components section of the documentation contains a [complete reference for all aspects of components](../../reference/components), applications, extensions, and more.
81
81
82
82
## Custom Functionality with JavaScript
83
83
84
-
[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.
84
+
[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.
85
85
86
86
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:
The [caching documentation](caching) provides much more information on how to use Harper's powerful caching capabilities and set up data sources.
213
213
214
-
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).
214
+
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).
215
215
216
216
## Configuring Applications/Components
217
217
218
-
For complete information of configuring applications, refer to the [Component Configuration](../../technical-details/reference/components) reference page.
218
+
For complete information of configuring applications, refer to the [Component Configuration](../../reference/components) reference page.
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.
165
165
166
-
> Additionally, you may now use GraphQL (over HTTP) to create queries. See the documentation for that new feature [here](../technical-details/reference/graphql).
166
+
> Additionally, you may now use GraphQL (over HTTP) to create queries. See the documentation for that new feature [here](../reference/graphql).
Copy file name to clipboardExpand all lines: docs/getting-started/harper-concepts.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ As you begin your journey with Harper, there are a few concepts and definitions
8
8
9
9
## Components
10
10
11
-
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).
11
+
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).
12
12
13
-
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.
13
+
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.
14
14
15
15
## Applications
16
16
17
-
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.
17
+
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.
0 commit comments