Skip to content

Latest commit

 

History

History
106 lines (84 loc) · 2.7 KB

task.md

File metadata and controls

106 lines (84 loc) · 2.7 KB

AI Sheets Assistant - Tasks

🐍 Backend (Python FastAPI)

Структура модулей:

backend/
├── main.py                 # FastAPI app
├── auth/google_auth.py     # Google OAuth
├── files/upload.py         # File upload
├── sheets/api.py          # Google Sheets API
├── ai/chat.py             # AI requests
└── requirements.txt

Задачи:

  1. main.py - создать FastAPI app
  2. google_auth.py - функция get_google_token()
  3. upload.py - функция upload_file_to_drive()
  4. api.py - функция read_sheet_data()
  5. chat.py - функция ask_ai()
  6. MySQL в Docker - контейнер с базой

🌐 Frontend (Next.js)

Структура:

frontend/
├── app/
│   ├── page.tsx           # Главная страница
│   ├── auth/page.tsx      # Авторизация
│   └── sheets/page.tsx    # Работа с таблицами
├── components/
│   ├── FileUploader.tsx   # Загрузка файлов
│   ├── SheetsViewer.tsx   # Просмотр таблиц
│   └── AIChat.tsx         # ИИ чат
└── lib/
    └── api.ts             # API клиент

Задачи:

  1. page.tsx - главная с кнопкой "Войти"
  2. FileUploader.tsx - drag&drop зона
  3. SheetsViewer.tsx - iframe Google Sheets
  4. AIChat.tsx - простой чат
  5. api.ts - функции запросов к backend
  6. shadcn/ui - установить компоненты

🗄️ Database (MySQL Docker)

Таблицы:

users: id, google_id, email
files: id, user_id, filename, google_drive_id
chats: id, user_id, message, response

Задачи:

  1. docker-compose.yml - MySQL контейнер
  2. models.py - SQLAlchemy модели
  3. database.py - подключение к БД

⚡ MVP Приоритеты:

День 1-2:

  • FastAPI setup
  • Next.js setup
  • MySQL Docker

День 3-4:

  • Google OAuth
  • File upload
  • Basic UI

День 5-6:

  • Google Sheets integration
  • AI chat
  • Testing

🛠️ Commands:

# Backend
cd backend
pip install fastapi uvicorn python-multipart google-api-python-client
uvicorn main:app --reload

# Frontend  
cd frontend
npx create-next-app@latest . --typescript --tailwind --app
npx shadcn-ui@latest init
npm run dev

# Database
docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 mysql:8.0

Цель: 1 функция = 1 задача = максимум простоты ⚡