A full-stack React application for browsing and renting camper vans. Users can explore van listings, view availability, filter by type, rent vans by selecting a date range, and leave reviews. Hosts can log in to view their dashboard with income stats, reviews, and van management tools.
This project was built using a Figma UI reference for layout and design consistency. Figma design reference
- Browse all available vans
- View detailed descriptions, images, and pricing
- Filter vans by type (Simple, Luxury, Rugged)
- Select a start and end date for rental using a date picker
- Leave reviews on vans
- Prevent double-booking using real-time availability logic
- Login and access protected dashboard
- View income overview
- Manage vans (view their listings)
- See reviews left on their vans
- React (JSX) with Vite
- React Router 6
- React Context API (for Auth)
react-datepickerfor date pickingreact-toastifyfor toast messagestippy.jsfor tooltips
- Node.js + Express
- PostgreSQL
- Cloudinary (for image uploads)
- Cookie-based sessions with express-session
git clone https://github.com/yelfaram/van-life
cd van-lifeEnsure you have a local PostgreSQL instance running.
Create a database:
CREATE DATABASE van_life;cd backend
npm installSet up a .env file in the backend/ folder:
PORT=3000
DB_HOST=localhost
DB_NAME=van_life
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_PORT=5432
SESSION_SECRET=random_string
# Cloudinary credentials (for image uploads)
CLOUD_NAME=your_cloud_name
API_KEY=your_api_key
API_SECRET=your_api_secret
Build and start the backend server:
npm run build
npm startNote: SESSION_SECRET can be any random string for local development, but should be securely generated in production.
In the client/ folder:
npm install
npm run devThe frontend will run at http://localhost:5173 by default.
- Users log in via the login form (no OAuth).
- Auth state is stored using React Context.
- Protected routes redirect unauthorized users.