This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.
This project now includes a firestore.rules file that isolates user data by userId.
Key behavior:
create: only ifrequest.resource.data.userId == request.auth.uidread/update/delete: only ifresource.data.userId == request.auth.uid
Schema validation (required fields):
plantas:userIdfotos:userId,planta_id,urlmensagens:userId,planta_id,mensagem,lidaarquivo_morto:userId,planta_id_original
Files: d
firestore.rulesfirebase.json
To publish rules:
- Install Firebase CLI (if needed):
npm i -g firebase-tools - Login:
firebase login - Select your project:
firebase use --add - Deploy rules:
firebase deploy --only firestore:rules