CleanFrame
A personal home screen for Samsung The Frame. A starting point to fork and adapt.
Nuestra mascota virtual
Translation pending
LifestyleTypeScript · JavaScriptGitHub @Antony-potatoOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
🐰 Pocky — Mascota Virtual para Dos Una mascota virtual compartida entre dos personas, construida con Next.js PWA + Firebase. Funciona en iPhone (Safari) y Android (APK con Capacitor), sin costo alguno.Read the full README ↗
Una mascota virtual compartida entre dos personas, construida con Next.js PWA + Firebase. Funciona en iPhone (Safari) y Android (APK con Capacitor), sin costo alguno.
iPhone (PWA Safari) ──┐
├──→ Firebase Firestore ←── cron-job.org (cada 15 min)
Android (APK) ──┘ (datos) (degrada stats)
pocky-next/
├── src/
│ ├── app/
│ │ ├── layout.tsx ← PWA meta tags
│ │ ├── page.tsx ← página raíz
│ │ ├── globals.css ← Tailwind base
│ │ └── api/
│ │ └── cron/
│ │ └── tick/
│ │ └── route.ts ← endpoint de degradación (Vercel lo llama cada hora)
│ ├── components/
│ │ ├── PetScreen.tsx ← pantalla principal (HUD + acciones sobre la escena 3D)
│ │ └── scene/
│ │ ├── World.tsx ← Canvas, cámara que sigue a Pocky, luces según la hora
│ │ ├── Island.tsx ← isla generada por código (casa, árboles, estanque...)
│ │ ├── Pocky.tsx ← gato hecho de piezas + animaciones + a dónde va
│ │ └── nav.ts ← puntos de paso por los que camina
│ ├── store/
│ │ └── petStore.ts ← estado global + sync Firebase
│ ├── lib/
│ │ ├── firebase.ts ← cliente Firebase
│ │ ├── petLogic.ts ← lógica pura (compartida con cron)
│ │ └── timeBackground.ts ← iluminación según la hora
│ └── types/
│ └── pet.ts ← tipos TypeScript
├── public/
│ ├── manifest.json ← PWA manifest
│ └── icons/ ← íconos de la app (agregar manualmente)
│ ├── icon-192.png
│ └── icon-512.png
├── next.config.ts
├── tailwind.config.ts
├── postcss.config.mjs
├── tsconfig.json
├── .env.example ← plantilla de variables de entorno
└── .gitignore
npm install
cp .env.example .env.local
Edita .env.local con tus credenciales:
# Cliente (Firebase Web) — desde console.firebase.google.com
NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_FIREBASE_PROJECT_ID=...
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=...
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=...
NEXT_PUBLIC_FIREBASE_APP_ID=...
# Servidor (Firebase Admin) — desde Configuración > Cuentas de servicio > Generar clave
FIREBASE_PROJECT_ID=...
FIREBASE_CLIENT_EMAIL=...
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
# Cron — cualquier string largo y aleatorio
CRON_SECRET=pon_aqui_algo_largo_y_aleatorio
npm run dev
Pocky</> (Web) → registrar app → copiar config a .env.localproject_id, client_email, private_key a .env.localgit init
git add .
git commit -m "first commit"
git remote add origin https://github.com/TU_USUARIO/pocky.git
git push -u origin main
.env.localEl tick lo dispara cron-job.org cada 15 min: GET https://pocky-next.vercel.app/api/cron/tick con la cabecera Authorization: Bearer TU_CRON_SECRET. No uses los crons de vercel.json: el plan Hobby solo permite uno diario.
tudominio.com⬆Pocky → AgregarLa app aparece en tu pantalla de inicio como cualquier otra app.
Próximamente — ver Fase 4 del roadmap
npm install @capacitor/core @capacitor/android
npx cap init
npm run build
npx cap add android
npx cap sync
npx cap open android # abre Android Studio para generar el APK
Próximamente — ver Fase 5 del roadmap
Scriptable lee Firebase directamente y muestra el estado de Pocky en tu pantalla de inicio.
| Fase | Estado | Descripción |
|---|---|---|
| 1 — Base | ✅ Lista | Mascota con stats, ASCII art, animaciones, Firebase sync |
| 2 — Deploy | 🔜 | Vercel + tu dominio, cron de degradación 24/7 |
| 3 — PWA | 🔜 | Instalar en iPhone desde Safari |
| 4 — APK Android | 🔜 | Capacitor → APK con widget nativo |
| 5 — Widget iPhone | 🔜 | Scriptable lee Firebase |
| 6 — Notificaciones | 🔜 | Firebase Cloud Messaging push 24/7 |
| 7 — Personalización | 🔜 | Nombre, especie, accesorios, historial |
| Stat | Baja cuando... | Sube con... |
|---|---|---|
| 🍖 Hambre | Con el tiempo (0.8/min) | Alimentar, golosina |
| 😊 Felicidad | Con el tiempo (0.5/min) | Jugar, pasear, golosina |
| 🫧 Limpieza | Con el tiempo (0.3/min) | Bañar |
| ⚡ Energía | Jugando, paseando (0.4/min) | Durmiendo |
| ❤️ Salud | Si 2+ stats < 20 | Cuidado constante |
cron-job.org llama a /api/cron/tick cada 15 min: aplica la degradación aunque nadie tenga la app abierta y, si Pocky necesita algo, envía una notificación por FCM (máx. una cada 4 h).
| Mood | Condición |
|---|---|
| 😸 Feliz | Promedio stats > 80 |
| 😐 Neutral | Promedio 60–80 |
| 🥺 Triste | Promedio 30–60 |
| 🤒 Enfermo | Salud < 30 o promedio < 30 |
| 😴 Durmiendo | isAsleep = true |
Edita src/lib/petLogic.ts:
export const DEFAULT_PET: PetData = {
name: 'Pocky', // ← cambia el nombre
species: 'bunny', // ← 'bunny' | 'cat' | 'dog' | 'hamster'
...
}
Todo es geometría generada por código, sin modelos externos:
src/components/scene/Island.tsx — listas de posiciones (TREES, BUSHES, PONDS, PATHS...) y una función por pieza (House, Campfire, Bridge...).src/components/scene/Pocky.tsx — colores en FUR/LINE/PINK, piezas en el JSX y poses en el useFrame.src/components/scene/nav.ts — si mueves algo de la isla, ajusta los nodos y comprueba con npm run check.Edita src/lib/petLogic.ts en la función applyTick:
hunger = clamp(hunger - mins * 0.8); // ← número más alto = baja más rápido
| Variable | Dónde se usa | Descripción |
|---|---|---|
NEXT_PUBLIC_FIREBASE_* | Cliente (browser) | Conexión Firebase desde la app |
FIREBASE_PROJECT_ID | Servidor (cron) | Firebase Admin SDK |
FIREBASE_CLIENT_EMAIL | Servidor (cron) | Firebase Admin SDK |
FIREBASE_PRIVATE_KEY | Servidor (cron) | Firebase Admin SDK |
CRON_SECRET | Servidor (cron) | Protege el endpoint /api/cron/tick |
⚠️ Nunca subas
.env.locala git — ya está en.gitignore
Proyecto personal — hecho con 🐰 y mucho amor.