Member app for Clube Campineiro de Xadrez (Campinas, Brazil). Flutter Web, mobile-first. Backend: Supabase.
People start at the root README (Portuguese). Agents read docs/INDEX.md, then only the file that matches the task. Do not copy the same fact into five places.
- Read
docs/INDEX.mdand open only the files that match the task. - Locked items do not change. Proposed items are the current truth until the user edits them. TBD means unknown: ask, or ship a visible “Em breve”. Never fill a gap with invented club facts.
- v1 has shipped. What to build next is the single TODO card on the project board. Move it to Fazendo as soon as it is the active task, before the next edit. Dev Complete when the code is verified and not published. Done (published) only after
mainis pushed. Do not start backlog cards. - Tabs stay Início, Meu Clube, Ratings, and Perfil, plus Admin for
adminandsuper_admin. Signed-out visitors see Início only (events, how to join, how to log in) and no bottom bar. - Guests may browse published events and become members from Perfil. Admins can still register a member. Do not call the Supabase client
signUp.
- User-facing copy: pt-BR. Code, comments, commits, and
docs/in English. - Feature-first Flutter. State: Riverpod. Routing: go_router. Backend:
supabase_flutter. - Mobile-first web. Design for a phone. On desktop, center a narrow column (max ~480px).
- Roles
adminandsuper_adminsee an Admin tab and admin-only actions. Rolemembernever sees them. Onlysuper_adminedits the club PIX key, the public contact channels, the Meu Clube tab label, anyone’s role, or who appears on Ratings. - Row Level Security on every table. Automatic RLS is on: new tables start locked until policies exist. Never disable it. An empty read is a policy problem first. No service-role key in the Flutter client.
- Hide admin UI and enforce it in RLS and Edge Functions.
- One board card at a time. Do not implement the next feature “while we are here.”
- If the user changes a product decision, edit the matching doc in the same session, then code.
- Commits only when the user asks. Gitflow:
feature/orfix/offmain. Readgit logfirst. One reason per commit.
| Layer | Choice |
|---|---|
| Client | Flutter, Dart 3, Material 3 |
| Target | Flutter Web first (mobile viewport) |
| State | flutter_riverpod + riverpod_generator |
| Routes | go_router (StatefulShellRoute tabs) |
| Backend | Supabase (Auth, Postgres, Storage, Edge Functions) |
| i18n | gen-l10n, app_pt.arb is source |
| If the task is about… | Read |
|---|---|
| What to build next | The TODO card; docs/product/board.md |
| What already shipped / still out | docs/product/mvp-scope.md, docs/product/vision.md |
| Shop / promotions | docs/business/shop.md |
| Who uses the app | docs/product/personas.md |
| Domain words | docs/product/glossary.md |
| Can / cannot rules | docs/business/rules.md, docs/business/roles.md |
| Guest self-signup | docs/business/self-signup.md |
| Ratings or events | docs/business/ratings.md, docs/business/events.md |
| Architecture / folders | docs/architecture/overview.md, docs/architecture/folder-structure.md |
| Tables / RLS | docs/architecture/data-model.md, docs/architecture/rls.md |
| Why we chose X | docs/architecture/decisions.md |
| UI, tabs, copy | docs/ui/design-system.md, docs/ui/navigation-and-screens.md, docs/ui/copy-pt-br.md |
| Palette / reference images | docs/ui/references/ — read these before inventing colors or layouts |
| How to code here | docs/engineering/conventions.md, docs/engineering/agent-workflow.md |
| What may still change | docs/assumptions.md |
- Classify the change: product, schema, or UI.
- Read the matching doc from the map above. If the docs disagree with the user, ask. Do not guess a business rule.
- Implement the smallest slice that matches the current card.
- Schema changes ship as a migration with policies. Widgets do not call Supabase. Data sources do not build widgets.
- Before a screen layout change, look up current practice for that kind of screen and weigh it against this app (phone width, the existing visual language).
- Analyze and format. Verify the flow on a mobile viewport, including the empty and error states, and a second screen that shares the same state.
- Summarize what was decided and what is still open.
- Dart/Flutter: analyze, format, widget tree, logs, and tests on the running app.
- Supabase: this project only. Schema, policies, and Edge Functions. Leave a migration file. Never paste a service-role key into Dart.
- Project board: read the TODO card and move it with the work (Fazendo, Dev Complete, Done).
- GitHub: the app repository. Push only when the user asks to ship.
- Guest home: published events, join, and log in. No greeting, no bottom bar. Cold start and logout land here.
- Signed-in home: upcoming published events, in-person / online filters, optional image, optional inscription (free, or paid with the club PIX key and a proof).
- Ratings: active listed members. FIDE or CBX, each with classical / rapid / blitz. A missing number is “Sem rating”.
- Meu Clube: club presentation, contact, and member-only pages. Empty fields are omitted.
- Perfil: login when signed out; own profile when signed in, including Lichess and Chess.com ids.
- Admin: members, events, payment proofs, and the club page. Inactive profiles cannot use the app.
- Out of scope until that card is TODO: a tournaments module, a separate calendar tab, push notifications, chat, and more than one club in the same deployment.