A lightweight, frontend-only platform for managing cloud resources through Resource APIs
Enopax Resource API Frontend is a demonstration and development tool that connects to Resource APIs to enable users to provision and manage cloud resources. It provides an intuitive interface for:
- Organizing Resources: Three-level hierarchy (Organization → Project → Resource)
- Managing Access: Project-level SSH key management with automatic provisioning
- Discovering Providers: Dynamic provider discovery via standardized REST APIs
- Provisioning Resources: Simple forms driven by provider-defined schemas
- Accessing Custom UIs: Seamless SSO to provider-specific management interfaces
This platform is designed for:
- Local development and testing of provider APIs
- Demos and proof-of-concepts
- Understanding the Resource API pattern
- Internal tools in trusted environments
Note: This is a frontend-only application with no authentication. All data is stored in browser localStorage. Not suitable for production use.
- Organization Management: Create and manage organizations with readable URLs
- Project Management: Create projects within organizations with SSH key management
- Slug-based Routing: Clean, readable URLs using slugified names (e.g.,
my_org/my_project) - Duplicate Prevention: Organizations and projects enforce unique names (case-insensitive)
- Provider Discovery: Automatically discover providers from configured API endpoints
- Resource Provisioning: Provision resources through provider APIs with custom configurations
- SSH Key Management: Add and manage SSH keys for secure resource access
- Custom Endpoints: Execute custom provider endpoints with token-based authentication
- Persistent Storage: All data stored in browser localStorage
Organization: Organization data structureProject: Project with SSH keysResource: Provisioned resourcesProvider: Provider information from APIProviderConfig: Resource API configurationProvisionRequest: Resource provisioning request
Configure provider API endpoints:
{
url: 'http://localhost:3001',
apiKey: undefined // Optional API key
}- Create, read, update, delete organizations
- localStorage persistence
- Manage projects per organization
- SSH key management (add/remove)
- localStorage persistence
- Discover providers from
/providers/infoendpoint - Cache provider information
- Provider configuration management
- Provision resources via POST to
/resources - Delete resources via DELETE to
/resources/:id - Call custom endpoints via
/tokenendpoint - localStorage persistence
/- Home (organization list)/:orgSlug- Organization view (project list)/:orgSlug/:projectSlug- Project view (resources, SSH keys, providers)
Note: Routes use slugified names (lowercase, underscores) instead of UUIDs for readable URLs.
- List all organizations
- Create new organizations
- Navigate to organization view
- Delete organizations
- Display organization details
- List projects in organization
- Create new projects
- Delete projects
- Tabbed interface for:
- Resources: List provisioned resources
- SSH Keys: Manage project SSH keys
- Providers: View available providers
- Provision new resources
- View provider custom endpoints
- Display provider information
- Show capabilities
- Execute custom endpoints with token
- Display resource details
- Show status with color coding
- Toggle configuration view
- Execute custom endpoints
- Delete resource
- Add SSH public keys
- List current keys
- Copy keys to clipboard
- Remove keys
- Modal form for provisioning resources
- Select provider
- Specify resource type and name
- Add custom configuration fields
- Automatically includes project SSH keys
- Application layout with header and footer
- Navigation to home
- Router view for content
- Initialize Vue app
- Setup Pinia store
- Configure Vue Router
- Mount application
The platform expects provider APIs to implement:
Returns provider information:
{
"name": "Provider Name",
"version": "1.0.0",
"description": "Provider description",
"capabilities": ["vm", "container"],
"customEndpoints": [
{
"path": "/console",
"method": "GET",
"description": "Open Console",
"requiresToken": true
}
]
}Provision a resource (flat structure):
{
"name": "my-server",
"sshKeys": ["ssh-rsa AAAA..."],
"userId": "username",
"projectId": "my_project",
"projectName": "My Project",
"organizationId": "my_org",
"organisationName": "My Org",
"customField": "value"
}Note: SSH keys are sent at the top level. projectId and organizationId contain slugified names (not UUIDs).
Returns:
{
"id": "resource-id",
"status": "provisioning"
}Delete a resource
Get authenticated URL for custom endpoint:
{
"endpoint": "/console"
}Returns:
{
"url": "https://provider.com/console?token=xyz"
}See docs/local-setup.md for running both platform and resource-api on localhost.
# Install dependencies
pnpm install
# Start development server (runs on localhost:5173)
pnpm devThe platform will be available at http://localhost:5173
On the home page, enter an organization name and click "Create Organization".
Click on your organization, then create a new project within it.
Switch to the "SSH Keys" tab and add public SSH keys that should have access to resources in this project.
- Go to the "Resources" tab
- Click "Provision Resource"
- Select a provider from the dropdown
- Fill in the required configuration fields
- Click "Provision"
The platform will automatically include your project's SSH keys in the resource configuration.
If a resource has custom endpoints (like "Settings"), click the button to:
- Request an access token from the provider
- Open the custom UI in a new tab with JWT authentication
- Manage resource-specific features
# Install dependencies
pnpm install
# Start dev server (localhost:5173)
pnpm dev
# Type checking
pnpm type-check
# Build for production
pnpm build
# Preview production build
pnpm preview- Vue 3: Progressive JavaScript framework
- TypeScript: Type-safe development
- Pinia: State management
- Vue Router: Client-side routing
- Tailwind CSS v4: Utility-first CSS
- Vite: Fast build tool
Edit src/config/providers.ts:
export const providerConfigs: ProviderConfig[] = [
{
url: 'http://localhost:3001',
apiKey: undefined
},
{
url: 'https://another-provider.com',
apiKey: 'your-api-key'
}
]The @ alias points to src/:
import { useProjectStore } from '@/stores/project'All data is stored in browser localStorage:
- Organizations:
platform-organizations(includes name and slug) - Projects:
platform-projects(includes name and slug) - Resources:
platform-resources
Note: Organization and project slugs are generated from names using the slugification utility (src/utils/slugify.ts). Slugs use lowercase letters, numbers, and underscores only.
Clear localStorage to reset all data.
- Slug-based URLs: Routes use slugified names (e.g.,
/my_org/my_project) instead of UUIDs for better readability - Slugification: Names are converted to lowercase with underscores, handling international characters (see
src/utils/slugify.ts) - Duplicate Prevention: Organization and project names must be unique (case-insensitive check)
- SSH Keys: When provisioning resources, all SSH keys from the project are automatically included at the top level of the request
- Request Structure: POST requests use a flat structure with
projectId/organizationIdcontaining slugs, not UUIDs - Resource Deletion: Resources delete immediately without confirmation dialog
- Custom Endpoints: Buttons for custom endpoints call
/tokenendpoint and open the returned URL in a new window - Provider Discovery: Providers are discovered on first visit to project view
- Error Handling: API errors are displayed inline with user-friendly messages
- Tailwind v4: Using the new Tailwind CSS v4 with
@import "tailwindcss"syntax