Are you ready to explore the ever expanding horizons—no strings attached? Checkout is free.
A full-stack web app for browsing and booking rental properties.
Rentals is a comprehensive property rental application featuring real-time search, user authentication, interactive maps, and property reviews. Built as a monorepo using Yarn workspaces, it demonstrates modern web development practices with end-to-end type safety, automated code quality checks, and structured logging.
- Property Management - Browse, search, and filter vacation rentals
- User Authentication - Secure Google OAuth 2.0 integration
- Location Services - Interactive maps with nearby places search
- Reviews & Ratings - Property and host review system
- Type-Safe API - GraphQL with automatic type generation
- Modern UI - Responsive design with Chakra UI and TailwindCSS
- React 18 with TypeScript and Vite
- Apollo Client for GraphQL data management
- Chakra UI + TailwindCSS for styling
- Zustand for state management
- GraphQL Code Generator for type safety
- Node.js with Express
- Apollo Server 4 (GraphQL)
- MongoDB 6 with Atlas
- Winston for structured logging
- Zod for runtime validation
- Prettier - Code formatting
- ESLint - Code linting
- Husky + lint-staged - Pre-commit hooks
- TypeScript - Strict mode enabled
- Google OAuth 2.0
- Google Maps (Geocoding & Places API)
- Node.js v18.0.0 or higher
- Yarn 1.22+ package manager
- MongoDB Atlas account
- Google Cloud Platform account (for OAuth and Maps API)
git clone <repository-url>
cd rentals
yarn installCreate a .env file in /packages/api:
PORT=4000
JWT_SECRET=your-jwt-secret-here
SESSION_SECRET=your-session-secret-here
DB_USER=your-mongodb-username
DB_USER_PASSWORD=your-mongodb-password
DB_CLUSTER=your-cluster.mongodb.net
G_CLIENT_ID=your-google-client-id
G_GEOCODE_KEY=your-google-maps-api-key
PUBLIC_URL=http://localhost:5173
NODE_ENV=developmentMongoDB Atlas:
- Create account at MongoDB Atlas
- Create a cluster and get connection credentials
- Whitelist your IP address
Google Cloud Platform:
- Create project at Google Cloud Console
- Enable APIs: OAuth 2.0, Maps Places API, Geocoding API
- Create OAuth 2.0 credentials and API key
- Add
http://localhost:5173to authorized redirect URIs
# Seed the database with sample data
yarn seed
# Run both API and web app concurrently
yarn dev- API: http://localhost:4000
- Web App: http://localhost:5173
rentals/
├── packages/
│ ├── api/ # GraphQL API Server
│ │ ├── src/
│ │ │ ├── resolvers/ # GraphQL resolvers & type definitions
│ │ │ ├── lib/ # Utilities, types, logger
│ │ │ ├── auth/ # Google OAuth integration
│ │ │ ├── database/ # MongoDB connection
│ │ │ └── index.ts # Express + Apollo Server setup
│ │ ├── eslint.config.js
│ │ ├── tsconfig.json
│ │ └── package.json
│ └── web/ # React Frontend
│ ├── src/
│ │ ├── components/ # Reusable React components
│ │ ├── pages/ # Page-level components
│ │ ├── lib/ # GraphQL queries, mutations, Apollo setup
│ │ ├── store/ # Zustand state management
│ │ └── hooks/ # Custom React hooks
│ ├── eslint.config.js
│ ├── vite.config.ts
│ └── package.json
├── .husky/ # Git hooks (pre-commit)
├── .prettierrc.json # Prettier configuration
├── .lintstagedrc.json # Lint-staged configuration
├── package.json # Root workspace configuration
└── README.md
yarn dev- Run both API and web app concurrentlyyarn start:api- Start API server onlyyarn start:web- Start web app onlyyarn seed- Seed database with sample data
yarn build- Build both packages for productionyarn start- Build and run in production modeyarn clean- Remove all build artifacts
yarn format- Format all code with Prettieryarn format:check- Check code formattingyarn lint- Lint all packagesyarn lint:fix- Fix auto-fixable linting issuesyarn type-check- Run TypeScript type checking
yarn gen:schema- Generate GraphQL schemayarn gen:generate- Generate TypeScript types from GraphQL
- Automatic formatting - Prettier runs on commit via Husky + lint-staged
- Type safety - TypeScript strict mode enabled across the project
- GraphQL types - Auto-generated from schema for type safety
- Input validation - Zod schemas for runtime validation
- Structured logging - Winston logger for API debugging
- Schema defined in
packages/api/src/resolvers/typeDefs.ts - Resolvers organized by domain in
packages/api/src/resolvers/ - Frontend types auto-generated in
packages/web/src/lib/graphql/__generated__/
- Reusable components in
packages/web/src/components/ - Page components in
packages/web/src/pages/ - Follow Chakra UI theming conventions
- Global auth state managed with Zustand
- GraphQL cache managed by Apollo Client
- Local component state with React hooks
- Verify IP address is whitelisted in MongoDB Atlas Network Access
- Check
DB_USER,DB_USER_PASSWORD, andDB_CLUSTERare correct - Ensure cluster is active and accessible
- Verify API keys are set correctly in
.env - Check required APIs are enabled in Google Cloud Console
- Confirm OAuth redirect URIs include
http://localhost:5173 - Check API quotas haven't been exceeded
- Run
yarn cleanto remove stale build artifacts - Delete
node_modulesand runyarn installagain - Ensure Node.js version is 18.0.0 or higher
- Run
yarn formatto auto-format code - Run
yarn lint:fixto fix auto-fixable issues - Check ESLint config files in each package