Skip to content

web application simulating a car dealership experience, including authentication, database management, and Stripe payments.

Notifications You must be signed in to change notification settings

project-kt/mydealership

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Dealership

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.

Description

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.

Features

Vehicle Management

  • 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)

User Authentication

  • 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

Shopping & Checkout

  • 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

Internationalization

  • Multi-language Support: Full English and Italian translations
  • Locale-aware Routing: Automatic language detection and routing

System Monitoring

  • Health Checks: Automated crontab system monitoring
  • Email Notifications: Automated email alerts for database connectivity and system status

Technologies

Frontend

Backend

Validation & Security

  • Zod - TypeScript-first schema validation
  • bcryptjs - Password hashing

Internationalization

  • next-intl - Internationalization for Next.js

Email

Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • npm/yarn/pnpm/bun

Environment Variables

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"

Installation

  1. Install dependencies:
npm install
# or
yarn install
# or
pnpm install
  1. Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
  1. Open http://localhost:3000 in your browser

Database Setup

The application uses PostgreSQL with the following main tables:

  • Car - Vehicle inventory
  • Category - Vehicle categories
  • Manufacturer - Car manufacturers
  • users - User accounts
  • CarOrder - Purchase orders
  • Payment - Payment transactions

Project Structure

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

License

This project is licensed under the MIT License.

Support

For issues and feature requests, please create an issue in the project repository.

About

web application simulating a car dealership experience, including authentication, database management, and Stripe payments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •