CarHub is a Next.js 14 (App Router) application for discovering and renting cars.
Users can authenticate using Google, explore car listings, book rentals, and securely process payments through Stripe.
The project is written in TypeScript with a responsive design powered by Tailwind CSS and a dark theme.
The backend utilizes Prisma as the ORM with a PostgreSQL database.
Before you begin, ensure you have the following installed and set up:
Clone the repository:
git clone [email protected]:SiegfriedBz/next_app__cars.git
cd next_app__cars
Install dependencies:
npm install
Set up environment variables:
Create a .env file in the root directory and add the following environment variables
# NextAuth Configuration
NEXT_PUBLIC_NEXTAUTH_URL=
NEXTAUTH_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_SECRET_ID=
# Social Links
NEXT_PUBLIC_LINKEDIN_URL=
NEXT_PUBLIC_GITHUB_URL=
# RapidAPI Configuration
NEXT_PUBLIC_RAPID_API_KEY=
NEXT_PUBLIC_RAPID_API_HOST=
# IMAGIN.studio Configuration
NEXT_PUBLIC_IMAGIN_STUDIO_API_KEY=
# Prisma Configuration
DATABASE_URL=
# Stripe Configuration
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
# Admin Contact Email
NEXT_PUBLIC_MAIL_CONTACT=
# Brevo Email Configuration
NEXT_PUBLIC_BREVO_SENDER_NAME="Car Hub"
NEXT_PUBLIC_BREVO_SENDER_EMAIL=
NEXT_PUBLIC_BREVO_API_KEY=
Initialize Prisma:
npx prisma init
Generate Prisma Client:
npx prisma generate
To start the development server, run:
npm run dev
To build the project for production, run:
npm run build
After building the project, you can start the production server with:
npm start
Visit the live demo of CarHub deployed on Vercel
PostgreSQL DB hosted on aiven.io