Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
054632f
Create .gitignore
Sahani99 May 24, 2025
44bf64a
Initialize React Frontend
May 24, 2025
f623589
Add initial backend folder
May 24, 2025
7d2dbae
Refactor CSS structure: move App.css and index.css to assets folder a…
May 24, 2025
b931fc0
Implement basic Express server with health check route
May 24, 2025
a72907d
API - Get All Properties
Sahani99 May 25, 2025
afc1f38
Database Connected Successfully
nethmagithub May 25, 2025
03efa02
Components ,Propertymodel
nethmagithub May 26, 2025
dda0cc9
Created PropertiesPage
Sahani99 May 26, 2025
9876316
small changes in UI
Sahani99 May 27, 2025
3e72e8e
dist added
Sahani99 Jun 8, 2025
bbe86f6
config changed
Sahani99 Jun 8, 2025
3cc1621
gitignore updated
Sahani99 Jun 8, 2025
29bdf51
dist changes
Sahani99 Jun 8, 2025
11f1fbc
Fix SPA routing on Vercel
Sahani99 Jun 8, 2025
4d8ff94
Fix Vercel 404 issue
Sahani99 Jun 8, 2025
b1df5c1
update vite
Sahani99 Jun 8, 2025
2cf5940
major changes.
Sahani99 Jun 12, 2025
cb39d94
major changes
Sahani99 Jun 15, 2025
5263453
Add user admin controller and routes for managing users
Sahani99 Jun 17, 2025
6ebab90
feat: Implement property comparison feature with context management
Sahani99 Jun 18, 2025
44f20ff
minor changes
Sahani99 Jun 26, 2025
bb4c0ca
compare feature updated
Sahani99 Jun 26, 2025
b6186fc
user profile added
Sahani99 Jun 26, 2025
6ef804d
admin property management updated
Sahani99 Jun 28, 2025
4544ae9
Add Google Maps API key and integrate map display in PropertyDetails…
Jun 29, 2025
3c1b50d
Refactor ComparePropertiesPage for improved UI and error handling
Jun 29, 2025
b395db0
admin dashboard updated
Sahani99 Jun 29, 2025
4d8c655
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
Sahani99 Jun 29, 2025
52f8cd0
Update price format in ComparePropertiesPage to use LKR currency
Sahani99 Jun 29, 2025
ef711c9
Edite PropertyCard component
Jun 29, 2025
a775951
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
Jun 29, 2025
cfac557
minor changes
Sahani99 Jun 29, 2025
65c287e
Auction function added
Sahani99 Jun 30, 2025
f7c0210
home page updated
Sahani99 Jun 30, 2025
5dffa9c
theme folder added
Sahani99 Jun 30, 2025
50dd059
fix: update token extraction log message in auth middleware for clarity
nethmagithub Jun 30, 2025
e2068ac
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
nethmagithub Jun 30, 2025
1dea64d
auth.controller updated
Sahani99 Jun 30, 2025
bc2e1c2
change Home Page
Jun 30, 2025
849a2f4
refactor: enhance UserNavbar and UserDashboard for improved user expe…
nethmagithub Jun 30, 2025
8eaa5c6
update home page
Jul 1, 2025
933bdcc
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
nethmagithub Jul 1, 2025
1da7a09
admin layout updated
Sahani99 Jul 1, 2025
9457409
property image uploading updated
Sahani99 Jul 1, 2025
f3af6f5
add Contact page
Jul 2, 2025
8fc62e6
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
Jul 2, 2025
c4d8927
update UserNavbar links
Jul 15, 2025
b6836de
Add FutureProjectsListPage and update Porety3DViewPage,UserNavbar,Ap…
Jul 16, 2025
c4a7607
update app and Project3dViewPage
Jul 16, 2025
15294a2
Add Apartment Units and enhance ProjectDetailsForm UI
Jul 21, 2025
0e2ddcb
requestvisit updated
Randu001 Jul 25, 2025
bd4b06a
Update RequestedVisits.jsx
Randu001 Jul 25, 2025
849e8c7
updated user dashboard
Randu001 Jul 25, 2025
4c2be61
updated EditPropertyPage
Randu001 Jul 25, 2025
4e3ea88
Admin Auction Manage Fixed
Sahani99 Jul 26, 2025
a7cfcdf
changes in admin
nethmagithub Jul 26, 2025
9ee99ca
navbar change
nethmagithub Jul 26, 2025
63c6576
update UserGLBViewer and Project3DViewPage
Jul 27, 2025
4ae3d4c
update UserGLBViewer functionality
Aug 1, 2025
bcb7aad
email verification
nethmagithub Aug 2, 2025
c0eaaab
navbar change
nethmagithub Aug 2, 2025
1a96b82
Controllers, routes restructured. Auction Feature fixed
Sahani99 Aug 2, 2025
de506d5
bugs fixed
Sahani99 Aug 2, 2025
3374d25
Manage users in admin dashboard bug fixed
Sahani99 Aug 2, 2025
59c92f0
forget password page restored
Sahani99 Aug 2, 2025
81da5d6
compare bugs fix
nethmagithub Aug 2, 2025
83b8810
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
nethmagithub Aug 2, 2025
fe9ff0a
error fixed
nethmagithub Aug 2, 2025
bd3c609
property card updated
Sahani99 Aug 2, 2025
3647a53
Auction page Updated
Sahani99 Aug 2, 2025
5a401b2
user profile bug fixed
nethmagithub Aug 3, 2025
e50d664
propertypage direction is fixed.(when clicking the explore properties…
nethmagithub Aug 3, 2025
e8188a9
update App.jsx , UserNavbar.jsx, ApartmenUnitForm.jsx, FutureProjectA…
Aug 3, 2025
e58c676
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
Aug 3, 2025
65635a3
update user Navbar , Aprtment units and Future Apartment page
Aug 16, 2025
abf9b72
implement AI chatbot feature in HomePage
Aug 30, 2025
270c80e
add inquiryform , pre-registrationform and create responsiveness for …
Sep 9, 2025
2e2f471
Update ContactPage, ProjectUnitListPage, FutureProjectListPage, Futur…
Sep 9, 2025
c6ff023
minor changes
Sahani99 Sep 9, 2025
4a1f6e1
notiication part added user profile, fix error in forgetpassword
nethmagithub Sep 11, 2025
11cc3aa
send notification updated and send the visit request confirmation email
nethmagithub Sep 11, 2025
c0c8c70
auction function
Sahani99 Sep 12, 2025
812402f
property edit, delete updated
Sahani99 Sep 12, 2025
ae45a09
update UserGLBViewer and Project3DViewPage
Sep 12, 2025
351a51d
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
Sep 12, 2025
9124adf
forgot Password error fixed
nethmagithub Sep 13, 2025
7225262
Create FutureProjectDetailsPage and AdminGLBViewer and Update future…
Sep 13, 2025
f7819f6
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
Sep 13, 2025
440d696
update App.jsx
Sep 13, 2025
dcb1014
Update AdminAuctionsPage.jsx
Randu001 Sep 27, 2025
128c552
reset password issue fixed
nethmagithub Sep 27, 2025
394e4b5
Update auction.admin.controller.js
Randu001 Sep 27, 2025
8c661d7
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
nethmagithub Sep 27, 2025
3afaeda
Update AdminVisitRequestsPage.jsx
Randu001 Sep 27, 2025
5c95999
edit aution page
Randu001 Sep 27, 2025
259ed4c
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
nethmagithub Sep 27, 2025
b11b5b4
fix errors
nethmagithub Sep 27, 2025
1a71014
models, controllers, routes changed
Sahani99 Sep 28, 2025
e3e1b2d
properties page updated
Sahani99 Sep 28, 2025
7a912c6
error fixed
nethmagithub Sep 28, 2025
1635546
user status
Randu001 Sep 28, 2025
e427f72
fix issue
nethmagithub Sep 28, 2025
44b653b
property add updated
Sahani99 Sep 28, 2025
2645fdb
status change
Randu001 Sep 28, 2025
8b2e210
auction updated
Sahani99 Sep 28, 2025
eed97dd
user inactivate fixed
nethmagithub Sep 28, 2025
8354660
auction updated
Sahani99 Sep 28, 2025
dfab9f6
filtering features fixed
nethmagithub Sep 28, 2025
ede8bec
property card updated
Sahani99 Sep 28, 2025
f8ba854
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
Sahani99 Sep 28, 2025
904c162
property Details issue fixed
nethmagithub Sep 28, 2025
8bfe296
fix the error
nethmagithub Sep 29, 2025
1d3d43b
reversed
Sahani99 Sep 29, 2025
bc38d7b
minor chnges
nethmagithub Sep 29, 2025
b668a07
inquiry form
Randu001 Sep 29, 2025
807ff78
save changes fixed
nethmagithub Sep 29, 2025
d02f86b
server error fixed
nethmagithub Sep 29, 2025
7f6c241
updated server
Randu001 Sep 29, 2025
4291060
image upload preset
Sahani99 Sep 29, 2025
2b9724e
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
Sahani99 Sep 29, 2025
5e91a8b
fix issues
nethmagithub Sep 29, 2025
84ea28a
minor
Randu001 Sep 29, 2025
3bb1ee7
minor changes
Sahani99 Sep 29, 2025
72715d8
hide completed visits
Sahani99 Sep 29, 2025
c027a58
fix date issue
nethmagithub Sep 29, 2025
bb42b11
fix
nethmagithub Sep 29, 2025
6e85b15
Update AdminGLBViwer , UserGLBViwer, FutureProjectDetailsPage, Projec…
Sep 29, 2025
edab3ef
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
Sep 29, 2025
81b79b2
Update App.jsx
Sep 29, 2025
c1c2860
change favicon
Sep 29, 2025
e81a164
image uploading
Sahani99 Sep 29, 2025
403e032
update userglbviwer and adminglbviwer
Sep 29, 2025
22a2021
Merge branch 'develop' of https://github.com/Sahani99/Property_Pro in…
Sep 29, 2025
a3b3e21
major changes
Sahani99 Sep 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Node.js dependencies
node_modules/



# Log files
*.log

# Operating system files
.DS_Store

# IDE and editor files
.vscode/
.idea/

# npm package lock files (if you don't want them in version control)
package-lock.json
yarn.lock
7 changes: 7 additions & 0 deletions bash.exe.stackdump
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Stack trace:
Frame Function Args
0082B058 64008A48 (64258619, 642586CD, 00000000, 00000000)
0082B078 6409BB8F (642586CD, 00000001, 00000000, 00000000)
0082B0A8 6409BCD0 (0082B0E4, 0082B0B0, 00000000, 00000000)
0082B248 6409D40D (778F7291, 779C48B8, 0082B298, 00000002)
End of stack trace
51 changes: 51 additions & 0 deletions dist/assets/index-B1hRScQX.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/assets/index-D8b4DHJx.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added dist/favicon.ico
Binary file not shown.
14 changes: 14 additions & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/Property_Pro/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<script type="module" crossorigin src="/Property_Pro/assets/index-B1hRScQX.js"></script>
<link rel="stylesheet" crossorigin href="/Property_Pro/assets/index-D8b4DHJx.css">
</head>
<body>
<div id="root"></div>
</body>
</html>
25 changes: 25 additions & 0 deletions dist/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions dist/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
1 change: 1 addition & 0 deletions dist/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions propertypro-backend/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.env

PORT=8080
# MONGODB_URI=mongodb+srv://sahani:abcd1234@cluster0.3zjw4t4.mongodb.net/Property?retryWrites=true&w=majority&appName=Cluster0
CLOUDINARY_CLOUD_NAME=dd7g3mur9
CLOUDINARY_API_KEY=268472852312669
CLOUDINARY_API_SECRET=Op3vZcp70SHt-1cSg_yFe-gXyWE
CLOUDINARY_SIGNED_UPLOAD_PRESET=glb_signed_uploads
CLOUDINARY_IMAGE_UPLOAD_PRESET=images


# # ... other variables (MONGODB_URI, PORT) ...

# AZURE_STORAGE_ACCOUNT_NAME=propertyprostorage
# AZURE_STORAGE_ACCOUNT_KEY=Sx9F5vsKAQj3x2/tGyIko681PC/ejMiBjEStv4p/46N6Ncui5miJ0p7EcSXvvmWZwos7wdNbetw/+AStG57KiQ==
# AZURE_STORAGE_CONTAINER_NAME=optimized-glb-models # Or whatever you named your container

# ADMIN_EMAIL=nethmaherath28@gmail.com
# ADMIN_PASSWORD=admin1234

MONGODB_URI=mongodb+srv://admin:abcd1234@cluster0.eolqejb.mongodb.net/Propertypro?retryWrites=true&w=majority&appName=Cluster0

JWT_SECRET=Asitha
JWT_EXPIRES_IN=1d
# Add any other environment variables your backend needs, like FRONTEND_URL
FRONTEND_URL=http://localhost:5173

EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=propertypro.sup@gmail.com
EMAIL_PASS=linm sxsi jfca asqv
12 changes: 12 additions & 0 deletions propertypro-backend/config/cloudinary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// config/cloudinary.js
const cloudinary = require('cloudinary').v2;
require('dotenv').config(); // In case this file is run standalone or early

cloudinary.config({
cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
api_key: process.env.CLOUDINARY_API_KEY,
api_secret: process.env.CLOUDINARY_API_SECRET,
secure: true, // Use https
});

module.exports = cloudinary;
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
// backend/controllers/admin/apartmentUnit.admin.controller.js
const ApartmentUnit = require('../../models/ApartmentUnit.model');
const FutureApartmentProject = require('../../models/FutureApartmentProject.model');
const cloudinary = require('../../config/cloudinary');
const streamifier = require('streamifier');
const mongoose = require('mongoose');

// @desc Create a new unit for a specific project
// @route POST /api/admin/future-projects/:projectId/units
// @access Private (Admin)
exports.createUnit = async (req, res) => {
try {
const { projectId } = req.params;
if (!mongoose.Types.ObjectId.isValid(projectId)) {
return res.status(400).json({ message: 'Invalid project ID format.' });
}

const project = await FutureApartmentProject.findById(projectId);
if (!project) {
return res.status(404).json({ message: 'Parent project not found.' });
}

const newUnit = new ApartmentUnit({ ...req.body, projectId });
await newUnit.save();

res.status(201).json(newUnit);
} catch (error) {
console.error("Error in createUnit (Admin):", error);
res.status(400).json({ message: 'Error creating unit', error: error.message });
}
};

// @desc Update a specific unit
// @route PUT /api/admin/future-projects/:projectId/units/:unitId
// @access Private (Admin)
exports.updateUnit = async (req, res) => {
try {
const { unitId } = req.params;
if (!mongoose.Types.ObjectId.isValid(unitId)) {
return res.status(400).json({ message: 'Invalid unit ID format.' });
}

const updatedUnit = await ApartmentUnit.findByIdAndUpdate(unitId, req.body, { new: true, runValidators: true });
if (!updatedUnit) {
return res.status(404).json({ message: 'Apartment unit not found.' });
}
res.json(updatedUnit);
} catch (error) {
console.error("Error updating unit (Admin):", error);
res.status(400).json({ message: 'Error updating unit', error: error.message });
}
};

// @desc Delete a specific unit
// @route DELETE /api/admin/future-projects/:projectId/units/:unitId
// @access Private (Admin)
exports.deleteUnit = async (req, res) => {
try {
const { unitId } = req.params;
if (!mongoose.Types.ObjectId.isValid(unitId)) {
return res.status(400).json({ message: 'Invalid unit ID format.' });
}

const unit = await ApartmentUnit.findById(unitId);
if (!unit) {
return res.status(404).json({ message: 'Apartment unit not found.' });
}

if (unit.floorPlanImagePublicId) {
await cloudinary.uploader.destroy(unit.floorPlanImagePublicId);
}

await ApartmentUnit.findByIdAndDelete(unitId);
res.json({ message: 'Apartment unit deleted successfully.' });
} catch (error) {
console.error("Error deleting unit (Admin):", error);
res.status(500).json({ message: 'Error deleting unit', error: error.message });
}
};

// @desc Upload Floor Plan Image for a Unit
// @route POST /api/admin/future-projects/:projectId/units/:unitId/floorplan
// @access Private (Admin)
exports.uploadFloorPlanImage = async (req, res) => {
const { unitId, projectId } = req.params;
if (!req.file) {
return res.status(400).json({ message: 'No floor plan image file uploaded.' });
}

try {
const unit = await ApartmentUnit.findById(unitId);
if (!unit || unit.projectId.toString() !== projectId) {
return res.status(404).json({ message: 'Unit not found or not part of this project.' });
}

if (unit.floorPlanImagePublicId) {
await cloudinary.uploader.destroy(unit.floorPlanImagePublicId);
}

let cld_upload_stream = cloudinary.uploader.upload_stream(
{ folder: `future_projects/${projectId}/units/${unitId}/floorplans` },
async (error, result) => {
if (error) {
console.error('Cloudinary Upload Error (Floor Plan):', error);
return res.status(500).json({ message: 'Cloudinary floor plan upload failed', error });
}
unit.floorPlanImageUrl = result.url;
unit.floorPlanImageSecureUrl = result.secure_url;
unit.floorPlanImagePublicId = result.public_id;
await unit.save();
res.json({ message: 'Floor plan image uploaded successfully', unit });
}
);
streamifier.createReadStream(req.file.buffer).pipe(cld_upload_stream);
} catch (error) {
console.error("Error uploading floor plan image:", error);
res.status(500).json({ message: 'Error uploading floor plan', error: error.message });
}
};
Loading