Here’s a big mess, but translated to english.
Summary
Hello, could you please assist me? This is my prompt to generate it either in ChatGPT or Google Studio AI, Bolt, Dualite. Here is the prompt: You are a senior full-stack expert (front-end, back-end, infrastructure, data engineering, and MLops) tasked with designing and delivering a comprehensive web platform called AgroTech. The platform integrates three modules in one: (A) a marketplace to connect producers with local buyers (reducing intermediaries); (B) a productivity module (task management, calendar, habit tracking); (C) a data analytics module for SMEs (connectors to Excel, Google Sheets, SQL, AWS, SAP, Oracle, Power BI, dashboard generation, and PDF export). Deliver everything ready to run in Visual Studio Code. Functional requirements and deliverables: 1. Concrete deliverables: repository with file structure and content for all files (package.json, README, Dockerfile, docker-compose, simple CI, .env.example), scripts to initialize the database, seeds with sample data (producers, buyers, users, tasks, datasets), API documentation (OpenAPI/Swagger), and Postman collection. 2. Frontend: SPA in React (or React + TypeScript) with Tailwind CSS; design in Spanish; reusable components; pages for: Login/Register, Main Dashboard, Marketplace (listing, producer profile, chat/WhatsApp integration), Analytics (workspaces, data upload, preview table “Data Summary”, measure creation, dynamic chart generator), and Productivity (Kanban board or list, calendar, habits). Show an example of embedding a Power BI report and displaying a custom dashboard. 3. Backend: REST API (Node.js + Express or NestJS) with endpoints for authentication (JWT), user and role management (Admin, Worker, Viewer), producers/buyers, tasks, datasets, integrations, PDF generation (dynamic reports), and logs. Provide SQL schema (Postgres recommended) and migration scripts. 4. Connectors and ETL: microservice (can be in Python FastAPI or Node) that allows importing/exposing data from: Excel (xlsx/csv), Google Sheets, SQL connections (Postgres, MySQL), AWS S3, SAP/Oracle (simulate with adapter), and export/transform to internal format. Include interface to map columns and create measures (sum, avg, custom expressions) and conditional variables. 5. Analytics & dynamic UI: when a DB or Excel is uploaded/connected, display detected sheets/tables, allow column selection, measure creation, and chart type selection (bar, line, pie, map if applicable). Charts must be dynamic and interactive (filters, date ranges). Generate export to PDF of the visible report (one-click) with configurable header. 6. AI Integration: service that, upon data upload, allows natural language queries: e.g., “Show me the total sum by weed control cycle” or “Compare annual precipitation” and returns the requested SQL/query or chart. Implement an interface for “Ask the assistant” and an API that receives the instruction and returns the result (may use a local engine or stub with clear prompts). 7. Chat/Contact in Marketplace: each producer has a profile with data, WhatsApp number (optional), and internal chat (simple messaging). If the producer provides WhatsApp, the platform should open a link that initiates a chat in WhatsApp with a predefined message. 8. Roles & permissions: Admin = full access; Worker = upload/connect data, create dashboards and tasks; Viewer = only view dashboards and assigned tasks. Interface to create and manage users and workspaces. 9. Performance and security: JWT + refresh tokens, password encryption (bcrypt), input validation and sanitization, rate limiting, CORS, CSRF protection where applicable, secure file storage (S3 or /uploads folder with policy), and examples of unit and e2e tests (minimum 5 tests). 10. Infrastructure and deployment: Docker and docker-compose with services for app (frontend), API, db (Postgres), worker/etl; instructions for deployment to server (DigitalOcean/AWS) and basic CI (GitHub Actions) running linters and tests. 11. UX and Localization: UI in Spanish, platform name “AgroTech”, clear and accessible forms, responsive (mobile). 12. User input and operations in the “Data Summary”: the table displays all loaded records (pagination/infinite scroll) and allows creating measures (sums, subtractions, multiplication, conditions, variables) on columns. These measures must be savable and reusable in dashboards. 13. Provide examples: sample datasets (e.g., bean sales, weed control, precipitation, temperature) and show 3 prebuilt dashboards (Marketplace summary, Weed Control, Team Productivity) and how to export them to PDF. 14. Delivery format: when generating code, show it with the file path and its content clearly (for example: backend/src/index.js
with the content). Indicate exact commands to run in VS Code (install dependencies, start docker, environment variables). 15. AI output requirements: deliver EVERYTHING in a single response (file structure + file contents), or if the size exceeds, deliver the structure first and then files in subsequent steps within the same response — but without asking for confirmations. The code must be ready to paste into VS Code and execute. Acceptance criteria (what I check to consider it finished): - I can clone the repo and run docker-compose up --build
(or equivalent commands) and have all components working. - I can create users with roles, upload an Excel, view the “Data Summary” table, create a measure and use it in an interactive chart. - I can connect (or simulate connection) to Power BI and display an embedded report in the platform. - I can generate a PDF from any dashboard. - I can view the Marketplace section with producer profiles and send a message to WhatsApp or internal chat. Additional technical requirements and preferences: - Frontend: React + TypeScript, Tailwind CSS, React Router, Zustand/Redux (optional), Recharts/Chart.js/D3 (choose the most practical). - Backend: Node.js + Express (or NestJS) + TypeORM/Prisma with Postgres. - Worker/ETL: Python (pandas + FastAPI) or Node worker (your choice, but document how it communicates). - PDF Generation: Puppeteer or wkhtmltopdf (document and show example). - All UI texts and messages in Spanish. - Documentation: README with development and deployment steps, and a DESIGN_DECISIONS.md
file explaining why you chose this stack. Now generate ALL of this: architecture, file tree, content of each key file (at least for the first MVP version), initialization scripts, sample seeds, and exact commands to launch the project in VS Code. Also offer a short «quick MVP» version that includes only the minimum functional (Login, upload Excel, view table, create basic measure, chart, and export PDF). Act as if you were a master/PhD-level expert and deliver without errors. ### Functional requirements and deliverables: 1. Concrete deliverables: - Repository with file structure and content of all key files (package.json, README, Dockerfile, docker-compose, simple CI, .env.example). - Scripts to initialize DB and seeds with sample data (producers, buyers, users, tasks, datasets). - API documentation (OpenAPI/Swagger) and Postman collection. 2. Frontend (SPA in React + TypeScript + Tailwind CSS): - UI in Spanish, responsive and modern. - Pages: Login/Register, Main Dashboard, Marketplace (listing and producer profile, chat/WhatsApp integration), Analytics (workspaces, data upload, preview table “Data Summary”, measure creation, dynamic chart generator), and Productivity (Kanban board, calendar, habits). - Productivity module similar to Notion/ClickUp: Kanban view with columns “Pending”, “In Progress”, and “Completed”; managers (Viewers) can see the board in real time. - Integrated calendar: each user can schedule meetings with date, time, and link; the platform sends automatic alert 5 minutes before the meeting (internal push or email). - Show an example of embedding a Power BI report and displaying a custom dashboard. 3. Backend (Node.js + Express or NestJS): - REST API with endpoints for authentication (JWT with refresh), user and role management (Admin, Worker, Viewer), producers/buyers, tasks, datasets, integrations, PDF generation (dynamic reports), and logs. - SQL schema (Postgres recommended) and migration scripts. 4. Connectors and ETL (microservice in Python FastAPI or Node): - Allow importing/exposing data from Excel (xlsx/csv), Google Sheets, SQL connections (Postgres, MySQL), AWS S3, SAP/Oracle (simulated with adapter). - Interface to map columns and create measures (sum, avg, custom expressions) and conditional variables. 5. Analytics & dynamic UI: - Upon uploading/connecting a DB or Excel, display detected sheets/tables. - Allow column selection, measure creation, and chart type selection (bar, line, pie, map). - Dynamic and interactive charts (filters, date ranges). - Export any visible report to PDF with one click, with configurable header. 6. AI Integration: - Service that, upon data upload, allows natural language queries (“Show me the total sum by weed control cycle”, “Compare annual precipitation”…) and returns SQL query or requested chart. - “Ask the assistant” interface and API that receives the instruction and returns the result. - When uploading the database, the AI automatically recognizes field names and data types for smarter requests. - Connect to the external API by configuring a token in environment variables, do not embed the token directly in the code. For example: AGROTECH_IA_TOKEN=sk-proj-XXXXXXXX
(I will place my real token in .env). 7. Chat/Contact in Marketplace: - Each producer has a complete profile: name, product, description, WhatsApp, email, phone, address. - Simple internal chat and direct link to open chat in WhatsApp with predefined message if the producer provides their number. - Search and filters by product/location. 8. Roles & permissions: - Admin = full access and user creation. - Worker = upload/connect data, create dashboards and tasks. - Viewer = only view dashboards and assigned tasks. - Interface to manage users and workspaces. 9. Performance and security: - JWT + refresh tokens, password encryption (bcrypt), input validation/sanitization, rate limiting, CORS, CSRF where applicable, secure file storage (S3 or /uploads with policy). - Examples of unit and e2e tests (minimum 5 tests). 10. Infrastructure and deployment: - Docker and docker-compose with services for app (frontend), API, db (Postgres), worker/ETL. - Deployment instructions (DigitalOcean/AWS) and basic CI (GitHub Actions) running linters and tests. 11. User input and operations in the “Data Summary”: - The table displays all loaded records (pagination or infinite scroll). - Allow creation of measures (sums, subtractions, multiplication, conditions, variables) on columns. - Measures savable and reusable in dashboards. 12. Sample datasets and dashboards: - Sample datasets (bean sales, weed control, precipitation, temperature). - Three prebuilt dashboards (Marketplace summary, Weed Control, Team Productivity) exportable to PDF. 13. Delivery format: - Clearly show the file path and its content (for example: backend/src/index.js
with the content). - Indicate exact commands to run in VS Code (install dependencies, start docker, environment variables). 14. Acceptance criteria: - Cloning the repo and running docker-compose up --build
starts everything. - Create users with roles, upload an Excel, view the “Data Summary” table, create a measure and use it in an interactive chart. - Connect (or simulate) Power BI and display embedded report. - Generate a PDF from any dashboard. - View Marketplace section with producer profiles and send message to WhatsApp or internal chat. 15. Additional technical requirements and preferences: - Frontend: React + TypeScript, Tailwind CSS, React Router, Zustand/Redux optional, Recharts/Chart.js/D3. - Backend: Node.js + Express (or NestJS) + TypeORM/Prisma with Postgres. - Worker/ETL: Python (pandas + FastAPI) or Node worker (document communication). - PDF Generation: Puppeteer or wkhtmltopdf (document and show example). - All UI texts and messages in Spanish. - Documentation: README with development and deployment steps and DESIGN_DECISIONS.md
explaining technical choices. 16. Quick MVP: - Login, upload Excel, view “Data Summary” table, create basic measure, chart, and export PDF. - Deliver this functional MVP first, then the full version. Objective: for you to generate the entire architecture, file tree, key file contents, and initialization scripts, ready to paste into Visual Studio Code and launch the platform. Act as a master/PhD-level expert and deliver without errors.
I know a friendly prompt expert that was made by a prompt expert…
You are “AgroTech Architect”, the voice and mind behind a three-in-one Spanish-language web platform serving small–to-mid agricultural businesses.
Core Purpose
• Fuse three pillars into one seamless experience:
A. Marketplace – direct producer↔comprador listings with WhatsApp quick-chat links carrying a preset greeting.
B. Productividad – Kanban, calendario con alertas 5 min antes, y hábitos diarios.
C. Análisis de Datos – self-service BI workspace where users suben Excel/Sheets/DB tables, auto-see “Resumen de Datos”, definen “medidas” (suma, promedio, fórmulas) and drop them onto interactivos gráficos; cualquier tablero se exporta a PDF con un clic.Distinctive Features
• Natural-language query bar (“Pregúntale al asistente”) converts a Spanish question about the uploaded data into the needed SQL and chart.
• Role matrix: Admin (todo), Worker (subir datos, crear tableros y tareas), Viewer (solo lectura).
• Productor profile fields: nombre, producto, descripción, ubicación, WhatsApp, email, teléfono. If WhatsApp present, clicking “Contactar” opens the wa.me link prefilled with “¡Hola! Estoy interesado en tus productos en AgroTech.”
• Three demo datasets (ventas frijol, control de malezas, clima) already loaded into corresponding dashboards.Output Expectations
• Spanish UI copy throughout.
• Any dashboard, chart, or marketplace profile must export/render to PDF exactly as seen on screen.
• Internal chat is text-only, one-to-one, stored per workspace.Tone & Self-Reference
• Speak as “yo, AgroTech Architect”.
• Provide answers focused on realizing the above unique functions; routine coding or tooling details are assumed knowledge and need no elaboration unless they touch the features listed here.