From bd9592eb73b515d321791c87a553d8e24dedb3df Mon Sep 17 00:00:00 2001 From: admtracksteel Date: Fri, 3 Apr 2026 21:11:05 +0000 Subject: [PATCH] docs: implement Antigravity global rules --- .agent/rules/GEMINI.md | 22 ++++++ Dockerfile | 8 ++- components/ApiKeySetup.tsx | 136 ++++++++++++++++++------------------- index.css | 62 ++++++++--------- 4 files changed, 126 insertions(+), 102 deletions(-) create mode 100644 .agent/rules/GEMINI.md diff --git a/.agent/rules/GEMINI.md b/.agent/rules/GEMINI.md new file mode 100644 index 0000000..7bee6af --- /dev/null +++ b/.agent/rules/GEMINI.md @@ -0,0 +1,22 @@ +--- +trigger: always_on +--- + +# GEMINI.md - Antigravity Kit (Auto-Generated) + + +## TIER 0: UNIVERSAL RULES (Always Active) + +### 🌍 Global User Rules (MANDATORY) + +1. **Idioma**: Conversar e desenvolver sempre em **Português do Brasil**. +2. **Automação Terminais**: Executar comandos de terminal, leitura de arquivos e edições de forma automática. Comandos de desenvolvimento (build, install, lint, git, etc.) são sempre 'SafeToAutoRun'. +3. **Memória & Monitoramento**: Após cada evolução ou atualização no app, é OBRIGATÓRIO: + - Atualizar a memória do app em '/root/Antigravity_Memory/knowledge/{AppName}.md'. + - Atualizar o status e credenciais no 'app.py' do Cronos Dashboard. + - Realizar 'git commit', 'git push' e executar o 'update.sh' do Cronos para deploy automático. + +### 🌐 Language Handling + + +--- diff --git a/Dockerfile b/Dockerfile index 38be2a6..a3cade2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ # Estágio de Build -FROM node:20-alpine as build-stage +FROM bitnami/node:22 as build-stage +RUN apt-get update && apt-get upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY package*.json ./ RUN npm install --frozen-lockfile || npm install @@ -7,7 +8,8 @@ COPY . . RUN npm run build # Estágio de Produção -FROM nginx:stable-alpine as production-stage +FROM nginxinc/nginx-unprivileged:alpine as production-stage +RUN apk update && apk upgrade --no-cache COPY --from=build-stage /app/dist /usr/share/nginx/html -EXPOSE 80 +EXPOSE 8080 CMD ["nginx", "-g", "daemon off;"] diff --git a/components/ApiKeySetup.tsx b/components/ApiKeySetup.tsx index fd718fa..fb2eca2 100644 --- a/components/ApiKeySetup.tsx +++ b/components/ApiKeySetup.tsx @@ -1,68 +1,68 @@ -import React, { useState } from 'react'; -import { KeyIcon, SaveIcon } from './Icons'; - -interface ApiKeySetupProps { - onKeySave: (key: string) => void; -} - -export const ApiKeySetup: React.FC = ({ onKeySave }) => { - const [localApiKey, setLocalApiKey] = useState(''); - - const handleSave = () => { - if (localApiKey.trim()) { - onKeySave(localApiKey.trim()); - } - }; - - return ( -
-
-
- -
-

- Configurar Chave de API -

-

- Para começar, insira sua chave de API do Google Gemini. Ela será mantida segura no seu navegador. -

- -
-
- -
-
- -
- setLocalApiKey(e.target.value)} - onKeyDown={(e) => e.key === 'Enter' && handleSave()} - autoComplete="off" - /> -
-

- Não tem uma chave? Obtenha no Google AI Studio. -

-
- - -
-
-
-
- ); -}; +import React, { useState } from 'react'; +import { KeyIcon, SaveIcon } from './Icons'; + +interface ApiKeySetupProps { + onKeySave: (key: string) => void; +} + +export const ApiKeySetup: React.FC = ({ onKeySave }) => { + const [localApiKey, setLocalApiKey] = useState(''); + + const handleSave = () => { + if (localApiKey.trim()) { + onKeySave(localApiKey.trim()); + } + }; + + return ( +
+
+
+ +
+

+ Configurar Chave de API +

+

+ Para começar, insira sua chave de API do Google Gemini. Ela será mantida segura no seu navegador. +

+ +
+
+ +
+
+ +
+ setLocalApiKey(e.target.value)} + onKeyDown={(e) => e.key === 'Enter' && handleSave()} + autoComplete="off" + /> +
+

+ Não tem uma chave? Obtenha no Google AI Studio. +

+
+ + +
+
+
+
+ ); +}; diff --git a/index.css b/index.css index e1d9bf3..593c8ab 100644 --- a/index.css +++ b/index.css @@ -1,31 +1,31 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -@layer base { - body { - @apply bg-slate-100 dark:bg-slate-900 text-slate-900 dark:text-slate-100 transition-colors duration-300 font-sans; - background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); - } - .dark body { - background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); - } -} - -@layer components { - .glass-panel { - @apply bg-white/70 dark:bg-slate-800/60 backdrop-blur-md border border-white/20 dark:border-slate-700/50 shadow-xl; - } - .glass-card { - @apply bg-white/50 dark:bg-slate-800/40 backdrop-blur-sm border border-white/30 dark:border-slate-700/30 hover:bg-white/60 dark:hover:bg-slate-800/50 transition-all duration-300; - } -} - -@keyframes fade-in { - from { opacity: 0; transform: translateY(10px); } - to { opacity: 1; transform: translateY(0); } -} - -.animate-fade-in { - animation: fade-in 0.5s ease-out forwards; -} +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + body { + @apply bg-slate-100 dark:bg-slate-900 text-slate-900 dark:text-slate-100 transition-colors duration-300 font-sans; + background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); + } + .dark body { + background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); + } +} + +@layer components { + .glass-panel { + @apply bg-white/70 dark:bg-slate-800/60 backdrop-blur-md border border-white/20 dark:border-slate-700/50 shadow-xl; + } + .glass-card { + @apply bg-white/50 dark:bg-slate-800/40 backdrop-blur-sm border border-white/30 dark:border-slate-700/30 hover:bg-white/60 dark:hover:bg-slate-800/50 transition-all duration-300; + } +} + +@keyframes fade-in { + from { opacity: 0; transform: translateY(10px); } + to { opacity: 1; transform: translateY(0); } +} + +.animate-fade-in { + animation: fade-in 0.5s ease-out forwards; +}