Code Monkey home page Code Monkey logo

siegfriedbz / next_app__cars Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 4.09 MB

๐ŸŽ๏ธ Next.js 14 app (App Router) for discovering and renting cars, featuring Google authentication, car exploration, rental booking, and secure Stripe payments. TypeScript, Tailwind CSS with dark theme support, and Prisma ORM with PostgreSQL backend.

Home Page: https://car-hub-jade-two.vercel.app

CSS 3.88% TypeScript 95.76% JavaScript 0.36%
app-router-nextjs google-authentication next-auth nextjs tailwindcss typescript headlessui-react framer-motion postgresql prisma stripe-api zustand zustand-persist brevo-api dark-theme react-suspense

next_app__cars's Introduction

CarHub

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.

Table of Contents

Prerequisites

Before you begin, ensure you have the following installed and set up:

  • Node.js: Install Node.js on your machine.
  • PostgreSQL Database: Set up a PostgreSQL database provider (e.g., Aiven).
  • Stripe Account: Create an account on Stripe for payment processing.
  • Brevo Email Account: Sign up for Brevo to send booking confirmation emails.
  • RapidAPI Cars API Account: Obtain an API key from RapidAPI Cars API for car data.
  • IMAGIN.studio API Account: Register with IMAGIN.studio API for car images (Note: Free tier availability may vary).

Installation

  1. Clone the repository:
git clone [email protected]:SiegfriedBz/next_app__cars.git
cd next_app__cars
  1. Install dependencies:
npm install
  1. 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=

Set up Prisma

Initialize Prisma:

npx prisma init

Generate Prisma Client:

npx prisma generate

Running the Development Server

To start the development server, run:

npm run dev

Building for Production

To build the project for production, run:

npm run build

Running the Production Server

After building the project, you can start the production server with:

npm start

Technologies Used

  • Framework: React, Next.js 14 (App Router)
  • TypeScript: Provides type safety and improved development experience.

Frontend:

  • Styling: Tailwind CSS (responsive design with dark theme support)

Backend:

  • ORM: Prisma
  • DB: PostgreSQL
  • Authentication: NextAuth.js with Google Provider

Payment Processing:

  • Stripe

Live Demo

Visit the live demo of CarHub deployed on Vercel
PostgreSQL DB hosted on aiven.io

next_app__cars's People

Contributors

siegfriedbz avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.