A modern, full-featured car dealership web application built with Next.js and PostgreSQL. Browse, search, and purchase vehicles with an intuitive interface and powerful filtering system.
My Dealership is a comprehensive automotive marketplace platform that enables users to browse vehicle inventory, filter by various criteria, and complete purchases through an integrated checkout system. The application features user authentication, advanced search capabilities, multi-language support, and automated email notifications for system monitoring.
- Advanced Search & Filtering: Filter cars by manufacturer, category, price range, year, horsepower, torque, mileage, fuel efficiency, engine type, transmission, fuel type, and status
- Detailed Vehicle Pages: Comprehensive vehicle information with specifications and images
- Real-time Inventory: Dynamic vehicle listings with status tracking (Coming soon, On sale, Sold, In process)
- Secure Registration: Email and password-based user registration with bcrypt password hashing
- Session Management: JWT-based authentication with NextAuth.js
- Protected Routes: Secure access control for authenticated features
- Car Orders: Complete order management system for vehicle purchases
- Payment Processing: Integrated payment handling with session tracking
- Order History: Track user purchases and order status
- Multi-language Support: Full English and Italian translations
- Locale-aware Routing: Automatic language detection and routing
- Health Checks: Automated crontab system monitoring
- Email Notifications: Automated email alerts for database connectivity and system status
- Next.js 14+ - React framework with App Router
- TypeScript - Type-safe JavaScript
- Radix UI - Accessible component primitives
- Tailwind CSS - Utility-first CSS framework
- React Hook Form - Form validation and management
- PostgreSQL - Relational database
- node-postgres (pg) - PostgreSQL client for Node.js
- NextAuth.js - Authentication solution
- next-intl - Internationalization for Next.js
- Nodemailer - Email sending
- Node.js 18+
- PostgreSQL database
- npm/yarn/pnpm/bun
Create a .env file in the root directory:
DATABASE_URL="postgresql://username:password@host:port/database"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key"
NEXT_EMAIL="true"
NEXT_EMAIL_TO="your-email@example.com"- Install dependencies:
npm install
# or
yarn install
# or
pnpm install- Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev- Open http://localhost:3000 in your browser
The application uses PostgreSQL with the following main tables:
Car- Vehicle inventoryCategory- Vehicle categoriesManufacturer- Car manufacturersusers- User accountsCarOrder- Purchase ordersPayment- Payment transactions
src/
├── app/
│ ├── [locale]/ # Internationalized routes
│ ├── api/ # API routes
│ └── components/ # Shared components
├── db/
│ ├── config.ts # PostgreSQL connection pool
│ └── functions.ts # Database queries
├── auth.ts # NextAuth configuration
├── interfaces/ # TypeScript interfaces
├── mailer/ # Email configuration
└── utils/ # Utility functions
This project is licensed under the MIT License.
For issues and feature requests, please create an issue in the project repository.