diff --git a/__pycache__/main.cpython-314.pyc b/__pycache__/main.cpython-314.pyc new file mode 100644 index 0000000..34e9677 Binary files /dev/null and b/__pycache__/main.cpython-314.pyc differ diff --git a/alertas.html b/alertas.html new file mode 100644 index 0000000..dead2b5 --- /dev/null +++ b/alertas.html @@ -0,0 +1,135 @@ + + + + + + Configurar alertas + + + +
+

Configurar alertas

+

Elige cuándo quieres recibir notificaciones

+
+ +
+ 🔔 Las alertas te ayudan a sacar la basura a tiempo sin esperar afuera. +
+ +
+
+
+
🚛
+
+ Ruta por iniciar + Aviso cuando el camión salga del depósito +
+
+ +
+
+
+
📍
+
+ Camión aproximándose + Aviso 15 minutos antes de llegar +
+
+ +
+
+
+
⚠️
+
+ Retrasos o fallas + Aviso si el camión tiene un problema +
+
+ +
+
+
+
🌙
+
+ Ruta nocturna + Servicio especial desde las 10:00 p.m. +
+
+ +
+
+
✅ Preferencias guardadas correctamente
+ + + + + + + + + diff --git a/guia.html b/guia.html new file mode 100644 index 0000000..418c52e --- /dev/null +++ b/guia.html @@ -0,0 +1,100 @@ + + + + + + Guía de Separación de Residuos + + + +
+

Guía de separación

+

Aprende a clasificar tus residuos correctamente

+
+ +
+
+
🌿
+
Orgánicos
+
Se descomponen naturalmente
+ Cáscaras de fruta + Restos de comida + Café y té + Cáscaras de huevo +
+
+
♻️
+
Reciclables
+
Limpios y secos
+ Botellas PET + Latas de aluminio + Cartón limpio + Vidrio +
+
+
🚫
+
Sanitarios
+
No se reciclan
+ Pañales + Toallas sanitarias + Cubrebocas + Papel higiénico +
+
+
⚠️
+
Especiales
+
Requieren manejo especial
+ Pilas y baterías + Medicamentos + Electrónicos + Aceite usado +
+
+
+ ⏰ Saca tu basura solo cuando recibas la alerta. No persigas al camión. +
+ + + + \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..77ab744 --- /dev/null +++ b/main.py @@ -0,0 +1,29 @@ +from fastapi import FastAPI, Request +from fastapi.responses import HTMLResponse +from datetime import datetime + +app = FastAPI() + +reportes = [] + +@app.get("/guia", response_class=HTMLResponse) +def guia_separacion(): + with open("guia.html", "r", encoding="utf-8") as f: + return f.read() + +@app.get("/reportes", response_class=HTMLResponse) +def pagina_reportes(): + with open("reportes.html", "r", encoding="utf-8") as f: + return f.read() + +@app.get("/alertas", response_class=HTMLResponse) +def pagina_alertas(): + with open("alertas.html", "r", encoding="utf-8") as f: + return f.read() + +@app.post("/api/reportes") +async def recibir_reporte(request: Request): + datos = await request.json() + datos["fecha"] = datetime.now().strftime("%d/%m/%Y %H:%M") + reportes.append(datos) + return {"mensaje": "Reporte recibido correctamente", "total": len(reportes)} \ No newline at end of file diff --git a/reportes.html b/reportes.html new file mode 100644 index 0000000..8a0cdb5 --- /dev/null +++ b/reportes.html @@ -0,0 +1,109 @@ + + + + + + Reportar incidencia + + + + +
+

Buzón de reportes

+

Ayúdanos a mejorar el servicio

+
+ +
+ ⏰ Recuerda: solo saca la basura cuando recibas la alerta de llegada. +
+ +
+ + + + + + + + + + +
+ +
+
+

¡Reporte enviado!

+

Gracias por ayudarnos a mejorar el servicio de recolección.

+ +
+ + + + + + \ No newline at end of file