Plataforma digital e site público de Jorge Solla
Find a file
Francisco Ignácio Fontoura Solla 712649eecf Replace state/city selects with type-to-filter comboboxes
Turn StateSelect and CitySelect into autocomplete comboboxes so long
lists no longer bias people toward the top option. A shared FormCombobox
wraps shadcn's (Base UI) Combobox and bridges it to react-hook-form via
useController, storing the state code / city name while displaying a
label. Matching is accent-insensitive and prefix-based; the list opens
after 1 character and results are alphabetical. State searches by both
full name and initials (new StateNames map).

Adds @base-ui/react + shadcn combobox/input-group primitives, and
documents our export-const and named-hook-import conventions in the
components rule (with the src/components/ui/* shadcn carve-out).
2026-07-15 14:41:58 -03:00
.cursor Replace state/city selects with type-to-filter comboboxes 2026-07-15 14:41:58 -03:00
.vscode feat: initial commit 2026-02-14 16:11:51 -03:00
.zed feat: overhaul petition UX, add contact/signature data model, and refresh shadcn theming 2026-02-22 20:02:51 -03:00
docker/postgres/init Isolate local/dev and tests from the production database 2026-07-15 13:52:30 -03:00
public Add ThankStep 2026-03-18 23:55:28 -03:00
scripts Isolate local/dev and tests from the production database 2026-07-15 13:52:30 -03:00
src Replace state/city selects with type-to-filter comboboxes 2026-07-15 14:41:58 -03:00
tests Isolate local/dev and tests from the production database 2026-07-15 13:52:30 -03:00
.env.example Isolate local/dev and tests from the production database 2026-07-15 13:52:30 -03:00
.env.test Isolate local/dev and tests from the production database 2026-07-15 13:52:30 -03:00
.gitignore feat: overhaul petition UX, add contact/signature data model, and refresh shadcn theming 2026-02-22 20:02:51 -03:00
.npmrc fix issues to run from cPanel 2026-03-15 14:03:28 -03:00
.prettierrc.json feat: initial commit 2026-02-14 16:11:51 -03:00
.yarnrc feat: initial commit 2026-02-14 16:11:51 -03:00
AGENTS.md Isolate local/dev and tests from the production database 2026-07-15 13:52:30 -03:00
components.json Including page mandato-no-whatsapp 2026-03-14 18:07:40 -03:00
docker-compose.yml Isolate local/dev and tests from the production database 2026-07-15 13:52:30 -03:00
Dockerfile feat: initial commit 2026-02-14 16:11:51 -03:00
eslint.config.mjs Fix ESLint flat config so pnpm lint runs 2026-07-15 13:56:53 -03:00
next.config.mjs revert changes made to run on cPanel 2026-03-15 15:28:48 -03:00
package.json Replace state/city selects with type-to-filter comboboxes 2026-07-15 14:41:58 -03:00
playwright.config.ts Isolate local/dev and tests from the production database 2026-07-15 13:52:30 -03:00
pnpm-lock.yaml Replace state/city selects with type-to-filter comboboxes 2026-07-15 14:41:58 -03:00
postcss.config.mjs Migrate from unstable_cache to use cache. And start Petition Form 2026-02-17 22:16:53 -03:00
README.md Isolate local/dev and tests from the production database 2026-07-15 13:52:30 -03:00
tailwind.config.ts feat: add Tailwind CSS integration 2026-02-14 16:47:25 -03:00
test.env feat: initial commit 2026-02-14 16:11:51 -03:00
tsconfig.json 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
vitest.config.mts feat: initial commit 2026-02-14 16:11:51 -03:00
vitest.setup.ts Isolate local/dev and tests from the production database 2026-07-15 13:52:30 -03:00

Teqo

Teqo starts as the official digital platform for deputado Jorge Solla and evolves into a white-label civic engagement platform for politicians in Brazil.

The goal is to help political teams build direct, durable relationships with their base without depending on Big Tech social platforms as the primary channel.

Mission

  • Strengthen direct communication between representatives and citizens.
  • Reduce platform dependency risk by owning audience and data channels.
  • Provide reusable building blocks so each political team can launch quickly.

Product Direction

Phase 1: Jorge Solla Website

Initial delivery focuses on Jorge Solla's public website and communication workflows:

  • Public-facing content and updates
  • Institutional pages and biography
  • Media and campaign communication assets
  • Editorial operations through Payload CMS

Phase 2: White-Label Platform

Teqo then becomes a configurable base product for other politicians in Brazil:

  • Multi-tenant and reusable architecture
  • Brand and content customization per mandate/campaign
  • Shared core modules for communication and engagement
  • Operational autonomy with self-hosted owned channels

Local Development

Production safety: the production database is a live Neon Postgres holding real citizens' data. Local development and tests run against a local Postgres and must never point at production. pnpm dev refuses to start against a non-local database, and the test suite refuses any database whose name doesn't end in _test.

First-time setup

  1. Install dependencies: pnpm install
  2. Create your env file: cp .env.example .env.local
  3. Start Docker, then start the local database: pnpm db:start
    • This runs Postgres 17 (matching production) and auto-creates a teqo_test database for the test suite.
  4. Make sure DATABASE_URL in .env.local points at local:
    DATABASE_URL=postgresql://teqo:teqo@localhost:5432/teqo
    
  5. Load a schema + content into the local database — pick one:
    • Mirror production content (recommended): PROD_DATABASE_URL="<unpooled Neon URL>" pnpm db:pull Copies production's schema and content into local. It only reads production and excludes supporter PII (contact/signature/subscription data).
    • Empty schema from migrations: pnpm migrate
  6. Start the dev server: pnpm dev
  7. Open: http://localhost:3000

Useful scripts: pnpm db:start / pnpm db:stop (local Postgres), pnpm db:pull (refresh local content from prod).

Database migrations

Schema is managed by committed Payload migrations (src/migrations/); push is disabled everywhere.

To change the schema:

  1. Edit the collection/global/field config.
  2. Generate a migration: pnpm migrate:create <name>
  3. Review and commit the generated files in src/migrations/ (both .ts and .json, plus index.ts).
  4. Apply it locally: pnpm migrate (check status anytime with pnpm migrate:status).

Deploying to production: pnpm build runs payload migrate before building, so every Vercel deploy automatically applies pending migrations to the production database. Do not run migrations against production by hand.

Running tests

Tests use the isolated teqo_test database (config in .env.test). Prepare its schema once with:

DATABASE_URL=postgresql://teqo:teqo@localhost:5432/teqo_test pnpm migrate

Then run pnpm test (or pnpm test:int / pnpm test:e2e).

Tech Stack

  • Payload CMS
  • Next.js
  • PostgreSQL (via @payloadcms/db-postgres)
  • TypeScript

Roadmap Notes

  • Prioritize audience ownership and portability of data.
  • Keep modules generic enough for reuse across different political contexts.
  • Default to secure, access-controlled features for campaign and institutional teams.