CarpoolNext is a carpooling search application built with Next.js. It allows users to enter coordinates and search for carpooling options. The search results can be sorted by departure, price, or the fastest option, and are displayed on a map.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
The homepage displays a search form for the user to enter coordinates and search for carpooling options.
The search page displays a list of carpooling options based on the following API call: https://public-api.blablacar.com/api/v3/
On the search page, there is a map displaying the trip, and it is possible to order the list of trips by departure, price, or the fastest option.
To make the project work, ensure you have a .env.local file with the following content:
BLABLACAR_API_KEY=your_blablacar_api_key
MAPS_API_KEY=your_google_maps_api_key
The project includes the following scripts:
dev
: Start the development serverbuild
: Build the applicationprettify
: Run Prettier to format the codestart
: Start the production serverlint
: Run ESLint to check for linting errorstest
: Run Jest to execute tests