Oracle3
Open-source trading engine and MCP server for prediction markets. Fee-aware no-arbitrage trading across related contracts, live on Kalshi, Polymarket and Solana or on paper.
TIP-IT — propinas digitales, simples y directas.
Translation pending
FinanceJavaScript · SwiftGitHub @rodrigovargar-commitsOnlineOwner 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.
Plataforma de propinas digitales. Los trabajadores reciben propinas vía QR único o búsqueda por username; los clientes pagan con tarjeta a través de Stripe Connect. • Frontend: React 18 + Vite + Tailwind CSS + PWA (vite-plugin-pwa) • Backend: Node.js + Express.js • Base de datos: MongoDB (Mongoose) • Pagos: Stripe (PaymentIntents + Connect Express) • Auth: JWT (24h) + bcrypt • Node.js 18+ • MongoDB (local o Atlas) • Cuenta de Stripe (modo test) con Connect habilitadoRead the full README ↗
Plataforma de propinas digitales. Los trabajadores reciben propinas vía QR único o búsqueda por username; los clientes pagan con tarjeta a través de Stripe Connect.
vite-plugin-pwa)tip-it/
├── backend/ API REST (Express + MongoDB + Stripe)
│ └── src/
│ ├── config/ conexión a Mongo, cliente de Stripe
│ ├── models/ User, Worker, Transaction
│ ├── middleware/ auth (JWT), rate limiting, validación, errores
│ ├── controllers/ lógica de negocio por dominio
│ └── routes/ definición de endpoints
└── frontend/ PWA React (mobile-first)
└── src/
├── pages/ landing, auth, worker, client, historial, perfil
├── components/ nav, tarjetas, rating, rutas protegidas
├── context/ AuthContext (sesión JWT)
└── services/ cliente axios
El proyecto incluye un mongod real (v8.2.6) en backend/.mongo/bin que guarda sus
datos en backend/.mongo/data — no requiere Homebrew ni permisos de administrador.
cd backend
npm run mongo:start # arranca MongoDB en localhost:27017
npm run mongo:status # verifica que está corriendo
npm run mongo:stop # lo detiene
MONGO_URI=mongodb://localhost:27017/tip-it en .env ya apunta a este Mongo local.
Si prefieres MongoDB Atlas, simplemente reemplaza MONGO_URI por tu cadena de conexión.
cd backend
cp .env.example .env # completa con tus valores reales
npm install
npm run mongo:start # levanta MongoDB local (una sola vez por sesión de trabajo)
npm run dev # http://localhost:5050 (ver nota de macOS abajo)
Variables de entorno (backend/.env):
| Variable | Descripción |
|---|---|
PORT | Puerto del servidor API (default 5000) |
CLIENT_URL | URL del frontend, usada por CORS y para construir los links del QR |
MONGO_URI | Cadena de conexión a MongoDB |
JWT_SECRET | Secreto para firmar tokens JWT |
JWT_EXPIRES_IN | Expiración del token (default 24h) |
STRIPE_SECRET_KEY | Clave secreta de Stripe |
STRIPE_WEBHOOK_SECRET | Secreto del endpoint de webhooks de Stripe |
STRIPE_CONNECT_REFRESH_URL / STRIPE_CONNECT_RETURN_URL | URLs de retorno del onboarding de Stripe Connect |
PLATFORM_FEE_PERCENT | Comisión de TIP-IT sobre cada propina (4–6 recomendado) |
macOS: el puerto 5000 suele estar ocupado por AirPlay Receiver (Control Center). Por eso
backend/.envyfrontend/.enven esta máquina ya están configurados conPORT=5050/VITE_API_URL=http://localhost:5050/api. Sinpm run devfalla conEADDRINUSEen otra máquina, cambiaPORT(yVITE_API_URL) a un puerto libre, o desactiva AirPlay Receiver en Preferencias del Sistema → General → AirDrop y Handoff.
cd frontend
cp .env.example .env # completa con tus valores reales
npm install
npm run dev # http://localhost:5173
Variables de entorno (frontend/.env):
| Variable | Descripción |
|---|---|
VITE_API_URL | URL base de la API (http://localhost:5000/api en desarrollo) |
VITE_STRIPE_PUBLISHABLE_KEY | Clave publicable de Stripe |
pk_test_...) → frontend/.env → VITE_STRIPE_PUBLISHABLE_KEYsk_test_...) → backend/.env → STRIPE_SECRET_KEYEl proyecto incluye el Stripe CLI en
backend/.stripe-cli (descargado directo del release oficial, sin Homebrew) y ya
está autenticado con tu STRIPE_SECRET_KEY — no hace falta stripe login.
cd backend
npm run stripe:listen # reenvía eventos de Stripe a localhost:5050/api/webhooks/stripe
Déjalo corriendo en una terminal aparte mientras trabajas (junto con npm run dev y
npm run mongo:start). El whsec_... que imprime ya está guardado en
STRIPE_WEBHOOK_SECRET dentro de backend/.env; si alguna vez cambia, actualízalo ahí.
Para probar que el webhook funciona sin hacer un pago completo:
./.stripe-cli/stripe trigger payment_intent.succeeded --api-key "$(grep STRIPE_SECRET_KEY .env | cut -d= -f2)"
Deberías ver 200 OK tanto en la terminal del listener como en los logs del backend.
Ya está todo configurado en esta máquina. Para trabajar necesitas 3 terminales:
# Terminal 1
cd backend && npm run mongo:start && npm run dev
# Terminal 2
cd backend && npm run stripe:listen
# Terminal 3
cd frontend && npm run dev
Luego abre http://localhost:5173. Cuentas de prueba ya creadas:
[email protected] / password123 (@ana_barber, Stripe Connect activo)[email protected] / password123POST /api/workers/stripe/onboarding-link genera el link de onboarding.POST /api/tips/create-intent crea un PaymentIntent con
transfer_data.destination = cuenta conectada del trabajador y
application_fee_amount = comisión de TIP-IT. Stripe se encarga de la
transferencia automática al trabajador (24–48h según el payout schedule).payment_intent.succeeded (fuente de verdad) y el endpoint
POST /api/tips/confirm (UX inmediata + rating/comentario) actualizan el
estado de la transacción y las estadísticas del trabajador.Todas las rutas cuelgan de /api. Las marcadas 🔒 requieren Authorization: Bearer <token>.
| Método | Ruta | Descripción |
|---|---|---|
| GET | /health | Estado del servicio |
| POST | /auth/register | Registro (nombre, email, teléfono, password) |
| POST | /auth/login | Login, devuelve JWT |
| GET 🔒 | /users/me | Perfil del usuario autenticado + perfil de trabajador si aplica |
| PUT 🔒 | /users/profile | Editar nombre, teléfono, avatar, documento (KYC) |
| POST 🔒 | /workers/register | Crear perfil de trabajador (username, bio) + genera QR |
| GET | /workers/:username | Perfil público de un trabajador |
| GET 🔒 | /workers/:id/stats | Estadísticas (solo el dueño): total recibido, propinas, rating |
| PUT 🔒 | /workers/profile | Editar bio del trabajador |
| POST 🔒 | /workers/stripe/onboarding-link | Crea/relanza el onboarding de Stripe Connect |
| GET 🔒 | /workers/stripe/status | Estado de la cuenta de Stripe Connect |
| POST 🔒 | /tips/create-intent | Crea el PaymentIntent para una propina |
| POST 🔒 | /tips/confirm | Confirma el pago y adjunta rating/comentario |
| GET 🔒 | /tips/history | Historial (?role=worker|client) |
| POST | /webhooks/stripe | Webhook de Stripe (raw body, firma verificada) |
| GET | /qr/:userid | Código QR (data URL) de un trabajador por su userId |
trust proxy habilitado)express-validator en todas las rutas mutableshelmet para cabeceras HTTP seguras y express-mongo-sanitize contra NoSQL injectionEl frontend usa vite-plugin-pwa (manifest + service worker con auto-actualización),
por lo que npm run build genera una app instalable con soporte offline básico para
el shell de la aplicación.
Backend en Render, frontend en Vercel, base de datos en MongoDB Atlas. Cada uno de los tres pasos siguientes requiere que tú crees la cuenta correspondiente (no puedo crear cuentas de terceros por ti) — te dejo la ruta exacta a seguir.
# Crea el repo vacío en github.com/new (sin README, sin .gitignore, sin licencia)
git remote add origin https://github.com/TU_USUARIO/tip-it.git
git branch -M main
git push -u origin main
0.0.0.0/0 (permite conexión desde cualquier IP —
Render/Railway no tienen IPs fijas en el plan gratuito).mongodb+srv://usuario:[email protected]/tip-it). Esa es tu MONGO_URI
de producción.tip-it — Render detecta
backend/render.yaml automáticamente y crea el servicio.sync: false, complétalas:
MONGO_URI → la cadena de Atlas del paso 2STRIPE_SECRET_KEY → tu key de Stripe (usa sk_live_... solo cuando actives el
modo real; mientras tanto sigue con sk_test_...)CLIENT_URL, STRIPE_CONNECT_REFRESH_URL, STRIPE_CONNECT_RETURN_URL → el
dominio de Vercel del paso 4 (p. ej. https://tip-it.vercel.app,
.../worker/stripe/refresh, .../worker/stripe/return)STRIPE_WEBHOOK_SECRET → lo obtienes en el paso 5https://tip-it-backend.onrender.com — pruébala con
curl https://tip-it-backend.onrender.com/api/health.tip-it.frontend (Vercel detecta Vite automáticamente).VITE_API_URL → https://tip-it-backend.onrender.com/api (URL de Render + /api)VITE_STRIPE_PUBLISHABLE_KEY → tu pk_test_... (o pk_live_... en real)https://tip-it.vercel.app) — regresa al
paso 3 y actualiza CLIENT_URL / STRIPE_CONNECT_* en Render con esa URL real.https://tip-it-backend.onrender.com/api/webhooks/stripe.payment_intent.succeeded, payment_intent.payment_failed,
account.updated.whsec_... que te da Stripe y agrégalo como STRIPE_WEBHOOK_SECRET en Render.sk_test_... / pk_test_... por sk_live_... / pk_live_... en Render y
Vercel — esto requiere que Stripe apruebe tu cuenta (verificación de negocio real,
no modo test).PLATFORM_FEE_PERCENT a tu modelo de comisión real (4–6% + fee de Stripe).manual o daily) según qué tan
rápido quieras liberar fondos a los trabajadores.CLIENT_URL en Render y VITE_API_URL en Vercel apuntan a los
dominios finales (con HTTPS, que Render y Vercel proveen automáticamente).