CrestKeys is a comprehensive real estate platform that connects property buyers, renters, and vacation seekers with available listings. The platform offers a seamless experience for users to browse, create, and manage property listings with an intuitive interface.
- Property Owners: List your properties for sale, rent, or as vacation stays
- Home Buyers: Find your dream home with detailed listings and photos
- Renters: Discover rental properties that match your preferences
- Vacationers: Book the perfect vacation spot for your next getaway
- Property Search: Browse comprehensive property listings with detailed information
- Advanced Filtering: Find properties by category (Buy, Rent, Vacation), location, price range, and amenities
- Favorites: Save properties to revisit later
- Enquiries: Contact property owners directly through the platform
- Interactive Maps: Visualize property locations and explore neighborhoods
- User Profiles: Manage your personal information and preferences
- Property Listings: Create and manage your own property listings
- Image Management: Upload multiple high-quality photos via Cloudinary integration
- Dashboard: Track your property listings, saved favorites, and enquiries
- Notifications: Receive updates on your listings and enquiries
- React: Component-based UI library for building the user interface
- TypeScript: For type-safe code development
- Vite: Next-generation frontend tooling
- Context API: For state management across the application
- Axios: For API requests to the backend
- Node.js: JavaScript runtime environment
- Express.js: Web application framework for Node.js
- MongoDB: NoSQL database for storing application data
- Mongoose: MongoDB object modeling for Node.js
- JWT: JSON Web Tokens for secure authentication
- Cloudinary: Cloud-based image and video management service
- Vercel: Deployment and hosting platform
- Folder structure:
crestkeys/ β βββ api/ # Backend API source code β βββ controllers/ # Controllers to handle business logic β β βββ auth.controller.ts β β βββ post.controller.ts β β βββ user.controller.ts β β βββ verify.controller.ts β β β βββ middleware/ # Middleware for request validation and auth β β βββ verifyToken.ts β β β βββ models/ # Mongoose models for database schemas β β βββ post.ts β β βββ postDetail.ts β β βββ savedPost.ts β β βββ user.ts β β β βββ routes/ # API routes grouped by feature β β βββ auth.route.ts β β βββ post.route.ts β β βββ test.route.ts β β βββ user.route.ts β β β βββ db.ts # MongoDB connection setup β βββ index.ts # Entry point for backend server β βββ types/express/ # Custom typings for Express (if any) β βββ estate/ # Frontend React app (inside src) β βββ assets/ # Images and static assets β βββ components/ # React components organized by feature β β βββ card/ β β βββ filter/ β β βββ list/ β β βββ map/ β β βββ navbar/ β β βββ pin/ β β βββ searchbar/ β β βββ slider/ β β βββ uploadWidget/ β β β βββ context/ # React Contexts for state management (e.g. Auth) β β βββ AuthContext.ts β β βββ AuthProvider.tsx β β β βββ lib/ # Utility libraries (API requests, loaders, notifications) β β βββ ApiRequest.ts β β βββ Loaders.ts β β βββ NotificationStore.ts β β β βββ routes/ # Page-level components (views) β β βββ HomePage/ β β βββ RequireAuth.tsx # Component to protect routes β β βββ about/ β β βββ layout/ β β βββ listPage/ β β βββ login/ β β βββ newPostPage/ β β βββ profilePage/ β β βββ profileUpdatePage/ β β βββ register/ β β βββ singlePage/ β β β βββ types.ts # TypeScript types used in frontend β βββ App.tsx # Main React app component β βββ main.tsx # React app entry point β βββ index.css # Global styles β βββ vite.config.ts # Vite config for frontend bundling β βββ estate/ # (If used) possibly static content or deployment related βββ public/ # Public static files (images, favicon, etc.) β βββ .gitignore # Git ignore rules βββ README.md # This README file βββ package.json # Project dependencies & scripts βββ tsconfig.json # TypeScript config βββ vite.config.ts # Vite configuration βββ vercel.json # Vercel deployment config βββ eslint.config.js # ESLint rules for code linting
-
Registration:
- User submits registration form with email, username, password
- Backend validates the data and creates a new user account
- JWT token is generated and returned to the client
-
Login:
- User submits login credentials
- Backend validates credentials and issues a JWT token
- Token is stored in the client using Context API
-
Protected Routes:
- JWT token is sent with each request to protected endpoints
- Backend middleware verifies the token before processing requests
- Unauthorized requests are rejected with appropriate error messages
CrestKeys uses Cloudinary for image management:
- User selects images for upload
- Images are sent directly to Cloudinary via the frontend
- Cloudinary returns image URLs after processing
- URLs are saved in the database as part of the property listing
POST /api/auth/register- Register a new userPOST /api/auth/login- Log in an existing user
GET /api/users/profile- Get user profilePUT /api/users/profile- Update user profileGET /api/users/saved- Get user's saved properties
GET /api/posts- Get all properties (with filters)GET /api/posts/:id- Get property detailsPOST /api/posts- Create new property listingPUT /api/posts/:id- Update property listingDELETE /api/posts/:id- Delete property listingPOST /api/posts/:id/inquire- Send inquiry about a property







