Skip to content

Gavesh99324/RentalApp

Repository files navigation

Rental Property Management Platform

πŸš€ Quick Start with Docker

Prerequisites

1. Clone and Setup

# Clone the repository
git clone <your-repo-url>
cd RentalApp

# Copy environment file
cp .env.example .env

# Edit .env with your configuration
nano .env  # or use your preferred editor

2. Deploy

On Linux/Mac:

chmod +x deploy.sh
./deploy.sh development

On Windows:

deploy.bat development

3. Access Application


πŸ“‹ What's Included

Services

  • PostgreSQL 16 - Production database with PostGIS
  • MinIO - S3-compatible object storage for property images
  • Express.js API - RESTful backend with Prisma ORM
  • Next.js 15 Frontend - Modern React-based UI
  • pgAdmin - Database management (optional)

Features

βœ… Property listing and search with Mapbox integration
βœ… User authentication with AWS Cognito
βœ… Image upload and storage with MinIO
βœ… Application management for tenants
βœ… Manager dashboard for property owners
βœ… Responsive design with Tailwind CSS
βœ… Docker containerization for easy deployment
βœ… Health checks and monitoring


πŸ› οΈ Development

Manual Setup (Without Docker)

Server Setup

cd server

# Install dependencies
npm install

# Configure environment
cp .env.example .env
# Edit .env with your database URL and credentials

# Run migrations
npx prisma migrate deploy

# Generate Prisma client
npx prisma generate

# Seed database (optional)
npm run seed

# Start development server
npm run dev

Client Setup

cd client

# Install dependencies
npm install

# Configure environment
cp .env.example .env
# Edit .env with API URL and Mapbox token

# Start development server
npm run dev

Prerequisites for Manual Setup

  • Node.js 20+
  • PostgreSQL 14+ with PostGIS extension
  • MinIO or AWS S3 account
  • AWS Cognito user pool
  • Mapbox API token

🐳 Docker Commands

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

# Rebuild images
docker-compose build --no-cache

# Run migrations
docker-compose exec server npx prisma migrate deploy

# Seed database
docker-compose exec server npm run seed

# Access PostgreSQL
docker-compose exec postgres psql -U rentalapp -d rentalapp_db

For detailed Docker documentation, see DOCKER_DEPLOYMENT.md


πŸ“ Configuration

Required Environment Variables

Server (.env)

NODE_ENV=production
PORT=3001
DATABASE_URL=postgresql://user:pass@localhost:5432/db
JWT_SECRET=your-secret-key
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin123
AWS_S3_BUCKET_NAME=rentalapp-properties
AWS_ENDPOINT=http://minio:9000
CORS_ORIGIN=http://localhost:3000

Client (.env)

NEXT_PUBLIC_API_BASE_URL=http://localhost:3001
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=your_token
NEXT_PUBLIC_AWS_COGNITO_USER_POOL_ID=your_pool_id
NEXT_PUBLIC_AWS_COGNITO_USER_POOL_CLIENT_ID=your_client_id

See .env.example files for complete configuration options.


πŸ—οΈ Architecture

RentalApp/
β”œβ”€β”€ client/              # Next.js frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/        # App router pages
β”‚   β”‚   β”œβ”€β”€ components/ # React components
β”‚   β”‚   β”œβ”€β”€ state/      # Redux store
β”‚   β”‚   └── types/      # TypeScript types
β”‚   └── Dockerfile
β”œβ”€β”€ server/             # Express backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   └── middleware/
β”‚   β”œβ”€β”€ prisma/
β”‚   β”‚   └── schema.prisma
β”‚   └── Dockerfile
└── docker-compose.yml

About

Rental Apartment application built with Next.js, Node.js, Express.js and AWS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors