Commit graph

20 commits

Author SHA1 Message Date
Francisco Ignácio Fontoura Solla
9fdbae05d7 Add C6 scale/DRY for supporters: bulk import, KPI aggregate, shared shells.
Phase 1 UX: StrictCombobox municipality in SupporterForm, AlertDialog in
RemoveSupporterDataButton. Phase 2 DRY: campaignListUrl + CampaignListPagination
+ campaignFormFields + mapCampaignFormActionError shared across nuclei,
supporters and action plans. Phase 3: single SQL aggregate for supporter list
KPIs via drizzle in the Payload txn. Phase 4: bulk drizzle insert for CSV import
inside the existing Payload txn with ON CONFLICT DO NOTHING, plus a fail-closed
skipContactPhoneInvariant context flag. Phase 5: HMAC-signed single-use import
token backed by a new supporterImportBatch staging collection so the full ok-row
set never crosses the Server Action boundary twice.
2026-07-18 22:17:31 -03:00
Francisco Ignácio Fontoura Solla
e995aefbd4 Add action-plan agenda vertical for /campanha/planos.
Ship C3 mobilization events with the actionPlan collection, list/detail/forms UI, upcoming-event blocks, access control, and migration.
2026-07-18 20:56:20 -03:00
Francisco Ignácio Fontoura Solla
b079daa9bb Add C2 nominal supporter registry for /campanha.
Ship the supporter join collection, consent-keyed create/import/remove actions, and apoiadores UI so staff can build a phone-required nominal base before mass field ops.
2026-07-18 20:32:54 -03:00
Francisco Ignácio Fontoura Solla
b035cc4a2f Support multi-municipality and multi-neighborhood nucleus territory.
Replace scalar region/city/neighborhood with hasMany arrays so nuclei can span multiple Bahia municipalities while keeping neighborhoods scoped to a single city.
2026-07-18 18:31:51 -03:00
Francisco Ignácio Fontoura Solla
c42b16baab Add TSE 2022 election results model and local seed import. 2026-07-18 18:25:19 -03:00
Francisco Ignácio Fontoura Solla
bcac665cb5 Ship /campanha nuclei MVP with RBAC, invites, and vote estimates.
Adds electoral nuclei, leaderships, updates, and WhatsApp invite flows behind campaign auth, plus the consolidated schema migration that Vercel applies on deploy.
2026-07-18 15:01:56 -03:00
Francisco Ignácio Fontoura Solla
c4866fabc0 Add /campanha internal area with isolated Payload auth
Introduce the internal campaign-management area gated by its own
authentication, kept isolated from the Payload admin so a campaign
session and an admin session can coexist in one browser.

- Add separate `campaignUser` auth collection (not `users` + roles)
- Authenticate via an isolated httpOnly `campaign-token` cookie scoped
  to /campanha, distinct from the default `payload-token`
- Add loginCampaign/logoutCampaign server actions and getCampaignUser
  session verification helper
- Add public login route and a protected (app) route group whose
  layout enforces the auth barrier
- Add migration 20260716_010420_add_campaign_user and document the
  auth foundation in AGENTS.md
2026-07-15 22:33:26 -03:00
Francisco Ignácio Fontoura Solla
28647e4760 Add Post and Tag collections for news and publications
- Add Post + Tag collections (notícias/publicações) with tag-based
  "Esconder" visibility control for electoral-law compliance
- Add static SEO routes /[type]/[category]/[slug] plus /[type] and
  /[type]/[category] listings, with shared header/breadcrumb and PostCard
- Recreate the homepage and refresh the site color palette (styles.css)
- Add posts/slug/seo utilities and revalidation wiring (documents.ts)
- Add live-fetch seed script (scripts/seed-posts.mjs + seed-loader.mjs,
  db:seed:posts)
- Upgrade Payload 3.79.0 -> 3.82.0 (fixes admin relationship-filter crash)
- Remove obsolete Header component; add shadcn card/badge/breadcrumb;
  update AGENTS.md and components rule docs
2026-07-15 19:12:11 -03:00
Francisco Solla
046f8a539f fix type isssues 2026-03-15 17:41:24 -03:00
Francisco Ignácio Fontoura Solla
f804da60eb Including page mandato-no-whatsapp 2026-03-14 18:07:40 -03:00
Francisco Ignácio Fontoura Solla
5460eeee3c fix: Create petition: Downgraded back to Next 15, removed revalidation on first draft save, chaged reavlidation patter to factory mode to support a revalidation tag per document 2026-03-08 22:53:57 -03:00
Francisco Ignácio Fontoura Solla
dac78163c3 feat: add petition form config and server-action submission flow
- add  group to  collection with title, subtitle, and required consent relationship
- refactor  to:
  - use a dedicated shared zod schema
  - submit via server action (create contact + signature)
  - register RHF fields and handle pending/error states
  - load city options from selected state
- add server action
- add shared schema
- replace state source in  collection: derive select options from
- make  immutable with  and remove obsolete
- update generated payload types for petition  and consent references
2026-02-22 23:08:00 -03:00
Francisco Ignácio Fontoura Solla
14961c5fea feat: overhaul petition UX, add contact/signature data model, and refresh shadcn theming
- redesign petition page layout with responsive hero, content section, and form card
  ()
- refactor frontend theming setup:
  - add  with  in frontend layout
  - migrate/clean global style tokens and base styles in
  - adjust header/social visuals for theme-aware rendering
  (, ,
   , , )
- expand petition form with additional fields and new UI primitives
  (native select, textarea, button, state/city flow)
  (, , , )
- add new Payload collections and wire them into config:
  , ,
  (, ,
   , ,
   )
- update petition collection admin grouping and project config
  (, , )
- add supporting dependency/lockfile updates and workspace tooling tweaks
  (, , , )
2026-02-22 20:02:51 -03:00
Francisco Ignácio Fontoura Solla
84c7c738c4 feat(petition): add petition collection with live preview and public page
- create  collection with localized admin labels and rich text body
- enable drafts/autosave/scheduled publish and collection-level live preview URL
- register  in
- add frontend route  with static params and enabled check
- add  helper to fetch collection docs for static generation
- regenerate  and admin import map for new collection/editor imports
2026-02-15 23:52:33 -03:00
Francisco Ignácio Fontoura Solla
f26e5d7537 feat(cms): add Payload-driven site metadata global and wire Next.js SEO output
- add new metadata global with URL, title, description, keywords, Open Graph, Twitter, and image fields
- register Metadata global in payload.config.ts
- switch frontend layout to generateMetadata() and load metadata values from Payload globals
- resolve metadata image relation (ID or populated media) for OG/Twitter images
- update live preview globals config to use SiteSettings.slug and HomePage.slug
- keep SiteSettings revalidation hook in consistent position within config
- regenerate payload-types.ts for new global/schema types
2026-02-15 20:14:42 -03:00
Francisco Ignácio Fontoura Solla
b955c48091 feat(cms): add homepage global and wire frontend to Payload content
- add  global () with required media upload field
- register new global in  and include it in admin live preview
- replace hardcoded frontend landing content with CMS-driven homepage image
- add typed cached utilities for globals/documents + centralized revalidation helpers
- migrate components to new global utility module and remove deprecated  helper
- update  revalidation hook to use shared global revalidation
- refine frontend layout/header and simplify legacy homepage CSS
- regenerate  for new global/schema changes
2026-02-15 16:19:57 -03:00
Francisco Ignácio Fontoura Solla
375398af84 feat(live-preview): enable Payload live preview for site settings global
- add  dependency
- configure  in  for
- add  client utility to refresh Next routes on live updates
- mount live preview refresh bridge in frontend layout
- enable drafts/autosave/schedule publish for  global
- regenerate  and update lockfile
2026-02-15 11:13:29 -03:00
Francisco Ignácio Fontoura Solla
56f2d48d8d feat(payload): add pt-BR admin/frontend copy and site settings social links
- add  global and cached global fetch utility
- add , , and  components driven by global settings
- wire global registration in Payload config
- enable Payload admin i18n with Portuguese () language pack
- translate frontend metadata/homepage/custom route copy to pt-BR
- translate collection/global labels, descriptions, and validation messages
- improve social-link a11y with Portuguese fallback labels and external-link icon
- update francisco.solla and  admin labels/groups for Portuguese UX
- regenerate  for new global/schema changes
2026-02-15 01:17:26 -03:00
Francisco Ignácio Fontoura Solla
c3d1e5c717 feat: add Tailwind CSS integration
Install and configure Tailwind CSS v4 for the frontend app, wire PostCSS processing, and add a visible utility-class example to confirm styles are applied.
2026-02-14 16:47:25 -03:00
Francisco Ignácio Fontoura Solla
87ebb726d2 feat: initial commit 2026-02-14 16:11:51 -03:00