{"id":25171582,"url":"https://github.com/basemax/graphqlrealestatets","last_synced_at":"2026-05-05T00:37:42.903Z","repository":{"id":191639463,"uuid":"680293100","full_name":"BaseMax/GraphQLRealEstateTS","owner":"BaseMax","description":"Explore real estate listings using GraphQL in TypeScript. This project features property searches, detailed property information, and direct communication with sellers.","archived":false,"fork":false,"pushed_at":"2024-04-11T10:38:03.000Z","size":2743,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T17:08:06.330Z","etag":null,"topics":["expressjs","expressts","graphql","javascript","javascript-express","js","ts","ts-express","typescript","typescript-express"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-18T20:30:10.000Z","updated_at":"2024-04-11T17:19:58.000Z","dependencies_parsed_at":"2023-08-30T22:35:56.859Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/GraphQLRealEstateTS","commit_stats":null,"previous_names":["basemax/graphqlrealestatets"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FGraphQLRealEstateTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FGraphQLRealEstateTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FGraphQLRealEstateTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FGraphQLRealEstateTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/GraphQLRealEstateTS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247079311,"owners_count":20880030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","expressts","graphql","javascript","javascript-express","js","ts","ts-express","typescript","typescript-express"],"created_at":"2025-02-09T09:21:13.786Z","updated_at":"2026-05-05T00:37:37.864Z","avatar_url":"https://github.com/BaseMax.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Real Estate: Property Listing Website with GraphQL\n\nThis project is a property listing website that utilizes GraphQL in TypeScript for querying property data and performing mutations for user interactions. Users can search for properties, view property details, and contact sellers.\n\n## Features\n\n- Search for properties based on criteria such as location, price range, and property type.\n- View detailed information about a specific property.\n- Contact property sellers to inquire about properties.\n\n## Demo\n\n![Demo](./screenshots/1.png)\n\n![Demo](./screenshots/2.png)\n\n![Demo](./screenshots/3.png)\n\n![Demo](./screenshots/4.png)\n\n![Demo](./screenshots/5.png)\n\n![Demo](./screenshots/6.png)\n\n![Demo](./screenshots/7.png)\n\n![Demo](./screenshots/8.png)\n\n![Demo](./screenshots/9.png)\n\n![Demo](./screenshots/10.png)\n\n![Demo](./screenshots/11.png)\n\n![Demo](./screenshots/12.png)\n\n![Demo](./screenshots/13.png)\n\n![Demo](./screenshots/14.png)\n\n![Demo](./screenshots/15.png)\n\n![Demo](./screenshots/16.png)\n\n![Demo](./screenshots/17.png)\n\n\n\n\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js (v14 or later)\n- npm or Yarn\n\n### Installation\n\nClone this repository:\n\n```bash\ngit clone https://github.com/basemax/GraphQLRealEstateTS.git\n```\n\nNavigate to the project directory:\n\n```bash\ncd GraphQLRealEstateTS\n```\n\nInstall dependencies:\n\n```bash\nnpm install\n# or\nyarn install\n```\n\n## Usage\n\n- Running the Server\n- Create a `.env` file in the root directory and provide necessary environment variables (such as database connection details).\n\nStart the server:\n\n```bash\nnpm run start:dev\n# or\nyarn start\n```\n\n## GraphQL Playground\n\nYou can access the GraphQL Playground by visiting `http://localhost:3000/graphql` in your browser. This interactive interface allows you to execute queries and mutations.\n\n## GraphQL Queries and Mutations\n\n| Operation       | Description                                                          | Example Usage |\n|-----------------|----------------------------------------------------------------------|---------------|\n| **Queries**     |                                                                      |               |\n| `searchProperties` | Retrieve a list of properties based on search criteria.           | `searchProperties(location: \"City\", minPrice: 100000, maxPrice: 500000)` |\n| `getPropertyDetails` | Retrieve detailed information about a specific property.           | `getPropertyDetails(propertyId: \"property_id_here\")` |\n| `getUserFavorites` | Get a user's list of favorite properties.                          | `getUserFavorites(userId: \"user_id_here\")` |\n| `getFeaturedProperties` | Retrieve a list of featured properties for display.             | `getFeaturedProperties` |\n| `getNearestProperties` | Get properties near a specific location.                         | `getNearestProperties(latitude: 40.7128, longitude: -74.0060, radius: 10)` |\n| `getSimilarProperties` | Get properties similar to a given property.                      | `getSimilarProperties(propertyId: \"property_id_here\")` |\n| `getRecentProperties` | Retrieve a list of recently added properties.                   | `getRecentProperties(limit: 10)` |\n| `getPropertyReviews` | Get reviews for a specific property.                             | `getPropertyReviews(propertyId: \"property_id_here\")` |\n| `getTrendingLocations` | Retrieve trending property locations.                           | `getTrendingLocations(limit: 5)` |\n| `getPropertyImages` | Get images associated with a property.                          | `getPropertyImages(propertyId: \"property_id_here\")` |\n| `getAgentProfile` | Get profile information for a property agent.                   | `getAgentProfile(agentId: \"agent_id_here\")` |\n| `getAvailableCities` | Retrieve a list of cities with available properties.           | `getAvailableCities` |\n| `getPropertyTypes` | Get a list of property types available.                        | `getPropertyTypes` |\n| `getUserActivity` | Get recent activity for a specific user.                       | `getUserActivity(userId: \"user_id_here\", limit: 10)` |\n| `getPropertyBookings` | Get bookings for a specific property.                         | `getPropertyBookings(propertyId: \"property_id_here\")` |\n| `getUserBookings` | Get bookings made by a specific user.                         | `getUserBookings(userId: \"user_id_here\")` |\n| `getPropertyPayments` | Get payment history for a specific property.                 | `getPropertyPayments(propertyId: \"property_id_here\")` |\n| `getUserNotifications` | Get notifications for a specific user.                      | `getUserNotifications(userId: \"user_id_here\")` |\n| `getUnreadNotifications` | Get unread notifications for a specific user.             | `getUnreadNotifications(userId: \"user_id_here\")` |\n| `getUnreadMessages` | Get unread messages for a specific user.                 | `getUnreadMessages(userId: \"user_id_here\")` |\n| `getUserChats` | Get chats and messages for a specific user.              | `getUserChats(userId: \"user_id_here\")` |\n| **Mutations**   |                                                                      |               |\n| `contactSeller` | Send a message to the property seller.                             | `contactSeller(propertyId: \"property_id_here\", message: \"Interested in the property.\")` |\n| `addToFavorites` | Add a property to a user's list of favorites.                     | `addToFavorites(userId: \"user_id_here\", propertyId: \"property_id_here\")` |\n| `removeFromFavorites` | Remove a property from a user's list of favorites.            | `removeFromFavorites(userId: \"user_id_here\", propertyId: \"property_id_here\")` |\n| `createProperty` | Create a new property listing.                                    | `createProperty(input: { title: \"New Property\", location: \"City\", price: 200000 })` |\n| `updateProperty` | Update details of a property.                                    | `updateProperty(propertyId: \"property_id_here\", input: { price: 210000 })` |\n| `deleteProperty` | Delete a property listing.                                       | `deleteProperty(propertyId: \"property_id_here\")` |\n| `addPropertyReview` | Add a review for a property.                                   | `addPropertyReview(propertyId: \"property_id_here\", review: \"Great property!\")` |\n| `updateUserProfile` | Update user profile information.                                | `updateUserProfile(userId: \"user_id_here\", input: { name: \"New Name\" })` |\n| `registerUser` | Register a new user account.                                    | `registerUser(input: { username: \"new_user\", email: \"user@example.com\", password: \"password\" })` |\n| `loginUser` | Log in a user and get an authentication token.                  | `loginUser(email: \"user@example.com\", password: \"password\")` |\n| `logoutUser` | Log out a user and invalidate their token.                     | `logoutUser` |\n| `contactSeller` | Send a message to the property seller.                             | `contactSeller(propertyId: \"property_id_here\", message: \"Interested in the property.\")` |\n| `addToFavorites` | Add a property to a user's list of favorites.                     | `addToFavorites(userId: \"user_id_here\", propertyId: \"property_id_here\")` |\n| `removeFromFavorites` | Remove a property from a user's list of favorites.            | `removeFromFavorites(userId: \"user_id_here\", propertyId: \"property_id_here\")` |\n| `createProperty` | Create a new property listing.                                    | `createProperty(input: { title: \"New Property\", location: \"City\", price: 200000 })` |\n| `updateProperty` | Update details of a property.                                    | `updateProperty(propertyId: \"property_id_here\", input: { price: 210000 })` |\n| `deleteProperty` | Delete a property listing.                                       | `deleteProperty(propertyId: \"property_id_here\")` |\n| `addPropertyReview` | Add a review for a property.                                   | `addPropertyReview(propertyId: \"property_id_here\", review: \"Great property!\")` |\n| `updateUserProfile` | Update user profile information.                                | `updateUserProfile(userId: \"user_id_here\", input: { name: \"New Name\" })` |\n| `registerUser` | Register a new user account.                                    | `registerUser(input: { username: \"new_user\", email: \"user@example.com\", password: \"password\" })` |\n| `loginUser` | Log in a user and get an authentication token.                  | `loginUser(email: \"user@example.com\", password: \"password\")` |\n| `logoutUser` | Log out a user and invalidate their token.                     | `logoutUser` |\n| `createReview` | Create a review for a property.                                | `createReview(input: { propertyId: \"property_id_here\", rating: 4, comment: \"Great property!\" })` |\n| `updateReview` | Update a review's content.                                    | `updateReview(reviewId: \"review_id_here\", input: { comment: \"Updated comment\" })` |\n| `deleteReview` | Delete a review.                                             | `deleteReview(reviewId: \"review_id_here\")` |\n| `createUserReport` | Create a report on a user's activity.                        | `createUserReport(input: { userId: \"user_id_here\", reason: \"Inappropriate behavior\" })` |\n| `updateUserReport` | Update the status of a user report.                         | `updateUserReport(reportId: \"report_id_here\", status: RESOLVED)` |\n| `createMessage` | Create a message for communication.                         | `createMessage(input: { senderId: \"user_id_here\", recipientId: \"other_user_id\", content: \"Hello!\" })` |\n| `updateMessageStatus` | Update the status of a message.                         | `updateMessageStatus(messageId: \"message_id_here\", status: READ)` |\n| `createBooking` | Create a booking for a property.                         | `createBooking(input: { userId: \"user_id_here\", propertyId: \"property_id_here\", startDate: \"2023-09-01\", endDate: \"2023-09-10\" })` |\n| `updateBooking` | Update a booking's details.                         | `updateBooking(bookingId: \"booking_id_here\", input: { startDate: \"2023-09-02\" })` |\n| `cancelBooking` | Cancel a booking.                         | `cancelBooking(bookingId: \"booking_id_here\")` |\n| `createPayment` | Create a payment for a booking.                         | `createPayment(input: { bookingId: \"booking_id_here\", amount: 500 })` |\n| `refundPayment` | Refund a payment.                         | `refundPayment(paymentId: \"payment_id_here\")` |\n| `createNotification` | Create a notification for a user.                         | `createNotification(input: { userId: \"user_id_here\", message: \"New property available!\" })` |\n| `markNotificationAsRead` | Mark a notification as read.                         | `markNotificationAsRead(notificationId: \"notification_id_here\")` |\n\n## GraphQL Schema\n\n### Queries\n\nSearch Properties: Retrieve a list of properties based on search criteria.\n\n```graphql\nquery SearchProperties($location: String, $minPrice: Float, $maxPrice: Float, $propertyType: String) {\n  searchProperties(location: $location, minPrice: $minPrice, maxPrice: $maxPrice, propertyType: $propertyType) {\n    id\n    title\n    location\n    price\n    propertyType\n  }\n}\n```\n\nGet Property Details: Retrieve detailed information about a specific property.\n\n```graphql\nquery GetPropertyDetails($propertyId: ID!) {\n  getPropertyDetails(propertyId: $propertyId) {\n    id\n    title\n    description\n    location\n    price\n    propertyType\n    seller {\n      id\n      name\n      contactEmail\n    }\n  }\n}\n```\n\n### Mutations\n\nContact Seller: Send a message to the property seller.\n\n```graphql\nmutation ContactSeller($propertyId: ID!, $message: String!) {\n  contactSeller(propertyId: $propertyId, message: $message) {\n    success\n    message\n  }\n}\n```\n\n## Database Schema\n\n```sql\n-- Table to store users\nCREATE TABLE users (\n  id SERIAL PRIMARY KEY,\n  username VARCHAR(50) NOT NULL,\n  email VARCHAR(100) NOT NULL,\n  password VARCHAR(100) NOT NULL,\n  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\n-- Table to store properties\nCREATE TABLE properties (\n  id SERIAL PRIMARY KEY,\n  title VARCHAR(255) NOT NULL,\n  description TEXT,\n  location VARCHAR(255) NOT NULL,\n  price DECIMAL(10, 2) NOT NULL,\n  property_type VARCHAR(50) NOT NULL,\n  agent_id INT REFERENCES users(id),\n  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\n-- Table to store property images\nCREATE TABLE property_images (\n  id SERIAL PRIMARY KEY,\n  property_id INT REFERENCES properties(id),\n  image_url VARCHAR(255) NOT NULL\n);\n\n-- Table to store property reviews\nCREATE TABLE property_reviews (\n  id SERIAL PRIMARY KEY,\n  property_id INT REFERENCES properties(id),\n  user_id INT REFERENCES users(id),\n  rating INT NOT NULL,\n  comment TEXT,\n  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\n-- Table to store user favorites\nCREATE TABLE user_favorites (\n  id SERIAL PRIMARY KEY,\n  user_id INT REFERENCES users(id),\n  property_id INT REFERENCES properties(id),\n  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\n-- Table to store property bookings\nCREATE TABLE property_bookings (\n  id SERIAL PRIMARY KEY,\n  property_id INT REFERENCES properties(id),\n  user_id INT REFERENCES users(id),\n  start_date DATE NOT NULL,\n  end_date DATE NOT NULL,\n  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\n-- Table to store user notifications\nCREATE TABLE user_notifications (\n  id SERIAL PRIMARY KEY,\n  user_id INT REFERENCES users(id),\n  message TEXT NOT NULL,\n  is_read BOOLEAN DEFAULT false,\n  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\n-- Table to store user messages\nCREATE TABLE user_messages (\n  id SERIAL PRIMARY KEY,\n  sender_id INT REFERENCES users(id),\n  recipient_id INT REFERENCES users(id),\n  content TEXT NOT NULL,\n  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n```\n\n### Contributing\n\nContributions are welcome! If you have suggestions or improvements, please submit a pull request or create an issue.\n\n## License\n\nThis project is licensed under the GPL-3.0 License.\n\nCopyright 2023, Max Base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fgraphqlrealestatets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fgraphqlrealestatets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fgraphqlrealestatets/lists"}