47 lines
1.7 KiB
Markdown
47 lines
1.7 KiB
Markdown
# 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.tsx` mounts `App.tsx`.
|
|
- **Routing:** Defined in `App.tsx`. Includes Public (`/`) and Admin (`/admin`) routes.
|
|
- **Data Flow:**
|
|
- `contexts/DataContext.tsx` provides global state (settings, content).
|
|
- `lib/supabase.ts` handles Supabase connection.
|
|
- `data.ts` contains initial/mock data and constants.
|
|
- `types.ts` defines 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).
|
|
- **Env Vars:** Prefix with `VITE_` for client-side exposure.
|
|
- `VITE_SUPABASE_URL`
|
|
- `VITE_SUPABASE_ANON_KEY`
|
|
|
|
## Development
|
|
1. **Install:** `npm install`
|
|
2. **Dev Server:** `npm run dev` (Port 3000)
|
|
3. **Build:** `npm run build`
|
|
|
|
## Deployment (Pipeline)
|
|
- Target: Portainer (Docker).
|
|
- Registry: Gitea Container Registry.
|
|
- CI/CD: Gitea Actions.
|