Commit Graph

13 Commits

Author SHA1 Message Date
Michele
5620a71f1b fix: auto-save hashtags, plan-based platforms, archive with text preview
- Hashtag auto-save: debounced 500ms save on add/remove/edit, no manual button
- Platform chips: Freemium sees only Instagram/Facebook, Pro sees all 4
- Platform badge: changed from tab-like to informative "per instagram" label
- Add "Archivio →" link in content page header
- Rewrite ContentArchive: show text_content preview (was showing only hashtags),
  add edit button, use Editorial Fresh design system, fix post.text → post.text_content

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 18:43:46 +02:00
Michele
a6270c2e3f fix: hide framework labels in generated content + editable hashtags
- Add explicit instruction to LLM: never write framework labels (PROBLEMA,
  AGITAZIONE, SOLUZIONE, etc.) — use them as invisible narrative structure only
- Replace static hashtag chips with HashtagEditor component:
  - Click hashtag to edit inline
  - Click X to remove
  - Input field to add new hashtags
  - Save button to persist changes to DB

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 18:20:06 +02:00
Michele
497b95e673 fix: update Claude model catalog with correct 4.6/4.5 versions, order by capability
- Opus 4.6 first, then Sonnet 4.6, Haiku 4.5
- Add legacy 4.5 Sonnet/Haiku, remove obsolete 3.5 versions
- Fix OpenRouter Claude labels to match

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 18:04:53 +02:00
Michele
04141a0c03 feat: replace model text input with dropdown selector per provider
- Add curated model catalogs for Claude, OpenAI, Gemini, OpenRouter
- ModelSelector component: dropdown with known models + "Personalizzato" option
- Custom input fallback for unknown providers or manual model IDs
- Auto-switch between dropdown/custom based on provider change

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 17:58:12 +02:00
Michele
9f9bca1077 fix: settings page defaults to Profilo tab, banner links to Provider AI
- Change default activeSection from 'piano' to 'profilo'
- Support ?tab= query param to deep-link into settings sections
- Update missing API key banner to link to /settings?tab=ai

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 17:36:49 +02:00
Michele
7d1b4857c2 fix: pass editorial brief to LLM prompt + improve missing API key error
- Add 'brief' field to GenerateContentRequest schema
- Pass brief from router to generate_post_text service
- Inject brief as mandatory instructions in LLM prompt with highest priority
- Return structured error when LLM provider/API key not configured
- Show dedicated warning banner with link to Settings when API key missing

Fixes: content ignoring editorial brief, unhelpful API key error messages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 17:22:15 +02:00
Michele Borraccia
2ca8b957e9 feat: sync all BRAIN mobile changes - onboarding, cookies, legal, mobile UX, settings
- Add OnboardingWizard, BetaBanner, CookieBanner components
- Add legal pages (Privacy, Terms, Cookies)
- Update Layout with mobile topbar, sidebar drawer, plan banner
- Update SettingsPage with profile, API config, security
- Update CharacterForm with topic suggestions, niche chips
- Update EditorialCalendar with shared strategy card
- Update ContentPage with narrative technique + brief
- Update SocialAccounts with 4 platforms and token guides
- Fix CSS button color inheritance, mobile responsive
- Add backup script
- Update .gitignore for pgdata and backups

Co-Authored-By: Claude (BRAIN/StackOS) <noreply@anthropic.com>
2026-04-03 14:59:14 +00:00
Michele
8b77f1b86b feat(fase0): fix title, add change-password endpoint
- index.html: title → "Leopost — Studio Editoriale AI"
- auth router: add POST /api/auth/change-password (local accounts only)
  validates current password, enforces min 8 chars, bcrypt update

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 17:36:27 +02:00
Michele
b38419f3ee fix(login): replicate original Leopost auth layout exactly
- Left panel: dark ink (#1A1A1A) bg with decorative blobs, testimonial quote,
  avatar, copyright — NOT coral
- Right panel: cream bg, no card/shadow, form directly on page
- editorial-tag (red uppercase label) + Fraunces heading per page
- Google button: outline style (white bg + border)
- Inputs: full border h-11, white bg, focus:border-ink, no border-radius
- Submit CTA: black full-width h-12 → hover accent
- Login/Register as separate form components (not tab toggle)
- Responsive: left panel hidden on mobile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 16:34:43 +02:00
Michele
3139468c92 redesign: apply correct Editorial Fresh design system
- Fix palette: #E85A4F accent, #FFFBF5 cream, #1A1A1A ink (was wrong values)
- Remove all border-radius (zero radius everywhere per design spec)
- Sidebar: cream-dark #F5F0E8 bg with accent-left active indicator
- card-editorial: white bg, 4px accent top bar via absolute div
- Buttons: ink bg → accent hover + translateY(-1px)
- LoginPage: correct split layout with Editorial Fresh tokens
- Add .btn-primary / .btn-outline / .input-editorial / .editorial-tag classes
- Fraunces + DM Sans correctly applied everywhere

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 20:38:29 +02:00
Michele
77ca70cd48 feat: multi-user SaaS, piani Freemium/Pro, Google OAuth, admin panel
BLOCCO 1 - Multi-user data model:
- User: email, display_name, avatar_url, auth_provider, google_id
- User: subscription_plan, subscription_expires_at, is_admin, post counters
- SubscriptionCode table per redeem codes
- user_id FK su Character, Post, AffiliateLink, EditorialPlan, SocialAccount, SystemSetting
- Migrazione SQLite-safe (ALTER TABLE) + preserva dati esistenti

BLOCCO 2 - Auth completo:
- Registrazione email/password + login multi-user
- Google OAuth 2.0 (httpx, no deps esterne)
- Callback flow: Google -> /auth/callback?token=JWT -> frontend
- Backward compat login admin con username

BLOCCO 3 - Piani e abbonamenti:
- Freemium: 1 character, 15 post/mese, FB+IG only, no auto-plans
- Pro: illimitato, tutte le piattaforme, tutte le feature
- Enforcement automatico in tutti i router
- Redeem codes con durate 1/3/6/12 mesi
- Admin panel: genera codici, lista utenti

BLOCCO 4 - Frontend completo:
- Login page design Leopost (split coral/cream, Google, social coming soon)
- AuthCallback per OAuth redirect
- PlanBanner, UpgradeModal con pricing
- AdminSettings per generazione codici
- CharacterForm con tab Account Social + guide setup

Deploy:
- Dockerfile con ARG VITE_BASE_PATH/VITE_API_BASE
- docker-compose.prod.yml per leopost.it (no subpath)
- docker-compose.yml aggiornato per lab

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 20:01:07 +02:00
Michele
2c16407f96 feat: pannello Settings con 4 sezioni flessibili + provider custom
- Redesign Settings: Testi, Immagini, Video, Voiceover — sezioni separate
- Ogni sezione ha dropdown provider + API key + campo opzionale modello
- Opzione "Personalizzato" con campo Base URL libero per qualsiasi servizio
- LLM: aggiunto OpenRouter + provider custom OpenAI-compatible
- Backend: OpenAICompatibleProvider unifica OpenAI/OpenRouter/custom
- Router content: passa llm_base_url a get_llm_provider

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 18:34:24 +02:00
Michele
519a580679 Initial commit: Leopost Full — merge di Leopost, Post Generator e Autopilot OS
- Backend FastAPI con multi-LLM (Claude/OpenAI/Gemini)
- Publishing su Facebook, Instagram, YouTube, TikTok
- Calendario editoriale con awareness levels (PAS, AIDA, BAB...)
- Design system Editorial Fresh (Fraunces + DM Sans)
- Scheduler automatico, gestione commenti AI, affiliate links

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 17:23:16 +02:00