1.7 KiB
1.7 KiB
GEMINI.md - Project Context & Conventions
Project Overview
Name: car-auto-center (CMS - Automotivo)
Type: SPA (Single Page Application)
Stack: React 19, TypeScript, Vite, Tailwind CSS
State Management: React Context (DataContext) + Supabase
Routing: React Router v7
Architecture
- Entry Point:
index.tsxmountsApp.tsx. - Routing: Defined in
App.tsx. Includes Public (/) and Admin (/admin) routes. - Data Flow:
contexts/DataContext.tsxprovides global state (settings, content).lib/supabase.tshandles Supabase connection.data.tscontains initial/mock data and constants.types.tsdefines all shared TypeScript interfaces.
- Components:
components/: Reusable UI components.components/Pages.tsx: Route page components (Home, About, etc.).components/Admin/: Admin-specific views (Login, Dashboard).
Key Technologies
- Build Tool: Vite
- Styling: Tailwind CSS (utility-first),
clsx,tailwind-merge. - Icons:
lucide-react. - Backend: Supabase (Auth/DB) - Note: Local storage fallback usage observed in code.
Conventions
- Naming: PascalCase for components, camelCase for functions/variables.
- File Structure:
- Components co-located in
components/. - Pages often aggregated in
Pages.tsx(consider splitting if growing).
- Components co-located in
- Env Vars: Prefix with
VITE_for client-side exposure.VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
Development
- Install:
npm install - Dev Server:
npm run dev(Port 3000) - Build:
npm run build
Deployment (Pipeline)
- Target: Portainer (Docker).
- Registry: Gitea Container Registry.
- CI/CD: Gitea Actions.