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
16 changes: 8 additions & 8 deletions learn/developers/harper-applications-in-depth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Beyond the component system, Harper also includes some other important subsystem

Harper further classifies components (plugins and applications) as either built-in or custom. **Built-in** components are internal to Harper, require no additional installation steps, and are immediately accessible for use. The `graphqlSchema` and `rest` plugins are great examples of built-in plugins. **Custom** components are external to Harper, generally available as an npm package or git repository, and do require additional installation steps in order to be used. Custom components can be authored by anyone, including Harper. Any of Harper's official custom components are published using the `@harperdb` and `@harperfast` package scopes, such as the [`@harperdb/nextjs`](https://github.com/HarperDB/nextjs) plugin for developing Next.js applications or the [`@harperdb/status-check`](https://github.com/HarperDB/status-check) application.

Harper's reference documentation contains detailed documentation for all [built-in components](/reference/v4/components/overview#built-in-extensions-reference). Custom components are documented within their respective repositories.
Harper's reference documentation contains detailed documentation for all [built-in components](/reference/v5/components/overview#built-in-extensions-reference). Custom components are documented within their respective repositories.

Harper does not currently include any built-in applications, making "custom applications" a bit redundant. Generally, we just refer to them as "applications". However, there is a multitude of both built-in and custom plugins, and so the documentation tends to specify whenever relevant.

Expand Down Expand Up @@ -189,7 +189,7 @@ The other two properties are lists containing status objects corresponding to di

The Operations API is mainly intended to be used for system administration purposes. This API runs on a separate port than the main application port serving user traffic, providing a distinct interface for clear differentiation between secure system administration and the application interface designed for high-load, performance and application defined actions. (It does have the ability to do data management, which may overlap with application capabilities, but this is part of a full system administration API).

Harper keeps a [reference of all operations](/reference/v4/operations-api/overview) in the Operations API reference documentation, but here a few more you can try immediately: `user_info`, `read_log`, and `describe_all`.
Harper keeps a [reference of all operations](/reference/v5/operations-api/overview) in the Operations API reference documentation, but here a few more you can try immediately: `user_info`, `read_log`, and `describe_all`.

For `describe_all` to work, ensure that you are still running the Harper application you created in the previous guide. If you need to, checkout the [`02-rest-api`](https://github.com/HarperFast/create-your-first-application/tree/02-rest-api) branch of the `HarperFast/create-your-first-application` repository to ensure you have the necessary application files for this example.

Expand Down Expand Up @@ -330,7 +330,7 @@ In previous guides we demonstrated how to use the `harper` and `harper dev` comm
- `harper restart` will restart the main process and all threads (different than the thread-only restart from the `dev` command)
- `harper status` displays the status of the process including the PID

There are a few more commands not listed here (check out the [CLI reference](/reference/v4/cli/overview) if you're interested), and there is one more fun trick with the CLI.
There are a few more commands not listed here (check out the [CLI reference](/reference/v5/cli/overview) if you're interested), and there is one more fun trick with the CLI.

Certain operations from the Operations API are available as CLI commands! They follow the convention: `harper <operation> <param>=<value>`, and return YAML by default. You can always pass `json=true` to see the result in JSON instead.

Expand All @@ -355,7 +355,7 @@ Create a new file `resources.js` within your Harper application; here we are goi

**Resources** are the mechanism for defining custom functionality in your Harper application. This gives you tremendous flexibility and control over how data is accessed and modified in Harper. The corresponding Resource API is a unified API for modeling different data sources within Harper as JavaScript classes. Generally, this is where the core business logic of your application lives. Database tables (the ones defined by `graphqlSchema` entries) are `Resource` classes, and so extending the function of a table is as simple as extending their 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). Furthermore, by simply `export` 'ing a resource class, Harper will generate REST API endpoints for it just like the `@export` directive did in `graphqlSchema`. The [Resource API](/reference/v4/resources/overview) is quite powerful, and we'll dive into different aspects throughout future Learn guides, but for now lets start with a simple example extending the existing `Dog` table that already exists in the application.
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). Furthermore, by simply `export` 'ing a resource class, Harper will generate REST API endpoints for it just like the `@export` directive did in `graphqlSchema`. The [Resource API](/reference/v5/resources/overview) is quite powerful, and we'll dive into different aspects throughout future Learn guides, but for now lets start with a simple example extending the existing `Dog` table that already exists in the application.

Inside of `resources.js` add the following code for defining a `DogWithHumanAge` custom resource:

Expand Down Expand Up @@ -622,7 +622,7 @@ At this point, you should confident to start tinkering with your own ideas for a

## Additional Resources

- [Operations API](/reference/v4/operations-api/overview)
- [`logger` global reference](/reference/v4/logging/api)
- [Resources](/reference/v4/resources/overview)
- [Components](/reference/v4/components/overview)
- [Operations API](/reference/v5/operations-api/overview)
- [`logger` global reference](/reference/v5/logging/api)
- [Resources](/reference/v5/resources/overview)
- [Components](/reference/v5/components/overview)
4 changes: 2 additions & 2 deletions learn/getting-started/create-your-first-application.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -371,5 +371,5 @@ harper deploy \

## Additional Resources

- [Table Schema](/reference/v4/database/schema) reference
- [REST](/reference/v4/rest/overview) reference
- [Table Schema](/reference/v5/database/schema) reference
- [REST](/reference/v5/rest/overview) reference
2 changes: 1 addition & 1 deletion learn/getting-started/install-and-connect-harper.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,5 @@ If you see `HarperDB is running.`, fantastic work! You've successfully installed

## Additional Resources

- [Harper CLI](/reference/v4/cli/overview) reference documentation
- [Harper CLI](/reference/v5/cli/overview) reference documentation
- [Harper Fabric](../../fabric/) documentation
2 changes: 1 addition & 1 deletion src/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Get help from Harper's core team, collaborate with other developers, and stay cu
},
{
type: 'link',
href: '/reference/v4',
href: '/reference/v5',
label: 'Reference',
description: 'Complete technical reference for every Harper feature, API, and configuration option',
},
Expand Down
2 changes: 1 addition & 1 deletion src/pages/reference/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function ReferenceRedirect() {

useEffect(() => {
// Redirect to the latest reference docs
history.replace('/reference/v4');
history.replace('/reference/v5');
}, [history]);

return null;
Expand Down