An open-source Next.js application to host your Airbnb rooms and properties yourself. Re-take ownership of your properties by building a dedicated website with a simple CMS, calendar synchronization, and direct booking capabilities.
Repository: https://github.com/tschoem/rental-manager
- Property & Room Management: Create and manage multiple properties with rooms
- Airbnb Integration:
- Import listings directly from Airbnb URLs (scrapes title, description, images, amenities, and pricing)
- Calendar synchronization via iCal URLs for real-time availability
- Link back to Airbnb listings
- Content Management System (CMS):
- Customize Home page (hero section, features, about, rooms/properties, CTA)
- Customize Location page (area descriptions, images, maps)
- Customize About page (owner profiles, social media links)
- Drag-and-drop feature ordering
- Image upload with cropping
- Booking System:
- Direct booking requests from guests
- Calendar view showing availability
- Booking status management (Pending, Confirmed, Cancelled)
- Email notifications for booking requests
- Calendar Sync:
- Sync with Airbnb calendars via iCal URLs
- Block dates automatically based on bookings
- Show real-time availability on room pages
- Authentication:
- Secure admin authentication with NextAuth.js
- Password reset functionality
- Session management
- Email Functionality:
- Password reset emails
- Booking request notifications
- SMTP configuration support
- SEO & Customization:
- SEO settings (meta description, keywords, author)
- Site configuration (name, icon, URL, currency)
- Single property mode for focused sites
- Node.js: 18.x or higher
- npm or yarn or pnpm
- SQLite (default) or PostgreSQL / MySQL (for production)
The following environment variables are required:
DATABASE_URL: Database connection string- Local Development: SQLite -
file:./dev.dborfile:./prisma/dev.db - Production/Vercel: PostgreSQL (required) -
postgresql://user:password@host:port/database?sslmode=require - Note: SQLite is not recommended for Vercel deployments due to ephemeral storage limitations
- Local Development: SQLite -
NEXTAUTH_SECRET: Secret key for NextAuth.js (generate withopenssl rand -base64 32)NEXTAUTH_URL: Your application URL (auto-detected in development)
SMTP_HOST: SMTP server hostname (e.g.,smtp.gmail.com)SMTP_PORT: SMTP port (e.g.,587)SMTP_SECURE:trueorfalse(usefalsefor port 587)SMTP_USER: SMTP username/emailSMTP_PASSWORD: SMTP password (use App Password for Gmail)SMTP_FROM_EMAIL: Email address to send fromADMIN_EMAIL: Admin email for notifications
git clone https://github.com/tschoem/rental-manager.git
cd rental-managernpm install
# or
yarn install
# or
pnpm installCreate a .env file in the root directory:
# Database
DATABASE_URL="file:./dev.db"
# NextAuth
NEXTAUTH_SECRET="your-secret-key-here"
NEXTAUTH_URL="http://localhost:3000"
# Email (Optional - for password reset and booking notifications)
SMTP_HOST="smtp.gmail.com"
SMTP_PORT="587"
SMTP_SECURE="false"
SMTP_USER="your-email@gmail.com"
SMTP_PASSWORD="your-app-password"
SMTP_FROM_EMAIL="your-email@gmail.com"
ADMIN_EMAIL="admin@example.com"Generate NEXTAUTH_SECRET:
openssl rand -base64 32Run the setup script to create the database schema:
npm run setupThis will:
- Create the database file (if using SQLite)
- Run Prisma migrations
- Set up all required tables
After the database is initialized, you'll be prompted to create an admin user through the setup screen at http://localhost:3000, or you can use the CLI:
npm run setup-adminnpm run devOpen http://localhost:3000 in your browser.
- Visit
http://localhost:3000- you'll see the setup screen if configuration is incomplete - Complete all required setup steps:
- Configure
DATABASE_URLin.env - Run
npm run setupto initialize database - Configure
NEXTAUTH_SECRETin.env - Create admin user via the setup form
- Configure
- (Optional) Configure SMTP settings for email functionality
Access the admin dashboard at /admin after logging in.
- Go to Properties in the admin menu
- Click Add Property to create a new property
- Add rooms to properties:
- Click on a property
- Click Add Room or Import from Airbnb
- For Airbnb import, paste the listing URL and optionally provide:
- Gallery URL (for better image scraping)
- iCal URL (for calendar sync)
- Navigate to a property
- Click Import Room from Airbnb
- Enter the Airbnb listing URL
- (Optional) Provide gallery URL for better image extraction
- (Optional) Provide iCal calendar URL for availability sync
- Click Import - the system will automatically extract:
- Title and description
- Images
- Amenities
- Pricing
- Capacity
- Home Page (
/admin/home): Edit hero section, features, about section, rooms section, and CTA - Location Page (
/admin/location): Edit area descriptions, images, and map - About Page (
/admin/about): Manage owner profiles and social media links
- View booking requests in the admin dashboard
- Update booking status (Pending β Confirmed/Cancelled)
- Bookings are automatically synced with calendar availability
- Home (
/): Main landing page with properties/rooms - Properties (
/properties/[id]): Individual property pages - Rooms (
/rooms/[id]): Individual room pages with booking calendar - Location (
/location): Location information page - About (
/about): About page with owner information
-
Push to GitHub/GitLab/Bitbucket
-
Import to Vercel:
- Go to vercel.com
- Click "New Project"
- Import your repository
-
Configure Environment Variables:
- In Vercel project settings, add all environment variables from your
.envfile - IMPORTANT: Use PostgreSQL for Vercel deployments (SQLite is not supported)
- SQLite on Vercel has limitations: data is ephemeral, stored in
/tmp, and may be lost - Recommended options:
- Vercel Postgres: Add via Vercel dashboard (easiest)
- Supabase: Free tier available, great for Next.js
- Railway: Simple PostgreSQL hosting
- Neon: Serverless PostgreSQL
- SQLite on Vercel has limitations: data is ephemeral, stored in
- Update
DATABASE_URLto your PostgreSQL connection string:postgresql://user:password@host:port/database?sslmode=require - Set
NEXTAUTH_URLto your production domain
- In Vercel project settings, add all environment variables from your
-
Deploy:
- Vercel will automatically build and deploy
- After deployment, run migrations:
npx prisma migrate deploy
- Or use Vercel's build command to run migrations:
{ "scripts": { "build": "prisma migrate deploy && next build" } }
- Create a new project on Railway
- Connect your GitHub repository
- Add environment variables
- Railway will automatically detect Next.js and deploy
- Add a PostgreSQL database service
- Update
DATABASE_URLto the PostgreSQL connection string
Create a Dockerfile:
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npx prisma generate
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]Build and run:
docker build -t rental-manager .
docker run -p 3000:3000 --env-file .env rental-manager- Set up Node.js on your server
- Clone the repository
- Install dependencies:
npm install - Set up environment variables
- Run
npm run setupto initialize database - Build:
npm run build - Start:
npm start - Use PM2 or similar for process management:
npm install -g pm2 pm2 start npm --name "rental-manager" -- start pm2 save pm2 startup
For production databases (PostgreSQL/MySQL), run migrations:
npx prisma migrate deployOr include in your build process:
npx prisma migrate deploy && npm run build- Use PostgreSQL or MySQL (not SQLite) for production
- Set strong
NEXTAUTH_SECRET - Configure
NEXTAUTH_URLto your production domain - Set up SMTP for email functionality
- Configure proper CORS settings if needed
- Set up SSL/HTTPS
- Configure backup strategy for database
- Set up monitoring and logging
- Review and update SEO settings
- Test booking flow end-to-end
npm run dev: Start development servernpm run build: Build for productionnpm run start: Start production servernpm run lint: Run ESLintnpm run setup: Initialize database schemanpm run setup-admin: Create admin user via CLInpm run list-users: List all usersnpm run delete-user: Delete a user
rental_manager/
βββ app/ # Next.js app directory
β βββ _components/ # Shared components
β β βββ AdminSetupForm.tsx # Admin setup form
β β βββ Footer.tsx # Site footer
β β βββ Header.tsx # Site header
β β βββ ImageUploadWithCrop.tsx # Image upload with cropping
β β βββ RotatingHero.tsx # Hero section component
β β βββ SetupPage.tsx # Setup wizard page
β βββ actions/ # Server actions
β β βββ password-reset.ts # Password reset actions
β β βββ setup-admin.ts # Admin setup actions
β β βββ actions.ts # General server actions
β βββ admin/ # Admin dashboard
β β βββ _components/ # Admin shared components
β β βββ about/ # About page management
β β β βββ _components/ # About page components
β β β βββ owners/ # Owner management
β β βββ home/ # Home page editor
β β β βββ _components/ # Home page components
β β βββ location/ # Location page editor
β β β βββ _components/ # Location page components
β β βββ properties/ # Property management
β β β βββ _components/ # Property components
β β β βββ [id]/ # Individual property pages
β β β βββ import/ # Airbnb import
β β β βββ rooms/ # Room management
β β βββ rooms/ # Room management
β β β βββ _components/ # Room components
β β β βββ [id]/ # Individual room pages
β β βββ settings/ # Site settings
β β β βββ _components/ # Settings components
β β βββ actions.ts # Admin server actions
β β βββ layout.tsx # Admin layout
β β βββ page.tsx # Admin dashboard
β βββ api/ # API routes
β β βββ auth/ # Authentication API
β β β βββ [...nextauth]/ # NextAuth.js routes
β β βββ rooms/ # Room API endpoints
β β β βββ [id]/
β β β βββ availability/ # Calendar availability API
β β βββ upload-image/ # Image upload API
β βββ auth/ # Authentication pages
β β βββ forgot-password/ # Password reset request
β β βββ reset-password/ # Password reset form
β β βββ signin/ # Sign in page
β βββ properties/ # Public property pages
β β βββ [id]/ # Individual property page
β β βββ _components/ # Property page components
β βββ rooms/ # Public room pages
β β βββ [id]/ # Individual room page
β β βββ _components/ # Room page components
β βββ about/ # About page
β βββ location/ # Location page
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
β βββ providers.tsx # React providers
β βββ globals.css # Global styles
βββ lib/ # Utility libraries
β βββ airbnb-scraper.ts # Airbnb listing scraper
β βββ auth.ts # Authentication utilities
β βββ db-check.ts # Database connection check
β βββ db-path.ts # Database path utilities
β βββ download-image.ts # Image download utility
β βββ email.ts # Email sending utilities
β βββ gemini.ts # Google Gemini AI integration
β βββ ical.ts # iCal calendar parsing
β βββ prisma.ts # Prisma client instance
β βββ setup-status.ts # Setup status checker
β βββ social-media-scanner.ts # Social media profile scanner
βββ prisma/ # Database
β βββ schema.prisma # Prisma schema definition
β βββ dev.db # SQLite database (dev)
βββ scripts/ # CLI scripts
β βββ setup.ts # Database setup script
β βββ setup-admin.ts # Admin user creation
β βββ list-users.ts # List all users
β βββ delete-user.ts # Delete user script
β βββ update-property-admin.ts # Update property admin
β βββ list-gemini-models.ts # List Gemini models
β βββ debug-scraper.ts # Debug Airbnb scraper
βββ public/ # Static assets
β βββ hero-rentalmanager*.png # Hero images
β βββ location*.png # Location images
β βββ home-hero-images/ # Home page hero images
β βββ property-images/ # Property images
β βββ room-images/ # Room images
β βββ owner-images/ # Owner profile images
βββ generated/ # Generated Prisma client
β βββ client/ # Prisma client code
βββ types/ # TypeScript type definitions
β βββ next-auth.d.ts # NextAuth type extensions
βββ .env # Environment variables (not in repo)
βββ LICENSE # MIT License
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ next.config.ts # Next.js configuration
βββ README.md # This file
Enable single property mode in Site Settings to focus on one property:
- Rooms are displayed directly on the home page
- Property navigation is simplified
Configure currency in Site Settings:
- Currency code (EUR, USD, GBP, etc.)
- Currency symbol
Configure SEO in Site Settings:
- Meta description
- Meta keywords
- Site author
- Database not found: Run
npm run setupto initialize - Migration errors: Check your
DATABASE_URLand ensure database exists - Connection errors: Verify database credentials and network access
- Can't log in: Verify
NEXTAUTH_SECRETis set correctly - Session errors: Clear browser cookies and try again
- Password reset not working: Check SMTP configuration
- Airbnb import fails:
- Check if the URL is valid
- Try providing a gallery URL manually
- Some listings may require authentication
- Images not importing: Verify the gallery URL or add images manually
- Calendar not updating: Verify iCal URL is correct and accessible
- Dates not blocking: Check iCal URL format and ensure it's publicly accessible
This project is open source and available under the MIT License.
Contributions are welcome! We appreciate all contributions, whether they're:
- π Bug reports
- π‘ Feature suggestions
- π Documentation improvements
- π§ Code contributions
- π¨ UI/UX improvements
- π Translations
- Fork the repository from https://github.com/tschoem/rental-manager
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Commit your changes:
git commit -m 'Add some amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow the existing code style
- Write clear commit messages
- Add tests if applicable
- Update documentation as needed
- Be respectful and constructive in discussions
We're happy to help you get started! Feel free to open an issue if you have questions or need guidance.
For support, please open an issue on the GitHub project.
- π Bug Reports: Use the bug report template
- π‘ Feature Requests: Use the feature request template
- β Questions: Open a discussion or issue with the question label
- π Documentation: Check existing issues or open a new one for documentation improvements
We aim to respond to all issues in a timely manner. For urgent issues, please label them appropriately.
Built with: