Skip to main content

HAP Compute User Guide


This guide covers Introduction to HAP Compute, Creating and Deploying Applications, Managing Applications, Billing, and Frequently Asked Questions.

1. Introduction to HAP Compute​

HAP Compute is a hosting service for websites and backend services. After developing website and backend code with AI coding tools such as WorkBuddy, Claude Code, or Codex, developers can use HAP Compute to deploy their applications quickly and make them accessible through a URL, without having to provision their own servers, domains, or HTTPS certificates.

HAP Compute is primarily designed for building websites powered by data from HAP applications, such as customer portals, dealer portals, online stores, and dashboards. HAP applications already provide data management, business processing, and page-building capabilities. Rather than replacing these capabilities, HAP Compute offers greater flexibility for building custom website interfaces, interactions, and backend services.

When used together, HAP manages business data and rules centrally, while HAP Compute provides flexible website interfaces and interactions. HAP Compute also supports standalone websites that do not require a connection to a HAP application, such as corporate websites and event pages.

1.1 What You Can Build with HAP Compute​

  • Business Portals: Build customer portals, registration websites, dealer ordering stores, and more, with business data stored and managed centrally in HAP worksheets.
  • Business Dashboards: Create custom data displays, analytics dashboards, and mobile-friendly pages to present business data in flexible ways.
  • Custom Backend Services: Run backend services for price calculations, data validation, and external API calls.
  • Standalone Websites: Publish corporate websites, event pages, informational websites, and more without connecting to a HAP application.

Explore 12 Example Applications

1.2 Website Applications and Backend Services​

A Compute application can include the following components:

  • Website Application: Browser-accessible pages, such as online stores, portals, informational pages, and business dashboards.
  • Backend Service: Performs operations such as calculations, data validation, and external system integration. It can also access HAP data within the scope of its granted permissions.

Each Compute application has its own access URL and runtime environment. Applications are isolated from one another, so redeploying or encountering an issue with one application does not directly affect other Compute applications.

1.3 Accessing the Console​

In the left navigation sidebar of the HAP home page, click Compute. You can also access the Compute Console directly.

The console allows you to create and manage Compute applications for yourself and your organization.

2. Create and Deploy Compute Applications​

On the Compute list page, click Create Compute in the upper-right corner and select a development method:

  • Use Mingo: Use HAP's built-in AI agent to develop and deploy applications by describing your requirements in a conversation.
  • Connect Other AI Tools: Connect AI coding tools such as WorkBuddy, Claude Code, or Codex to develop and deploy applications using CLI and Skills.
Development Methods and Ongoing Maintenance
  • Applications developed with Mingo must continue to be modified through Mingo. Downloading the source code for local development is not currently supported.
  • Applications developed and deployed locally using other AI tools must continue to be modified locally. Mingo cannot access the local source code.

2.1 Use Mingo​

You can describe your requirements in a conversation with Mingo to build a website or backend service and deploy it to Compute.

  1. Open Mingo: Click Use Mingo, or open Mingo directly and select the compute tool.
  2. Describe Your Requirements: Tell Mingo what you want to build, its intended use cases, and which HAP applications and data it needs to access.
  3. Deploy to Compute: Provide additional details as prompted during the conversation. Once development is complete, ask Mingo to deploy the application to Compute.

For example, you can describe your requirements as follows:

Build an event registration website that displays the event date, location, and description. Visitors should be able to enter their names and phone numbers and submit registrations. Store registration information in a HAP worksheet. Once complete, deploy the website to Compute.

2.2 Connect Other AI Tools​

If you use another AI coding tool, you can connect it to Compute through HAP Compute CLI and Skills.

  1. On the Compute list page, click Create Compute > Connect Other AI Tools.
  2. Under Install CLI and Skills, click Copy Command.
  3. Paste the command into your AI coding tool and send it. The AI will follow the instructions to complete the installation.
  4. Follow the prompts to sign in to your HAP account and authorize access in your browser.
  5. Ask the AI to verify the connected service URL and organization to ensure it is connected to the correct organization for this project.

The copied installation command includes the service URL, organization information, and Skills package URL. The AI uses this information to install or update CLI and Skills and verify the connection.

Some tools may require you to refresh the session or restart the tool after installation to load newly added Skills or MCP tools.

If you also need an external AI tool to create HAP worksheets, configure fields, or set up business processes, you must separately connect HAP MCP and install the corresponding HAP Skills. For details, see Connect to HAP Applications and Data.

Installation and Audit Notice

Before the first online installation, the AI tool will display an informational notice.

For security auditing, Compute records the login account, organization, tool version, and operation results. It does not record requirements, conversations, code, file paths, secrets, or other similar content.

Please review the notice displayed by your AI tool before proceeding with the installation.

2.3 Describe Requirements and Connect to HAP Data​

Before development, identify the HAP applications and data you need and describe your requirements to the AI.

Connect External AI Tools to HAP Applications and Data​

After connecting to Compute, the AI can create and deploy websites or backend services. If you also need an external AI tool to create HAP worksheets, configure fields, or set up business processes, connect HAP MCP and install the corresponding HAP Skills.

Once connected, ask the AI to verify the following:

  • It is connected to the correct HAP organization.
  • The current credentials are authorized to access the target application.
  • It has the capabilities required for the task, such as creating worksheets, reading and writing data, or configuring workflows.
Application Authorization Scope

If the credentials are authorized to access only certain applications, newly created applications may fall outside that scope. This can result in an application being created successfully but becoming inaccessible to subsequent operations.

If this happens, check and adjust the application authorization scope of the credentials before asking the AI to continue. This helps avoid creating duplicate applications.

For the differences between application-level credentials and the permissions associated with a logged-in user, see Authentication.

When describing your requirements, consider including the following:

  • Users: Who will use the application, and whether login is required.
  • Features: What information users need to view and what actions they need to perform.
  • Content: Specific information to display, such as event dates, locations, and descriptions.
  • Data: Whether to use existing HAP worksheets or have the AI create new ones, and which fields need to be stored.
  • Workflows: Whether submissions should trigger approvals, notifications, or other business processes.
  • Deployment Target: Which organization's Compute environment the application should be deployed to.

For example, you can describe your requirements as follows:

Build a public event registration website that visitors can access without signing in. The page should display the event date, location, and description, and allow visitors to enter their names and phone numbers to register. Both fields must be required. Create a registration worksheet in the current HAP organization to store the data. Registration records should be accessible only to event organizers and must not be publicly displayed on the website. Once complete, deploy the website to Compute and verify that registration data is successfully saved to the worksheet.

Providing the event name, date, location, and description also helps the AI complete the page content. For information that has not yet been confirmed, you can ask the AI to mark it as "To Be Announced" rather than generating details on its own.

Refine Requirements and Adjust the Approach​

You do not need to provide a complete technical solution upfront. Start with your basic requirements, review the results, and refine the application through further conversations.

For decisions that have not yet been made but may affect the data structure, access permissions, or business processes, you can also ask the AI to clarify requirements or explain its proposed approach before implementation.

Specify Your Preferences and Refine Them Anytime

The AI selects an implementation approach based on your requirements. For example, when collecting names and phone numbers, it may embed a HAP public form.

If you prefer a custom-designed registration form, you can specify this upfront or request the change after reviewing the result:

"Replace the embedded form with a custom registration form and save the data to a HAP worksheet through a backend API."

If you want to review key implementation decisions first, add the following to your request:

"Ask me to clarify any missing critical information. Before implementation, explain your proposed approach for data integration, permissions, and business rules."

2.4 Publish and Update Applications​

Once development is complete, you can publish your application through an AI conversation or CLI. Both methods involve pre-deployment checks, deployment, and verification of the live application, although the specific steps and confirmation methods may differ.

Publish Through Mingo or AI Conversations​

In Mingo or an AI tool connected to Compute, describe your deployment requirements directly. For example:

Check this website and deploy it to Compute. After deployment, open the live URL and verify that the page, registration submission, and HAP data storage work correctly.

Depending on the deployment methods supported by the target Compute environment, the AI will perform the following steps:

  1. Create a Compute Application: Set the application name, description, and icon, and verify the target organization.
  2. Complete Development and Configuration: Build the pages, connect HAP data, and configure the required server-side settings.
  3. Run Pre-deployment Checks: Scan the actual deployment package for potential risks, such as exposed secrets or personal information.
  4. Deploy the Application: Wait for deployment to complete, verify the runtime status, and obtain the actual application URL.
  5. Verify the Live Application: Open the website and test key operations and data storage.

If the pre-deployment checks require manual review, the AI will present the findings and wait for your confirmation or for the necessary changes to be made before running the checks again.

Blocking issues must be resolved and cannot be bypassed through confirmation alone.

After making changes, you can ask the AI:

Redeploy the application and verify that the live version has been updated.

Encountering Errors?

If you encounter any issues during development or after configuring the application, describe the problem to the AI and ask it to troubleshoot, fix the issue, and deploy the updated version.

Publish Using CLI (External AI Tools)​

When using an external AI tool, you can also run CLI commands manually. For Compute environments that support standard deployment, the basic process is as follows:

① Initialize — hap-compute init

Register the Compute application and generate a local project template.

Successful initialization means the application has been registered and the local template has been generated. It does not mean the business website is live.

② Run Pre-deployment Checks — hap-compute review

Check the actual deployment package. The review may return one of the following results:

ResultDescription
PassNo issues requiring deployment to be blocked were detected. You can proceed with deployment.
Manual Review RequiredPotential risks require the publisher's review. Inspect the findings and confirm or make changes as needed.
BlockedThe deployment package failed the checks. Resolve the issues and run the checks again.

Pre-deployment checks do not constitute a comprehensive code security audit, nor do they guarantee that all dynamic behaviors or media content have been reviewed.

③ Deploy — hap-compute deploy

Run the checks again on the actual deployment package, then upload and deploy it once the checks pass.

If manual review is required, follow the CLI prompts to confirm in the terminal. When the AI handles deployment, you can also confirm through the conversation before the AI proceeds.

For Compute environments that use version-based publishing, follow the CLI and Skills instructions to complete the preview and production release process rather than applying the standard deployment commands.

Verify and Update Your Application​

After the deployment command reports success, check the application's runtime status in Compute and open the actual live URL to verify its functionality.

For an event registration website, verify at least the following:

  • Event information and the registration form display correctly on desktop and mobile devices.
  • Required fields, such as name and phone number, are validated correctly.
  • A clear success or failure message appears after submission.
  • Registration information is successfully saved to the target HAP worksheet.
  • Registrants' personal information is not publicly displayed on the website.

Use clearly labeled test data for verification, and remove the test records after confirming the results.

After modifying the website code, you must redeploy the application for the changes to take effect online.

If you only modify a HAP public form, business rules, or workflows, you usually do not need to redeploy the website. However, you should still verify that the website remains compatible with the updated configuration.

2.5 Access Your Application​

After deployment, you can access your application in one of the following ways, depending on your use case:

  1. Access or Share Directly:

    In the Compute Console, go to Website Applications > Basic for the target application. Click the website URL to open it, or copy the link to share it.

  2. Add as a HAP Website Application:

    On the HAP home page, go to Apps > Create App > Website Application. Enter a name, select the deployed Compute application, and configure device visibility. Once created, members can access it from the HAP workspace. For details, see How to Create an App.

  3. Embed in a HAP Custom Page:

    Edit a custom page, add the Embed URL component, and enter the HTTPS URL of the Compute website. Preview the page before saving. The target website must allow embedding. For details, see How to Embed a URL Page in a Custom Page.

Visibility permissions for HAP app entries or pages, Compute website authentication, and HAP data permissions are configured separately. Check the relevant settings in both HAP and Compute as needed.

3. Manage Compute Applications​

After creating and deploying a Compute application, you can use the application list and details pages to manage websites, backend services, access settings, logs, and resource usage.

Open the Compute Console and switch between My and All to view applications within different scopes.

Only users with Compute management permissions can see the All tab.

Select the Compute application you want to manage from the list, then use the left navigation menu to switch between sections.

Click Edit with Mingo in the upper-right corner to open Mingo and continue modifying the application through a conversation. If the application was developed using another AI tool, you can continue making changes and deploying updates from the original project.

3.1 Overview​

The Overview page displays the Compute application's overall operational status, including its current status, last deployment time, deployment success rate over the past 30 days, and credits consumed this month.

Use the feature cards to open the website URL, copy the link, or navigate to Website Applications, Backend Services, and Authentication.

The Runtime Metrics section below allows you to view QPS, website visits, backend service requests, and backend service errors over a selected time range.

QPS (Queries Per Second) represents the number of requests processed per second. Log collection may be delayed, so the most recent metrics may not yet be complete.

3.2 Website Applications​

The Website Applications section allows you to view basic website information, deployment history, and deployed files.

View Basic Information and Deployment History​

Under the Basic tab, you can view the website identifier, URL, path, status, and last deployment time. Click the URL to open the website, or use the copy button next to it to share the link.

The Deployment History section below displays version numbers, deployment times, and results. The active version is marked Currently Active.

Click View Logs for a deployment record to review the deployment process and troubleshoot deployment failures.

Click Deploy Using CLI to view instructions for preparing files and running deployment commands. When updating a website through AI or CLI, make the changes in the corresponding project and redeploy it.

Version Rollback

Rolling back a website version does not automatically roll back HAP worksheet data, workflows, or all backend configurations. Before rolling back, make sure the selected version is compatible with the current business APIs.

Manage Website Files​

Switch to the Files tab to browse deployed website files. You can search for files, refresh the directory, and view file paths, sizes, and last modified times.

Within the business website directory, you can upload files or download and delete existing files.

Keep Deployed Files in Sync with Your Project

Uploading or deleting deployed files may affect website availability. We recommend keeping your local project in sync. Otherwise, changes made directly to deployed files may be overwritten the next time you deploy from the project.

The file browser may also display platform resource directories. Confirm the purpose of a directory before making changes.

3.3 Backend Services​

The Backend Services section allows you to view and manage the application's server-side services.

The list displays each service's name, status, type, runtime environment, creation time, and description. You can search for services and refresh the list.

Click a service name or View to open its details. The details page contains four tabs: Configuration, Code, Versions, and Logs.

If the application only contains a static website, the list may display No Backend Services.

For example, a website that embeds a HAP public form can have submissions processed directly by HAP. If you replace it with a custom form that writes data through an API, the corresponding backend service will appear in Compute.

Basic Information and Runtime Configuration​

Under the Configuration tab, you can view the runtime environment, status, description, and invocation method.

Click Edit in the basic information section to modify the description, memory allocation, and timeout. Click Save when finished.

SettingDescription
Memory (MB)The maximum memory available during function execution. Higher memory allocations also provide greater CPU capacity.
Timeout (seconds)The maximum duration allowed for a single execution. Execution is terminated when the timeout is reached.
Static Outbound IPEnable this when connecting to external systems that require IP allowlisting. Additional credits are consumed. Refer to the on-screen information for details.

Static Outbound IP​

If you need a fixed outbound IP address to connect to an external system, you can enable Static Outbound IP.

Before enabling it, a confirmation dialog displays information about additional credit consumption and the billing rules that apply after the feature is disabled. Refer to the on-screen information for the specific charges.

Configure Environment Variables​

Environment variables store parameters required by backend services, such as API URLs, worksheet IDs, and application-level access credentials, without hardcoding them into the application.

  1. Open the Configuration tab in the service details and locate Environment Variables.
  2. Click Edit in this section to add or modify variables as required.
  3. Save your changes, then access the website or call the API again to verify that the configuration works correctly.

Environment variables saved in the console take effect immediately and are retained after redeployment. However, when modifying variables through CLI using hap-compute env set, you must run the deployment command again for the changes to take effect.

For example, if a custom registration form uses a backend API to write data to a HAP worksheet, you can configure AppKey, Sign, and the worksheet ID as environment variables.

The actual variable names depend on the application code. Follow the instructions provided by the AI tool or developer.

Environment Variable Considerations

Variable values are masked in the list. Store secrets in backend environment variables rather than frontend code.

Platform-reserved variables are managed by the system, and the total size of all environment variables is limited to 4 KB.

Placeholder values are not valid credentials. After configuring the variables, verify that actual API requests work correctly.

View Access Routes​

The Access Routes section displays the route prefix URL, route prefix, and login requirement. You can also copy the URL.

The displayed URL is a prefix and may not be a complete, callable API endpoint.

For example, if the route prefix is /api, the actual registration endpoint might be POST /api/registrations.

The exact path, HTTP method, and parameters are defined in the application code. Receiving a 404 response when opening /api directly in a browser does not necessarily indicate a service failure.

View Code​

Under the Code tab, you can browse the deployed source code directory, search for files, and click a file to view its contents.

Only user source code is displayed. Dependency directories, version control repositories, and environment configuration files are not available for preview.

To modify the code, return to Mingo or the original AI development project, make your changes, and redeploy the application.

View and Roll Back Versions​

The Versions tab lists code versions and their publication times. The active version is marked Current Version.

To restore an earlier code version, click Roll Back Code for an eligible historical version. You cannot roll back the current version to itself.

Check the Impact Before Rolling Back

Rolling back code does not undo business data already written to worksheets or databases, nor does it restore previous environment variables.

Before rolling back, make sure the earlier code version is compatible with the current configuration and field structure. After rollback, verify the APIs and business processes again.

View Service Logs​

Under the Logs tab, select Last 1 Hour or Today to view log timestamps, messages, levels, resource names, and request IDs for the current service.

Click the expand button on the left of a log entry to view its details, or copy the request ID to locate related logs from the same request.

For runtime errors, failed API requests, or timeouts, start by checking this tab. You can also use Log Monitoring to view logs across services.

3.4 Authentication​

The Authentication section allows you to configure website access requirements and visitor login methods.

Configure Access Requirements​

  • Public Access: Anyone can access the website directly without signing in.
  • Login Required: Visitors must sign in before accessing the website. At least one login method must be enabled before you can select this option.
Authentication and Data Permissions

Website authentication and permissions to view or modify business data are separate settings.

If you need to enforce business permissions, such as allowing users to view only their own orders, implement these restrictions in the application logic and data access configuration. Website authentication alone is not sufficient.

Configure Login Methods​

  • Supported Login Methods: HAP, DingTalk, and Feishu/Lark.
  • Login Methods in Development: WeCom, OAuth 2.0, OIDC, SAML 2.0, and CAS.
HAP Login​

After enabling HAP Login, click Login and Access Settings to configure API permissions, allowed applications, and users authorized to grant access.

Click Settings to configure the login name, icon, and description displayed for HAP Login.

Other Login Methods​

Click Add to select another identity provider, then enter the required information, such as its name, application ID, and application secret.

You can click Configuration Guide in the configuration dialog to view setup instructions.

After completing the configuration, test the actual login process and verify that users are redirected back to the website correctly.

What HAP Data Can Users Access After Logging In?​

A Compute application can access HAP APIs using application-level credentials or the identity of a user signed in with a HAP account. Both methods can be used within the same application for different functions.

The data accessible through each API request depends on the credentials used for that request.

  • Using Application-Level Credentials (AppKey and Sign): Backend services access HAP data within the authorization scope of the credentials. Even if an employee has signed in, requests using these credentials are not automatically filtered according to that employee's individual HAP permissions.
  • Using the Logged-in HAP User's Identity: After enabling HAP Login and configuring the allowed applications and API permissions, the website can call HAP APIs using the current user's identity and display data according to that user's access permissions in HAP.

For example, in an internal sales portal, employees sign in with their HAP accounts. The product catalog can use application-level credentials to retrieve product information intended for all employees, while the My Customers section uses the current employee's identity to retrieve customer records.

Both methods can be used in the same portal. The customer records displayed under My Customers will match the employee's data visibility permissions in HAP.

3.5 Log Monitoring​

Query Logs​

Go to Log Monitoring > Log Management to search logs by type and time range. Supported logs include website access logs and backend runtime logs. You can view information such as request time, content, result, and duration.

If the website encounters an error, a backend request fails, or an operation times out, start by filtering logs by the time the issue occurred. Then check the request results and service configuration.

Log Scope

Compute access logs, deployment logs, and backend runtime logs are separate from data operation logs within HAP applications. To investigate data changes made through HAP APIs, check the corresponding operation logs in HAP.

Operations Monitoring​

Go to Log Monitoring > Operations Monitoring to view charts showing application performance trends. Use metrics such as website visits, service requests, and errors to monitor the application's operational status.

3.6 Usage and Consumption​

The Usage and Consumption section displays resource usage and credit consumption for the current Compute application.

Select a date range to view total consumption, daily trends, and resource metrics for the selected period, including access counts, data computation and storage, website application storage, backend service traffic, and computation usage.

Click the information icon next to a metric to learn how it is calculated.

Resource usage and actual charges may differ. For details, click Billing Rules in the upper-right corner to review usage-based charges, minimum charges, and daily settlement rules.

If the organization runs out of credits, Compute will be automatically suspended and will resume automatically once sufficient credits are available. Refer to the on-screen information for resource retention periods and expiration handling.

4. Billing​

Compute charges are settled daily in credits. The base resources required to keep the environment running are also included in daily charges. Therefore, the credits calculated from individual usage metrics under Usage and Consumption may differ slightly from the actual daily charges.

Daily Billing Rules​

Compute applications are classified as active or inactive based on their total enabled duration during the day. Different billing rules apply to each category:

Compute Type and CriteriaBilling MethodExample
Active Compute: Enabled for a total of 6 hours or more during the dayEach Compute application is billed separately based on its actual daily consumption, with a minimum charge of 1 credit per application per day.Application A consumes 0.40 credits and is charged 1 credit. Application B consumes 2.30 credits and is charged 2.30 credits.
Inactive Compute: Enabled for less than 6 hours during the dayAll inactive Compute applications within the same organization are billed together based on their combined consumption, with a minimum charge of 1 credit per group per day.Applications C and D consume 0.30 and 0.40 credits respectively, totaling 0.70 credits. The group is charged 1 credit.

In this example, the organization's total daily charge is 4.30 credits: 1 credit for A + 2.30 credits for B + 1 credit for C and D combined.

Charges are calculated daily, with settlement initiated between 01:00 and 02:00 AM the following day.

Billing Items​

Resource usage is converted into credits according to the rates below. Actual charges are then calculated based on the daily billing rules.

ResourceUnitCalculation (Credits)
Standard RequestsRequestNumber of standard requests × 0.000006
Secure RequestsRequestNumber of secure requests × 0.00002
Data ComputationCore-secondCore-seconds × 0.00019
Data StorageMB·hourMB·hours × 0.0000009765625
Website Application StorageMBStorage (MB) × Days Used × 0.0000076953125
Backend Service Outbound TrafficMBTraffic (MB) × 0.0015625
Backend Service ComputationGB·secondGB·seconds × 0.00022216
Static Outbound IPDayDays Enabled × 2

5. Frequently Asked Questions​

Q1: Can I use Compute without connecting to a HAP application?

Yes. Websites such as corporate websites and event pages can run independently. However, if you need centralized management of business data and processes, such as customers, orders, approvals, and permissions, we recommend connecting to a HAP application.

Q2: Do I need to redeploy my website after modifying a HAP workflow?

Changes to business rules or workflows in HAP generally do not require website redeployment. However, if the changes affect the APIs, fields, or response data structures used by the website, you must update and redeploy the website accordingly.

Q3: Can backend services store business data permanently?

No. You should not rely on a running instance's memory or local disk for reliable persistent storage. For data that needs to be retained long-term, use a service that explicitly provides persistent storage, such as HAP worksheets.

Q4: Does requiring users to log in automatically grant them access to HAP data?

No. Authentication and data access authorization are separate controls. When calling HAP APIs, the actual permissions depend on the user token or application-level credentials used for the request.

Q5: How can I view historical versions and troubleshoot deployment failures?

Go to Website Applications in the application details to view deployment history and logs. To troubleshoot API errors during runtime, check the corresponding logs under Backend Services or Log Monitoring.

Was this document helpful?