You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HOSTEL_README.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,11 +30,33 @@ This project has been converted from a project management system to a comprehens
30
30
-**Role-based Access**: Only authorized users can add/edit hostels
31
31
-**User Reviews**: Any authenticated user can rate and review hostels
32
32
33
+
## Image Storage with Cloudinary
34
+
35
+
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.**
36
+
37
+
### Cloudinary Setup
38
+
1.**Create a Cloudinary account** at https://cloudinary.com/ (free tier is sufficient).
39
+
2.**Get your credentials** from the Cloudinary dashboard:
40
+
- Cloud name
41
+
- API Key
42
+
- API Secret
43
+
3.**Add these to your `.env.local` file:**
44
+
```env
45
+
CLOUDINARY_CLOUD_NAME=your_cloud_name
46
+
CLOUDINARY_API_KEY=your_api_key
47
+
CLOUDINARY_API_SECRET=your_api_secret
48
+
```
49
+
4.**Install the Cloudinary SDK:**
50
+
```bash
51
+
npm install cloudinary
52
+
```
53
+
5.**No further setup is needed.** The backend API will handle all uploads and return the Cloudinary image URLs for use in the app.
54
+
33
55
## Database Schema
34
56
35
57
### Core Tables
36
58
-**hostels**: Main hostel information
37
-
-**hostel_images**: Image management with primary image support
59
+
-**hostel_images**: Image management with primary image support (stores Cloudinary URLs)
38
60
-**ratings**: User ratings with multiple categories
0 commit comments