diff --git a/README.md b/README.md index 5ad1377..e95c391 100644 --- a/README.md +++ b/README.md @@ -1,58 +1,154 @@ -
+# DummyBot Backend - +API REST y UI web para **DummyBot** — un bot físico de tareas para personas con TDAH, basado en ESP32 + ST7789 + caritas kawaii. -## About Laravel +Stack: **Laravel 12 · PHP 8.4 · MySQL 8 · Sanctum · Tailwind (CDN) + Alpine.js (CDN)**. -Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: +--- -- [Simple, fast routing engine](https://laravel.com/docs/routing). -- [Powerful dependency injection container](https://laravel.com/docs/container). -- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. -- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). -- Database agnostic [schema migrations](https://laravel.com/docs/migrations). -- [Robust background job processing](https://laravel.com/docs/queues). -- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). - -Laravel is accessible, powerful, and provides tools required for large, robust applications. - -## Learning Laravel - -Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. - -In addition, [Laracasts](https://laracasts.com) contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. - -You can also watch bite-sized lessons with real-world projects on [Laravel Learn](https://laravel.com/learn), where you will be guided through building a Laravel application from scratch while learning PHP fundamentals. - -## Agentic Development - -Laravel's predictable structure and conventions make it ideal for AI coding agents like Claude Code, Cursor, and GitHub Copilot. Install [Laravel Boost](https://laravel.com/docs/ai) to supercharge your AI workflow: +## 🚀 Setup rápido ```bash -composer require laravel/boost --dev +# 1. Crear BD +mysql -u root -p +> CREATE DATABASE dummybot CHARACTER SET utf8mb4; +> CREATE USER 'dummybot'@'localhost' IDENTIFIED BY 'TU_PASSWORD'; +> GRANT ALL ON dummybot.* TO 'dummybot'@'localhost'; -php artisan boost:install +# 2. Configurar +cp .env.example .env +# Edita DB_PASSWORD, APP_URL, etc. + +# 3. Instalar + migrar +composer install --no-dev --optimize-autoloader +php artisan key:generate +php artisan migrate + +# 4. Arrancar +php artisan serve --host=0.0.0.0 --port=8000 ``` -Boost provides your agent 15+ tools and skills that help agents build Laravel applications while following best practices. +Abre `http://localhost:8000/`. Crea una cuenta, ve a **Ajustes → Dispositivos** y crea tu primer DummyBot para obtener un token. -## Contributing +## 🐳 Docker -Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). +```bash +AUTO_MIGRATE=1 docker compose up -d --build +``` -## Code of Conduct +Esto levanta `dummybot_app` (PHP-FPM), `dummybot_web` (nginx) y `dummybot_db` (MySQL 8). El puerto 80 queda interno (el proxy externo ya está gestionado en producción). -In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). +## 🧠 Modelo de datos -## Security Vulnerabilities +| Tabla | Descripción | +|------------|-------------| +| `users` | Usuarios (auth vía Sanctum) | +| `tasks` | Tareas (`title`, `description`, `priority`, `estimate_min`, `deadline`, `recurrence`, `done`, `snooze_until`, `done_at`, `project_id`, `user_id`) | +| `projects` | Agrupa tareas (color + icono) | +| `tags` | Etiquetas transversales (muchas a muchas con tasks) | +| `devices` | Cada ESP32 con su propio `token` y `last_seen_at` | -If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. +## 🔌 API REST -## License +Todas las rutas devuelven JSON. Auth vía `Authorization: Bearer