Skip to content

Commit 5ceca51

Browse files
add some details in the setup, readme, hostal readme files
1 parent fcc977f commit 5ceca51

3 files changed

Lines changed: 52 additions & 27 deletions

File tree

HOSTEL_README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This project has been converted from a project management system to a comprehens
88
- **Add Hostels**: Only admins and super admins can add new hostels
99
- **Hostel Information**: Complete hostel details including name, description, location (Google Maps link), contact info, and pricing
1010
- **Image Management**: Support for multiple hostel images with primary image designation
11+
- **Image Slider & Fullscreen View**: Hostel images are displayed in a modern Swiper slider. Click any image to view it fullscreen in a high-quality modal/lightbox.
1112
- **Categories & Filtering**: Dynamic categorization system for amenities, room types, location types, price ranges, and atmosphere
1213

1314
### ⭐ Ratings & Reviews
@@ -34,6 +35,13 @@ This project has been converted from a project management system to a comprehens
3435

3536
Hostel images are now uploaded and stored using [Cloudinary](https://cloudinary.com/). The backend handles image uploads and stores the returned Cloudinary URLs in the database. **Firebase Storage is no longer used for images.**
3637

38+
### Cloudinary Features
39+
- **High-Quality Images**: Images are displayed using Cloudinary's `q_auto:best` transformation for optimal quality.
40+
- **Image Slider**: All hostel images are shown in a Swiper slider, supporting multiple images per hostel.
41+
- **Fullscreen Modal/Lightbox**: Click any image to view it fullscreen in a modal for a better viewing experience.
42+
- **Responsive Design**: The slider and modal are fully responsive and accessible.
43+
- **Custom Transformations**: You can customize Cloudinary transformations (e.g., resizing, cropping, quality) by editing the image URL or backend logic.
44+
3745
### Cloudinary Setup
3846
1. **Create a Cloudinary account** at https://cloudinary.com/ (free tier is sufficient).
3947
2. **Get your credentials** from the Cloudinary dashboard:
@@ -52,6 +60,11 @@ Hostel images are now uploaded and stored using [Cloudinary](https://cloudinary.
5260
```
5361
5. **No further setup is needed.** The backend API will handle all uploads and return the Cloudinary image URLs for use in the app.
5462

63+
## UI Improvements
64+
- **Single Card Per Row**: Hostel cards are now displayed one per row for better readability.
65+
- **Modern Card/Grid Design**: The UI uses a clean, modern design with responsive layouts.
66+
- **Accessible Image Viewing**: All images are accessible and can be viewed fullscreen for better detail.
67+
5568
## Database Schema
5669

5770
### Core Tables

README.md

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,26 @@
66

77
## 🚀 Features
88
- 🏠 **Hostel Management** – Add, edit, and manage hostel details including name, address, and price.
9+
- 🖼️ **Image Management & Slider** – Upload multiple hostel images, displayed in a Swiper slider. Click any image to view it fullscreen in a high-quality modal/lightbox (powered by Cloudinary).
910
- 🗂️ **Category Management** – Create and organize hostel categories for better filtering and search.
1011
- 📝 **Comment Moderation** – Admins can view, edit, report, and block user comments for a safe environment.
1112
- 🚫 **User Blocking & Reporting** – Block users or report inappropriate comments, with in-app notifications.
1213
- 🔒 **Access Control** – Secure admin and superadmin roles with persistent authentication.
13-
- 💡 **Modern UI**Built with Shadcn UI components for a clean, responsive, and accessible experience.
14+
- 💡 **Modern UI**Single-card-per-row layout, responsive Swiper image slider, and accessible fullscreen image viewing.
1415

1516
---
1617

17-
## 📽️ Demo Video
18-
[![Watch the Video](https://img.youtube.com/vi/YOUR_VIDEO_ID/maxresdefault.jpg)](https://codecompasss.github.io/project_archive/public/video/demowebsitevideo.mp4)
18+
## 🖼️ Image Storage & Display (Cloudinary)
19+
- Hostel images are uploaded to and served from [Cloudinary](https://cloudinary.com/), with high-quality transformations (`q_auto:best`).
20+
- All images are shown in a Swiper slider; click any image to view it fullscreen in a modal/lightbox.
21+
- You can customize Cloudinary transformations (quality, size, cropping) by editing the image URL or backend logic.
1922

2023
---
2124

2225
## 🛠️ Tech Stack
2326
- **Frontend:** Next.js, React, TypeScript, Tailwind CSS, Shadcn UI
2427
- **Backend:** Next.js API Routes, Firebase Firestore
25-
- **Email/Notifications:** (Email notifications have been removed; in-app notifications only)
28+
- **Image Storage:** Cloudinary (no Firebase Storage)
2629
- **Authentication:** Firebase Auth
2730

2831
---
@@ -36,24 +39,11 @@ This project was designed and developed solely by **Sooraj Krishna K P**.
3639

3740
Absolutely! You can easily **reuse and customize** this project for your own hostel or organization:
3841

39-
1. **Fork this repository**
40-
This lets you receive any future updates while keeping your own customizations.
41-
42-
2. **Clone your fork locally**
43-
```bash
44-
git clone https://github.com/Sooraj-krishna/Nearby_hostels.git
45-
```
46-
47-
3. **Update Branding**
48-
- Change the **name in the loading screen and navbar** to match your institution.
49-
This can be done in the **`components/` folder**.
50-
- Look for `loadingScrenn.tsx`, `Navbar.tsx`, or similarly named files.
51-
52-
4. **Edit Hostel Data**
53-
- All hostel and category information is managed via the admin panel. No need to edit JSON files directly.
54-
55-
5. **Deploy**
56-
Deploy using Vercel, Netlify, or your preferred hosting provider.
42+
1. **Fork this repository**
43+
2. **Clone your fork locally**
44+
3. **Update Branding**
45+
4. **Edit Hostel Data**
46+
5. **Deploy**
5747

5848
---
5949

SETUP_GUIDE.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
1. **PostgreSQL Database**: You need a PostgreSQL database running
66
2. **Firebase Project**: For authentication (optional but recommended)
7-
3. **Node.js**: Version 18 or higher
7+
3. **Cloudinary Account**: For image uploads and management
8+
4. **Node.js**: Version 18 or higher
89

910
## Step 1: Environment Configuration
1011

@@ -26,6 +27,11 @@ NEXT_PUBLIC_FIREBASE_APP_ID="your-app-id"
2627
FIREBASE_ADMIN_PROJECT_ID="your-project-id"
2728
FIREBASE_ADMIN_PRIVATE_KEY="your-private-key"
2829
FIREBASE_ADMIN_CLIENT_EMAIL="your-client-email"
30+
31+
# Cloudinary Configuration (for image uploads)
32+
CLOUDINARY_CLOUD_NAME=your_cloud_name
33+
CLOUDINARY_API_KEY=your_api_key
34+
CLOUDINARY_API_SECRET=your_api_secret
2935
```
3036

3137
### Database Setup Options:
@@ -85,7 +91,16 @@ npm run dev
8591

8692
The application will be available at `http://localhost:3001`
8793

88-
## Step 6: Firebase Setup (Optional)
94+
## Step 6: Cloudinary Setup for Images
95+
96+
1. Go to [Cloudinary Console](https://cloudinary.com/)
97+
2. Create a free account
98+
3. Get your Cloudinary credentials (cloud name, API key, API secret)
99+
4. Add them to your `.env.local` as shown above
100+
5. Images will be uploaded and served from Cloudinary with high-quality transformations (`q_auto:best`)
101+
6. All hostel images are displayed in a Swiper slider; click any image to view it fullscreen in a modal/lightbox
102+
103+
## Step 7: Firebase Setup (Optional)
89104

90105
1. Go to [Firebase Console](https://console.firebase.google.com/)
91106
2. Create a new project
@@ -105,6 +120,12 @@ The application will be available at `http://localhost:3001`
105120
- Check if database is accessible
106121
- Verify drizzle config is correct
107122

123+
### Cloudinary Issues
124+
- Ensure all Cloudinary variables are set in `.env.local`
125+
- Check your Cloudinary account for usage limits
126+
- If images look blurry, check the transformation in the image URL (should use `q_auto:best`)
127+
- Make sure the Cloudinary SDK is installed (`npm install cloudinary`)
128+
108129
### Firebase Issues
109130
- Ensure all Firebase variables are set
110131
- Check Firebase project configuration
@@ -117,9 +138,10 @@ If you want to test the system quickly:
117138
1. Set up a free Neon database
118139
2. Update DATABASE_URL in .env.local
119140
3. Run migrations and seed scripts
120-
4. Start the development server
141+
4. Set up Cloudinary credentials
142+
5. Start the development server
121143

122-
You'll have a fully functional hostel management system with sample data!
144+
You'll have a fully functional hostel management system with sample data and image upload/viewing!
123145

124146
## Admin Access
125147

@@ -135,4 +157,4 @@ If you encounter any issues:
135157
1. Check the console for error messages
136158
2. Verify all environment variables are set
137159
3. Ensure database is accessible
138-
4. Check Firebase configuration
160+
4. Check Cloudinary and Firebase configuration

0 commit comments

Comments
 (0)