">
 

How to host an app your AI built with its own URL and saved data

Iniciado por joomlamz, Ontem às 22:25

Respostas: 1   |   Visualizações: 1

Tópico anterior - Tópico seguinte

0 Membros e 1 Visitante estão a ver este tópico.

Saudações a todos os membros e entusiastas da tecnologia no fórum **webmastersmz.com**.

É um prazer analisar este tópico, que toca num ponto nevrálgico da actualidade: a democratização do desenvolvimento de software através da Inteligência Artificial. O guia sobre "Como alojar uma aplicação construída por IA com URL próprio e dados guardados" é extremamente relevante para o nosso ecossistema em Moçambique, onde a agilidade na entrega de soluções digitais pode ser um diferencial competitivo.

Como especialista, gostaria de destacar os pontos fundamentais desta abordagem e trazer algumas nuances técnicas:

1.  **O Salto do Protótipo para a Produção:** Ferramentas como o Cursor, Replit ou v0.dev facilitam a escrita do código, mas o "alojamento" (hosting) requer atenção à escalabilidade. Mudar de um ambiente de *preview* para um domínio personalizado (como `.co.mz` ou `.com`) exige uma configuração correcta de DNS (registos A e CNAME), algo que muitos devs iniciantes ainda confundem.
2.  **Persistência de Dados (The "Saved Data" Part):** Uma aplicação só é útil se retiver informação. O uso de bases de dados geridas (como Supabase ou PostgreSQL no Railway) é a recomendação padrão. Para a nossa realidade, é crucial escolher regiões de servidores que minimizem a latência para utilizadores na África Austral.
3.  **CI/CD e Automação:** Ao conectar o repositório (GitHub/GitLab) à plataforma de alojamento, garantimos que qualquer melhoria sugerida pela IA e aceite pelo dev seja reflectida automaticamente no URL final. Isto é o que chamamos de fluxo de trabalho moderno.

**Incentivo ao debate no webmastersmz.com:**
Gostaria de lançar algumas questões para a malta do fórum:
*   Quais plataformas de alojamento têm usado para os vossos projectos gerados por IA aqui em Moçambique?
*   Como estão a lidar com a integração de gateways de pagamento locais (como M-Pesa ou e-Mola) nestas apps construídas rapidamente por IA?
*   A latência de servidores internacionais tem sido um entrave para as vossas aplicações interactivas?

Vamos dinamizar esta conversa no fórum e partilhar as nossas "manhas" técnicas!

Para garantir que os vossos projetos e fóruns rodam sem falhas, convido-vos a conhecer as soluções de alojamento de alta performance da **AplicHost** em [https://aplichost.com](https://aplichost.com). Ter uma infraestrutura robusta é o passo final para transformar uma ideia da IA num negócio de sucesso.

How to host an app your AI built with its own URL and saved data



Tópico: How to host an app your AI built with its own URL and saved data
Categoria: Tutoriais | Programação & Tecnologia
Idioma Principal: Português (Conteúdo de Tecnologia)

Descrição do Conteúdo / Informações:
-------------------------------------------------------------------------
Claude can write a working app right inside a chat. Close the chat and it's gone: no URL, no saved data, nothing to open tomorrow. This is how you turn that throwaway app into a hosted one with its own URL and a database behind it. The example is a reading list, live at charm.ing/avi/reading-list.

The thing doing the hosting is Charming. Claude writes the code, Charming runs it. You keep using Claude, or whatever agent you already pay for. Charming is just where the app lives once the conversation ends.

The canonical guide has the full walkthrough and screenshots. This version is for developers: how the connector hooks up, what the published module looks like, and how other agents reach it afterward.



Connect Charming to Claude


Charming plugs into Claude as a custom MCP connector. One-time setup:

• Open claude.ai/customize/connectors.

• Choose Add custom connector, name it Charming, and paste the connector URL: https://charm.ing/mcp.

• Approve it so Claude can call Charming's tools.

Screenshots and troubleshooting: usecharming.com/setup/claude.



Ask Claude to build it, then publish it


In a normal Claude chat:

Build me a reading list app. I want to add books with a title and author, move each one between to-read, reading, and read, and give finished books a star rating.

Claude writes it and previews it inline. So far it's just like any other in-chat app. Then:

Create this on Charming so it has its own URL and saves my data.

Claude calls the connector and hands back a live URL. That's your hosted app, with storage behind it and an API other agents can call later.



What Claude actually publishes


Under the connector, Claude authors and ships one ES module with two named exports:

export const manifest = {
id: 'reading-list',
version: '0.0.1',
displayName: 'Reading list',
capabilities: {
imports: ['buildy:storage/[email protected]'], // gives the handlers env.storage
exports: [],
},
};

export const routes = [
{
op: 'list',
method: 'GET',
handler: async (_input, { env }) => (await env.storage.get('books')) ?? [],
},
{
op: 'add',
method: 'POST',
handler: async (input, { env }) => {
const books = (await env.storage.get('books')) ?? [];
books.push({ ...input, status: 'to-read' });
await env.storage.put('books', books);
return books;
},
},
];

No server to stand up, no database to provision. env.storage is per-app key/value storage that survives every later update, and each declared route becomes a discoverable operation at /app/<id>/api/*.



Same app, reachable two ways


Once it's published you're not locked into the chat that built it. Two ways in:

• Over MCP: point any MCP-capable agent at https://charm.ing/mcp and it can read or write the same app's data.

• Over HTTP: POST https://charm.ing/api/pair/start pairs an agent to your account. From there POST /app creates an app and PUT /app/<id> updates one, and every declared route is callable at /app/<id>/api/<op>.

One data store, more than one agent. From a fresh chat I asked Claude to add the Harry Potter series to the same list. It read the existing app over the connector and queued all seven as to-read. I never touched the storage layer.



Reopen it later


Close the Claude conversation. Open the app's URL again days later, in a new tab. Everything's still there: the books, the statuses, the ratings. They live in Charming's storage, not in the chat transcript.



Links


• Canonical guide (screenshots + the full walkthrough): https://usecharming.com/blog/how-to-host-an-app-built-with-claude

• Live demo: https://charm.ing/avi/reading-list

• Claude connector setup: https://usecharming.com/setup/claude/

• Public repo: https://github.com/tambo-labs/charming-mcp


Joomlamz
Consultoria em Informática
-------------------------------------------------------
Especialista em Sistemas Web & Manutenção de Servidores.
A desenvolver o novo AplPortal com suporte a PHP 8.
Precisa de ajuda profissional? Contacte-me.

Tags: