Capital Cars is a comprehensive web platform designed for vehicle management and commercialization, offering a modern experience for both administrators and visitors. It combines a powerful administration panel with an optimized public catalog, all while respecting privacy policies and personal data consent in accordance with current regulations.
Key Features
Complete administrative management:
- Administration panel with full control over publications, users, and base data (brands, models, colors).
- Integrated image upload with UploadThing, featuring drag-and-drop reordering using @hello-pangea/dnd.
- Publication status system: featured, hidden, and sold for flexible inventory management.
- Activity log with complete traceability of actions and changes made.
- Statistics dashboard with interactive charts via Recharts for real-time views and metrics analysis.
Public catalog experience:
- Advanced filtering and sorting system using nuqs (URL synchronization) and React Query for optimized searches.
- Image carousel with lightbox gallery using PhotoSwipe for immersive visualization.
- Personalized view tracking with intelligent 24-hour deduplication.
- "Recently viewed" section to enhance browsing experience.
Privacy and consent:
- Consent banner compliant with Venezuela's Personal Data Protection Law.
- Dual cookie system:
cc_privacy_consent(user decision) andcc_cookie_session_id(session tracking). - Granular tracking: basic anonymous (without consent) vs identified with metadata (with consent).
- Optional capture of IP, user agent, and linking of anonymous sessions with registered accounts.
- Automatic middleware for transparent cookie management based on user preferences.
Authentication and users:
- NextAuth.js v5 with support for credentials and differentiated roles (administrator, editor).
- User management from admin panel with permission control and traceability.
Modern, type-safe architecture:
- tRPC for end-to-end type-safe APIs, with specialized routers per functionality.
- Drizzle ORM on PostgreSQL with versioned migrations and robust relational schema.
- Exhaustive validation with Zod and react-hook-form to ensure data integrity.
Technologies Used
- Next.js 15 (App Router) with turbopack in development
- React 19 and TypeScript for complete type safety
- Tailwind CSS 4 and shadcn/ui (Radix UI) for a modern, accessible interface
- tRPC for type-safe client-server communication
- Drizzle ORM with PostgreSQL for data management
- NextAuth.js v5 for robust authentication
- React Query (@tanstack/react-query) for server state management
- Recharts for analytics visualizations and charts
- nuqs for URL filter synchronization
- PhotoSwipe for lightbox image gallery
- UploadThing for image upload and management
- @hello-pangea/dnd for drag-and-drop reordering
- Zustand for global application state
- next-themes for theme support (light/dark/system)
- Supporting libraries: lucide-react, cmdk, vaul, sonner, zod, bcryptjs