A modern, full-stack web application for ShiftNgo, a second-hand car showroom that sells certified used cars. Built with React, TypeScript, Tailwind CSS, and Supabase.
- Modern Showroom UI: Glassmorphic design with premium aesthetics
- Dynamic Car Inventory: Real-time car listings from Supabase
- Advanced Filtering: Filter by fuel type, transmission, price, year, kilometers, owners, and brand
- Responsive Design: Optimized for mobile, tablet, and desktop
- Interactive Car Details: Modal with image slider and comprehensive specifications
- Contact Integration: WhatsApp and call buttons throughout the site
- Professional Sections: Hero, Why Choose Us, Contact information
- Supabase Authentication: Secure email/password login
- Car Upload Form: Intuitive form for non-technical users
- Image Management: Multiple image upload with preview and compression
- Car Management: View, edit, and delete car listings
- Car Description Support: Rich text descriptions for each vehicle
- Real-time Updates: Instant reflection of changes on the public site
- Frontend: React 18 + TypeScript
- Styling: Tailwind CSS
- Routing: React Router DOM
- Authentication: Firebase Auth
- Database: Firebase Firestore
- Storage: Firebase Storage
- Icons: Lucide React
- Notifications: React Hot Toast
- Build Tool: Vite
src/
βββ components/
β βββ Admin/
β β βββ AdminDashboard.tsx
β β βββ AdminLogin.tsx
β β βββ CarManagement.tsx
β β βββ CarUploadForm.tsx
β βββ Cars/
β β βββ CarCard.tsx
β β βββ CarGrid.tsx
β β βββ CarModal.tsx
β β βββ FilterPanel.tsx
β βββ Home/
β β βββ Contact.tsx
β β βββ Hero.tsx
β β βββ WhyShiftNgo.tsx
β βββ Layout/
β βββ FloatingButtons.tsx
β βββ Footer.tsx
β βββ Header.tsx
βββ hooks/
β βββ useCars.ts
βββ lib/
β βββ firebase.ts
βββ pages/
β βββ Admin.tsx
β βββ Home.tsx
βββ types/
β βββ index.ts
βββ App.tsx
βββ index.css
βββ main.tsx
- Node.js 18+
- npm or yarn
- Firebase project
- Clone the repository
git clone <repository-url>
cd shiftngo-platform- Install dependencies
npm install-
Set up Firebase
- Create a new Firebase project at Firebase Console
- Enable Authentication (Email/Password)
- Create Firestore database
- Enable Storage
- Get your Firebase configuration
-
Configure environment variables
cp .env.example .envFill in your Firebase configuration in the .env file.
-
Update Firebase configuration Edit
src/lib/firebase.tswith your Firebase project details. -
Start development server
npm run devThe application will be available at http://localhost:5173
-
Authentication
- Go to Firebase Console > Authentication > Sign-in method
- Enable Email/Password authentication
- Create admin user accounts
-
Firestore Database
- Create a collection named
cars - Set up security rules (example provided below)
- Create a collection named
-
Storage
- Enable Firebase Storage
- Create a folder structure for car images
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Cars collection - public read, admin write
match /cars/{carId} {
allow read: if true;
allow write: if request.auth != null;
}
}
}- Visit the homepage to browse available cars
- Use filters to narrow down search results
- Click on any car to view detailed information
- Use WhatsApp or call buttons to contact the showroom
- Navigate to
/admin - Login with Firebase credentials
- Upload new cars with images and specifications
- Manage existing car listings
- View analytics (coming soon)
- Glassmorphism: Modern glass-like UI elements
- Responsive Grid: Adapts to all screen sizes
- Smooth Animations: Hover effects and transitions
- Professional Typography: Inter font for readability
- Color System: Consistent blue/purple gradient theme
- Accessibility: Proper contrast ratios and keyboard navigation
Edit the brands array in src/components/Admin/CarUploadForm.tsx:
const brands = ["Maruti Suzuki", "Hyundai", "Honda", "Your New Brand"];Update contact details in:
src/components/Layout/FloatingButtons.tsxsrc/components/Home/Contact.tsxsrc/components/Layout/Footer.tsx
All styling is done with Tailwind CSS. Key files:
src/index.css- Global styles and custom animationstailwind.config.js- Theme configuration
npm run buildnpm i -g vercel
vercel --prod- Build the project:
npm run build - Upload the
distfolder to Netlify - Set environment variables in Netlify dashboard
- Push your code to GitHub
- Create a new Web Service in Render
- Connect your GitHub repository
- Use the following settings:
- Build Command:
npm install && npm run build - Start Command:
npm run start - Environment Variables: Add your Supabase URL and Anon Key
- Build Command:
- Click Deploy
Important: For Render deployment, make sure your Vite configuration has proper host binding:
// vite.config.ts
server: {
host: '0.0.0.0',
port: 3000
}- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For support, email support@shiftngo.com or create an issue in the repository.
Built with β€οΈ for ShiftNgo - Making car buying simple and trustworthy.