Empieza
Get started
Instalar Agpiko
Install Agpiko
El cliente solo debe dar lo que no se puede inventar solo: dominio, un servidor con Node, y un admin.
The customer only provides what cannot be invented alone: a domain, a Node server, and an admin account.
CLI
CLI
El camino fácil es un comando. Descarga el paquete firmado, comprueba el servidor y deja el sitio listo.
The easy path is one command. It downloads the signed package, checks the server, and leaves the site ready.
npx create-agpiko ./mi-sitio
Te pedirá dominio, email y contraseña (o usa --yes). Luego: admin en /admin/login. Actualizaciones: Buscar → Aplicar.
It asks for domain, email, and password (or use --yes). Then: admin at /admin/login. Updates: Check → Apply.
El paquete aún no está en el registro npm público. Mientras tanto, desde el árbol de origin: cd cli && npm run build && node dist/index.js create ./mi-sitio.
The package is not on the public npm registry yet. Until then, from the origin tree: cd cli && npm run build && node dist/index.js create ./mi-sitio.
Camino fácil
Easy path
Agpiko no se mete dentro de WordPress ni de un hosting solo PHP. Es una app Node con su panel.
Agpiko does not live inside WordPress or PHP-only hosting. It is a Node app with its own panel.
- Tienes un dominio (o uno que te den).
- Tienes un VPS Linux con Node 22.13+ (o nos dejas instalarlo nosotros).
- Corres la CLI (arriba). Entras a
/admin/login. - Las versiones nuevas: panel → Actualizaciones → Buscar → Aplicar.
- You have a domain (or one we give you).
- You have a Linux VPS with Node 22.13+ (or we install it for you).
- You run the CLI (above). Sign in at
/admin/login. - Later versions: panel → Updates → Check → Apply.
En tu PC
On your PC
Para probar. Tres cosas no se pueden saltar: Node, un email/contraseña de admin, y arrancar.
For trying it out. Three things cannot be skipped: Node, an admin email/password, and starting the app.
- Instala Node.js 22.13 o más nuevo.
- Abre el paquete. En
kernel/copia.env.examplea.env.localy pon solo email y contraseña de admin. - Ejecuta:
- Install Node.js 22.13 or newer.
- Open the package. In
kernel/copy.env.exampleto.env.localand set only the admin email and password. - Run:
npm install
npm run db:seed
npm run dev
Entra en la URL que imprime Next, luego /admin/login.
Open the URL Next prints, then /admin/login.
En un servidor
On a server
Lo mínimo que el cliente (o su proveedor) tiene que tener listo antes:
The minimum the customer (or their host) must have ready beforehand:
- DNS apuntando al VPS.
- Sitio en el panel (CloudPanel u otro) con TLS.
- Usuario Linux del sitio y un puerto libre.
- DNS pointing at the VPS.
- A site in the panel (CloudPanel or similar) with TLS.
- The site’s Linux user and one free port.
Después, un solo script (ops) hace el resto: descomprime, escribe .env.local, instala, compila, crea la base y arranca PM2. El proxy del panel debe apuntar a ese puerto.
After that, one ops script does the rest: unpack, write .env.local, install, build, create the database, and start PM2. The panel proxy must point at that port.
Si lo haces a mano (sin script), desde kernel/:
If you do it by hand (no script), from kernel/:
npm install
npm run build
npm run db:seed
pm2 start ./node_modules/next/dist/bin/next --name agpiko -- start -p 3008
pm2 save
Usa el mismo puerto en PM2 y en el proxy. El canal y la clave pública ya van con valores por defecto del instalador; no los inventes.
Use the same port in PM2 and in the proxy. Channel URL and public key come with installer defaults; do not invent them.
Entra en https://tu-dominio/admin/login.
Sign in at https://your-domain/admin/login.
Después
After that
No vuelvas a subir código a mano.
Do not upload code by hand again.
- Panel → Actualizaciones.
- Buscar.
- Aplicar.
- Panel → Updates.
- Check.
- Apply.
Eso reemplaza kernel/. Conserva site/, data/ y .env.local.
That replaces kernel/. It keeps site/, data/, and .env.local.
Qué pedimos y por qué
What we ask and why
| Paso | Step | ¿Hace falta pedírselo al cliente? | Ask the customer? |
|---|---|---|---|
| Dominio / DNS | Domain / DNS | Sí. Es suyo. Nosotros no podemos apuntarlo sin acceso. | Yes. It is theirs. We cannot point it without access. |
| TLS en el panel | TLS in the panel | Sí, o lo hace el proveedor. No vive dentro de Agpiko. | Yes, or the host does it. It does not live inside Agpiko. |
| Servidor con Node | Server with Node | Sí, o hosting gestionado por Agpiko. No corre en PHP solo. | Yes, or Agpiko-managed hosting. It will not run on PHP alone. |
| Email y contraseña admin | Admin email and password | Sí (o se genera y se la enviamos). | Yes (or we generate it and send it). |
| Canal y clave pública | Channel and public key | No. Van fijos en el instalador. | No. Fixed in the installer. |
npm install / build / seed / PM2 |
npm install / build / seed / PM2 |
No. Los hace el script. | No. The script does them. |
| Editar nginx a mano | Edit nginx by hand | No. El panel apunta el proxy al puerto. | No. The panel points the proxy at the port. |
| Elegir puerto | Pick a port | No, si el instalador elige uno libre. | No, if the installer picks a free one. |
Carpetas kernel/ site/ data/ |
kernel/ site/ data/ folders |
No. Salen del paquete. Solo debes saber que site/ es tu trabajo. |
No. They come from the package. Just know site/ is your project. |
| Actualizar por SFTP | Update by SFTP | Nunca. Usa Buscar → Aplicar. | Never. Use Check → Apply. |
Carpetas (referencia)
Folders (reference)
install/
kernel/ app (una actualización la reemplaza)
site/ tu proyecto (no se toca)
data/ SQLite y claves (no va en git)
Look público
Public look
El sitio público lo pinta un theme en site/themes/<id>/, exportado en site/themes/index.ts.
The public site is painted by a theme in site/themes/<id>/, exported from site/themes/index.ts.
components/ piezas que se reutilizan
sections/ un componente por bloque
templates/ una plantilla por tipo de contenido
index.ts
theme.css
templates/page es obligatoria. Es la plantilla del tipo page. La URL pública es /{slug}.
templates/page is required. It is the template for the page type. The public URL is /{slug}.
Otra forma de la misma pieza, sin quitar la actual:
Another look of the same piece, without removing the current one:
sections/Hero.tsx
sections/variations/Hero/Compact.tsx
La carpeta se llama como el archivo. El archivo se llama como la variación. Quien puede editar páginas ve tres puntos al pasar el cursor, en la esquina de esa pieza, y elige ahí.
The folder is named after the file. The file is named after the variation. Someone who can edit pages sees three dots on hover, at the corner of that piece, and picks there.
Opciones: el componente exporta componentSettings. scope page guarda la opción en ese bloque. scope site la guarda para todo el sitio. variationScope = "site" hace lo mismo con la variación de archivo. Esas opciones salen en el mismo menú. El componente recibe settings ya resuelto.
Options: the component exports componentSettings. scope page stores the option on that block. scope site stores it for the whole site. variationScope = "site" does the same for the file variation. Those options appear in the same menu. The component receives settings already resolved.
Texto: renderText pinta la etiqueta. Quien edita ve un lápiz al pasar el cursor. El clic hace editable esa misma etiqueta. Solo se guarda el idioma de la página abierta. El otro idioma no se reemplaza.
Copy: renderText paints the tag. An editor sees a pencil on hover. The click makes that same tag editable. Only the language of the open page is saved. The other language is not replaced.