Skip to content
/ turbo Public

Empower your platform with NextAuth for Google and GitHub logins, Stripe for payments, multi-currency/language support. Offer car rentals, repairs, equipment sales. Manage reservations, services, and sales efficiently. Access centralized data for enhanced organization and user experience.

License

Notifications You must be signed in to change notification settings

ShahSau/turbo

Repository files navigation

TURBO

A car shop webapp based on nextjs

license last-commit repo-top-language repo-language-count

Developed with the software and tools below.

JavaScript sharp React Axios nextjs TypeScript ExpressJS i18next
JWT mongodb ESLint Prisma Leaflet Stripe JSON PostCSS zustand


🔗 Quick Links


📍 Overview

The Turbo App is a user-friendly and efficient application designed and build with nextjs to simplify the process of renting and managing vehicles.


📦 Features

Elevate your platform's functionality with a feature-rich set designed to enhance user experience and empower businesses. Our solution integrates NextAuth for secure Google and GitHub logins, Stripe for seamless payments, and offers multi-currency and multi-language support. Whether you're renting cars, booking car repair services, or selling car equipment, our platform provides a unified and user-friendly experience.

  • NextAuth with Google and GitHub Login: Secure and efficient authentication with NextAuth, supporting both Google and GitHub logins.

  • Multi-Language Support: Switch between languages effortlessly with support for Finnish, Swedish, English, and German.

  • Stripe Integration for Payments: Streamline transactions with Stripe integration, providing a seamless and secure payment experience for users.

  • Multi-Currency Support: Cater to a global audience with support for multiple currencies.

  • Car Rental Services: Offer a comprehensive car rental solution, allowing users to easily browse, select, and rent vehicles.

  • Car Repair Shop Booking: Facilitate convenient booking of car repair services through your platform.

  • Car Equipment Sales: Create an additional revenue stream by enabling users to purchase car equipment directly from your platform.

  • All Reserved Cars: Access a centralized list of all reserved cars, allowing for efficient management and tracking of reservations.

  • All Reserved Services: Keep track of all booked car repair services, providing a comprehensive overview for both users.

  • All Bought Equipments: Maintain a record of all purchased car equipment.

  • All Advertized Cars: Keep track of your advertized cars in one centralized location.

  • All Offered Services: Stay organized by accessing a comprehensive overview of all your offered services.

  • All Equipment for Sell: Keep a record of your sold car equipment with a detailed history.


📂 Repository Structure

└── turbo/
    ├── .eslintrc.json
    ├── app
    │   ├── [lang]
    │   │   ├── actions
    │   │   ├── cancel
    │   │   ├── cars
    │   │   ├── components
    │   │   ├── equipmentReservations
    │   │   ├── equipments
    │   │   ├── error.tsx
    │   │   ├── favorites
    │   │   ├── globals.css
    │   │   ├── hooks
    │   │   ├── layout.tsx
    │   │   ├── libs
    │   │   ├── listings
    │   │   ├── loading.tsx
    │   │   ├── not-found.tsx
    │   │   ├── offerEquipments
    │   │   ├── offers
    │   │   ├── page.tsx
    │   │   ├── providers
    │   │   ├── reservations
    │   │   ├── search
    │   │   ├── searchEquipment
    │   │   ├── searchRepair
    │   │   ├── serviceReservations
    │   │   ├── services
    │   │   ├── success
    │   │   ├── trips
    │   │   └── types
    │   └── api
    │       ├── equipment
    │       ├── equipmentReservation
    │       ├── favorites
    │       ├── listings
    │       ├── payment
    │       ├── register
    │       ├── reservations
    │       ├── serviceReservations
    │       └── services
    ├── dictionaries
    │   ├── de.json
    │   ├── en.json
    │   ├── fi.json
    │   └── sv.json
    ├── dictionary.ts
    ├── i18n.config.ts
    ├── middleware.ts
    ├── next-env.d.ts
    ├── next.config.js
    ├── package-lock.json
    ├── package.json
    ├── pages
    │   └── api
    │       └── auth
    ├── postcss.config.js
    ├── prisma
    │   └── schema.prisma
    ├── public
    ├── tailwind.config.js
    └── tsconfig.json

🧩 Modules

.
File Summary
middleware.ts Middleware to swtich languages
dictionary.ts Render language file depending on the chosen language
tailwind.config.js TailwindCSS config file
tsconfig.json Typescript config file
i18n.config.ts Language config file
pages.api.auth
File Summary
[...nextauth].ts authentication via nextAuth
prisma
File Summary
schema.prisma Schema file of the project
dictionaries
File Summary
de.json German language dictionary
sv.json Swedish language dictionary
en.json English language dictionary
fi.json Finnish language dictionary
app.[lang]
File Summary
globals.css Tailwind will swap these directives out at build time with all of its generated CSS
layout.tsx Base layout of the
error.tsx Customized 404 page
loading.tsx Loader page
not-found.tsx Customized 404 page
page.tsx Homepage of the app
app.[lang].components
File Summary
Map.tsx Map componenet
Footer.tsx Footer of the app
CategoryBoxRepair.tsx Equipment category component
EmptyState.tsx Empty state component
Button.tsx Button component
HeartButton.tsx Favorite button component
locale-switcher.tsx Language switcher component
Avatar.tsx Profile pic component
ClientOnly.tsx Component to remove nextjs hydration error
Container.tsx Base container component
CategoryBox.tsx Rent a car category component
Heading.tsx Heading component
Loader.tsx Loader component
CityData.tsx Latitude and longitude data of cities in Finland
app.[lang].components.equipments
File Summary
EquipmentInfo.tsx Description section of selling equipment card
EquipmentReservation.tsx Equipment buying section of selling equipment card
EquipmentHead.tsx Header of selling equipment card
EquipmentCard.tsx Component to render individual equipment
app.[lang].components.navbar
File Summary
Categoriesrepair.tsx List of all categories of selling items
MenuItem.tsx Rendering individual nav link
UserMenu.tsx User menu component
Search.tsx Search button of rental car
Navbar.tsx Navbar of the app
SearchRepair.tsx Search button of selling equipments
Categories.tsx List of all categories of car rental
app.[lang].components.modals
File Summary
SearchModal.tsx Search modal of rent a car
RegisterModal.tsx Sign up modal
Modal.tsx Base modal
RepairModal.tsx Car servicing modal
EquipmentModal.tsx Selling equipment modal
RentModal.tsx Rent a car modal
RepairSearchModal.tsx Car servicing modal
LoginModal.tsx Login modal
app.[lang].components.inputs
File Summary
CitySelect.tsx City select input section
Counter.tsx Counter section
Calendar.tsx Calender section
Input.tsx Base input section
ImageUpload.tsx Image upload section
CategoryInput.tsx Category input section
SelectInput.tsx Select input section
app.[lang].components.services
File Summary
ServiceHead.tsx Header section of car service card
ServiceCategory.tsx Category section of car service card
ServiceCard.tsx Component to render individual car service
ServiceInfo.tsx Description section of car service card
app.[lang].components.listings
File Summary
ListingReservation.tsx Reservation section of rent a car card
ListingHead.tsx Header section of rent a car card
ListingCategory.tsx Category section of rent a car card
ListingInfo.tsx Description section of rent a car card
ListingCard.tsx Component to render individual rent a car service
app.[lang].types
File Summary
index.ts Different kind of type checking
app.[lang].equipments.[equipmentId]
File Summary
EquipmentClient.tsx Component of individual selling equipment page
page.tsx Individual selling equipment page
app.[lang].success
File Summary
page.tsx Payment success page
app.[lang].reservations
File Summary
ReservationsClient.tsx Component to render all future car reservations
page.tsx Page to render all future car reservations
app.[lang].offerEquipments
File Summary
EqupimentClient.tsx Component to render all equipments (seller page)
page.tsx Page to render all equipments (seller page)
app.[lang].equipmentReservations
File Summary
EquipmentReservationClient.tsx Component to render all equipment reservation
page.tsx Page to render all equipment reservation
app.[lang].searchEquipment
File Summary
page.tsx Equipment search page
app.[lang].offers
File Summary
ServicesClient.tsx Component to render all car service (seller page)
page.tsx Page to render all car service (seller page)
app.[lang].cars
File Summary
CarsClient.tsx Component to render all rent a car (seller page)
page.tsx Page to render all rent a car (seller page)
app.[lang].actions
File Summary
getListings.ts Get all rent a car from database
getReservations.ts Get all the reservations from database
getEquipments.ts Get all the equipments from database
getServices.ts Get all the services from database
getFavoriteListings.ts Get all favorites car from database
getCurrentUser.ts Get current user from database
getEquipmentReservation.ts Get all the bought equipments from database
getuserById.ts Get individual user from database
getEquipmentById.ts Get individual equipment from database
getListingById.ts Get individual car from database
getServiceById.ts Get individual service from database
getServiceReservation.ts Get all service reservations from database
app.[lang].search
File Summary
page.tsx Car rental search page
app.[lang].searchRepair
File Summary
page.tsx Car service search page
app.[lang].cancel
File Summary
page.tsx Payment cancellation page
app.[lang].hooks
File Summary
useRegisterModal.ts User registration modal hocks
useRepairSearchModal.ts Car service modal hocks
useEquipmentModal.ts Buying car equipment modal hocks
useFavorite.ts Making a car favorite modal hocks
useRepairModal.tsx Car service modal hocks
useCountries.ts Finland cities modal hocks
useSearchModal.ts Car rental search modal hocks
useLoginModal.ts Login modal hocks
app.[lang].providers
File Summary
ModalsProvider.tsx TAuth provider
ToasterProvider.tsx Toast notification provider
app.[lang].services.[serviceId]
File Summary
ServiceClient.tsx Component to render individual car service
page.tsx Page to render individual car service
app.[lang].favorites
File Summary
FavoritesClient.tsx Component to render favorite cars
page.tsx Page to render favorite cars
app.[lang].serviceReservations
File Summary
ServiceReservationsClient.tsx Component to render reserved services
page.tsx Page to render reserved services
app.[lang].listings.[listingId]
File Summary
ListingClient.tsx Component to render individual car
page.tsx Page to render individual car
app.api.payment
File Summary
route.ts Payment route
app.api.equipment
File Summary
route.ts Equipment route
app.api.equipment.[equipmentId]
File Summary
route.ts Individual equipment route
app.api.reservations
File Summary
route.ts Car reservation route
app.api.reservations.[reservationId]
File Summary
route.ts Individual car reservation route
app.api.equipmentReservation
File Summary
route.ts Equipment reservation route
app.api.services
File Summary
route.ts Car service route
app.api.services.[serviceId]
File Summary
route.ts Individual car service route
app.api.favorites.[listingId]
File Summary
route.ts Favorite cars route
app.api.serviceReservations
File Summary
route.ts Service reservation route
app.api.serviceReservations.[reservationId]
File Summary
route.ts Individual service reservation route
app.api.register
File Summary
route.ts Uset registration route
app.api.listings
File Summary
route.ts All cars route
app.api.listings.[listingId]
File Summary
route.ts Individual car route

🚀 Getting Started

Requirements

Ensure you have the following dependencies installed on your system:

  • node: version >= 18.0.0
  • next: version >=14.0.4
  • react: version >=18.2.0

⚙️ Installation

  1. Clone the turbo repository:
git clone https://github.com/ShahSau/turbo
  1. Change to the project directory:
cd turbo
  1. Install the dependencies:
npm install

🤖 Running turbo

Create an .env file with following keys:

DATABASE_URL
NEXTAUTH_SECRET
GITHUB_ID
GITHUB_SECRET
GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
NEXT_PUBLIC_RAPID_API_KEY
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
STRIPE_SECRET_KEY

Use the following command to run turbo:

npm run dev

🛠 Project Roadmap

  • ► Cypress Testing

📄 License

This project is protected under the MIT License. For more details, refer to the LICENSE file.


Top

About

Empower your platform with NextAuth for Google and GitHub logins, Stripe for payments, multi-currency/language support. Offer car rentals, repairs, equipment sales. Manage reservations, services, and sales efficiently. Access centralized data for enhanced organization and user experience.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages