Skip to content

A Cloud-powered rental app with Next.js frontend, AWS Cognito for authentication, Node.js backend, and AWS RDS and S3 for database and storage.

Notifications You must be signed in to change notification settings

lokaesshwar/StayZio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏑 StayZio β€” Cloud-Powered Rental Management Platform

StayZio is a full-stack rental platform that enables property owners to manage listings and bookings seamlessly while allowing guests to explore, book, and review accommodations β€” all in a secure cloud-integrated environment with Next.js frontend, AWS Cognito for authentication, Node.js backend, and AWS RDS and S3 for database and storage.


πŸš€ Tech Stack

Layer Technology
Frontend Next.js (App Router, TypeScript, Tailwind CSS, Zustand)
Backend Node.js + Express.js
Database ORM Prisma (PostgreSQL)
Cloud Services AWS EC2 / S3
Authentication JWT-based Auth (Role-based)
State Management Zustand / Redux Toolkit
Styling Tailwind CSS + ShadCN UI
Deployment Vercel (Frontend), AWS EC2 (Backend)

🧠 Project Structure

StayZio/
β”œβ”€β”€ client/                 # Frontend (Next.js)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/            # App Router (Auth, Dashboard, Listings, etc.)
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ hooks/          # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ state/          # Zustand or Redux store
β”‚   β”‚   β”œβ”€β”€ lib/            # Utility functions & API client
β”‚   β”‚   └── types/          # Global TypeScript types
β”‚   └── package.json
β”‚
β”œβ”€β”€ server/                 # Backend (Express + Prisma)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/    # Route controllers (auth, bookings, listings)
β”‚   β”‚   β”œβ”€β”€ routes/         # REST API routes
β”‚   β”‚   β”œβ”€β”€ middleware/     # Authentication & validation middlewares
β”‚   β”‚   └── index.ts        # Entry point
β”‚   β”œβ”€β”€ prisma/             # Prisma schema & migrations
β”‚   └── package.json
β”‚
└── README.md

βš™οΈ Key Features

🏘️ For Property Owners

  • Add, edit, and delete property listings.
  • Manage rental pricing, availability, and images.
  • Track and manage bookings.

πŸ‘₯ For Guests

  • Browse and filter properties by city, price, and amenities.
  • Book instantly or request availability.
  • Leave ratings and reviews.

πŸ”’ Authentication & Roles

  • JWT-based authentication with roles: admin, host, guest.
  • Protected routes and session persistence.

☁️ Cloud Integrations

  • Image uploads to AWS S3.
  • Deployment on AWS EC2 for scalability.

πŸ—„οΈ Backend Services

  • Prisma ORM for structured database interaction.
  • REST APIs with Express for listings, users, and bookings.

🎨 Modern Frontend

  • Responsive UI with TailwindCSS + ShadCN.
  • Modular and type-safe architecture.
  • Built on Next.js App Router.

🧭 Complete Application Workflow

flowchart TD
A[User Visit StayZio] --> B{Authenticated?}
B -->|No| C[Login / Register Page]
B -->|Yes| D[Role Check]

D -->|Guest| E[Browse Listings]
E --> F[Filter & View Property Details]
F --> G[Book Property]
G --> H[Payment & Booking Confirmation]
H --> I[Email Notification Sent]
I --> J[Booking Data Stored in Database]

D -->|Host| K[Access Dashboard]
K --> L[Add / Edit Property Listings]
L --> M[Upload Images to AWS S3]
M --> N[Manage Bookings & Earnings]
N --> O[Database Update via Prisma]

D -->|Admin| P[Admin Dashboard]
P --> Q[Manage Users, Listings & Reports]
Q --> R[System Analytics & Logs]
R --> S[Cloud Backup & Security Checks]
Loading

βš™οΈ API Architecture (Backend)

graph TD
A[Client Request] --> B[Express Router]
B --> C{Controller}
C -->|Validation| D[Middleware]
D --> E[Prisma ORM]
E --> F[(PostgreSQL Database)]
C --> G[Response JSON β†’ Client]
Loading

🧩 State Management Flow (Frontend)

graph TD
A[User Interaction] --> B[Action Dispatch]
B --> C[Zustand/Redux Store]
C --> D[API Call via lib/api.ts]
D --> E[Backend Response]
E --> F[State Updated β†’ UI Re-renders]
Loading

🧰 Installation & Setup

πŸ–₯️ Backend Setup

cd server
npm install

# Create .env file
cp env.example .env

# Run Prisma migrations
npx prisma migrate dev

# Start backend
npm run dev

πŸ’» Frontend Setup

cd client
npm install

# Create .env file
cp env.example .env.local

# Run development server
npm run dev

Visit πŸ‘‰ http://localhost:3000


🌩️ Deployment

Frontend

Deployed on Vercel

npm run build
vercel deploy

Backend

Hosted on AWS EC2 using PM2

pm2 start ecosystem.config.js

Sample Images image

image image image image image image

About

A Cloud-powered rental app with Next.js frontend, AWS Cognito for authentication, Node.js backend, and AWS RDS and S3 for database and storage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published