A comprehensive, secure, and scalable car dealership website with user and admin functionality.
āāā backend/
ā āāā database/
ā ā āāā migrations.ts # Database schema and migrations
ā ā āāā queries.ts # Database query functions
ā ā āāā README.md
ā āāā routes/
ā ā āāā auth.ts # Authentication routes
ā ā āāā cars.ts # Car management routes
ā ā āāā users.ts # User management routes
ā ā āāā admin.ts # Admin-specific routes
ā ā āāā static.ts # Static file serving
ā āāā middleware/
ā ā āāā auth.ts # JWT authentication middleware
ā ā āāā validation.ts # Request validation
ā āāā utils/
ā ā āāā jwt.ts # JWT utilities
ā ā āāā security.ts # Security utilities
ā āāā index.ts # Main backend entry point
ā āāā README.md
āāā frontend/
ā āāā components/
ā ā āāā App.tsx # Main app component
ā ā āāā Layout/ # Layout components
ā ā āāā Auth/ # Authentication components
ā ā āāā Cars/ # Car-related components
ā ā āāā Admin/ # Admin dashboard components
ā ā āāā Common/ # Shared components
ā āāā hooks/ # Custom React hooks
ā āāā services/ # API service functions
ā āāā types/ # TypeScript type definitions
ā āāā utils/ # Frontend utilities
ā āāā index.html # Main HTML template
ā āāā index.tsx # Frontend entry point
ā āāā style.css # Global styles
ā āāā README.md
āāā shared/
ā āāā types.ts # Shared TypeScript types
ā āāā constants.ts # Shared constants
ā āāā utils.ts # Shared utility functions
āāā README.md
POST /api/auth/register - User registrationPOST /api/auth/login - User loginPOST /api/auth/refresh - Token refreshPOST /api/auth/logout - User logoutGET /api/cars - List cars with filteringGET /api/cars/:id - Get car detailsPOST /api/cars - Add new car (admin)PUT /api/cars/:id - Update car (admin)DELETE /api/cars/:id - Delete car (admin)GET /api/users/profile - Get user profilePUT /api/users/profile - Update profileGET /api/users/wishlist - Get user wishlistPOST /api/users/wishlist/:carId - Add to wishlistGET /api/admin/users - List all usersGET /api/admin/analytics - Get analytics dataGET /api/admin/inquiries - List inquiriesThe application is designed to be deployed on Val Town with: