A modern, eco-friendly electric cab booking website built with Astro, React, and Tailwind CSS.
- πΏ 100% Electric vehicle fleet
- β‘ Fast, static-first website with Astro
- π¨ Beautiful UI with Tailwind CSS and shadcn/ui components
- π Dark mode support
- π± Fully responsive design
- π SEO optimized with sitemap generation
- π¬ WhatsApp integration for easy booking
- π Dynamic vehicle and route pages
- Framework: Astro 4.2
- UI Library: React 18
- Styling: Tailwind CSS 3.4
- Components: shadcn/ui (Radix UI + CVA)
- Icons: Lucide React
- TypeScript: Full type safety
shreemoryacabs/
βββ src/
β βββ components/
β β βββ ui/ # shadcn/ui components
β β βββ react/ # React components
β β βββ layout/ # Layout components
β βββ data/ # Vehicle and route data
β βββ layouts/ # Page layouts
β βββ lib/ # Utility functions
β βββ pages/ # Page routes
β βββ styles/ # Global styles
βββ public/ # Static assets
βββ package.json
- Node.js 18+
- npm or pnpm
- Install dependencies:
npm install- Create environment file:
cp .env.example .env- Update
.envwith your details:
PUBLIC_SITE_URL=https://shreemoryacabs.com
PUBLIC_WHATSAPP_NUMBER=917498264215
PUBLIC_GA_ID=G-XXXXXXXXXXStart the development server:
npm run devVisit http://localhost:4321 to view the site.
Build for production:
npm run buildPreview production build:
npm run previewThe fleet is managed through src/data/vehicles.ts. Each vehicle includes:
- Specifications (battery, range, charging)
- Pricing (per km, minimum km, full day)
- Features and amenities
- Dynamic page generation
Routes are defined in src/data/routes.ts. Each route includes:
- Distance and duration
- Pricing for different vehicles
- Highlights and descriptions
- Popular route flagging
Easy booking through WhatsApp with pre-filled messages:
- Vehicle-specific booking messages
- Route-specific inquiries
- Custom quote requests
Automatic dark mode support with:
- System preference detection
- Manual toggle
- Persistent user preference
Edit src/data/vehicles.ts:
{
id: '3',
slug: 'new-vehicle',
name: 'New EV Model',
// ... other properties
}Edit src/data/routes.ts:
{
id: '7',
slug: 'new-route',
name: 'City A to City B',
// ... other properties
}Edit src/styles/globals.css to customize the color scheme.
This is a static site that can be deployed to:
- Vercel
- Netlify
- GitHub Pages
- Cloudflare Pages
- Any static hosting service
npm install -g vercel
vercelThe site includes:
- Automatic sitemap generation at
/sitemap.xml - Open Graph meta tags
- Twitter Card meta tags
- Semantic HTML structure
- robots.txt
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Mobile browsers (iOS Safari, Chrome Mobile)
MIT License - feel free to use this project for your own purposes.
For issues or questions, please create an issue on the GitHub repository.
Built with β€οΈ and powered by clean energy β‘