{"id":24738746,"url":"https://github.com/7ossam7atem1/deyarak","last_synced_at":"2026-04-12T06:32:12.879Z","repository":{"id":248328532,"uuid":"773209414","full_name":"7ossam7atem1/Deyarak","owner":"7ossam7atem1","description":"Your Dream Home Awaits!","archived":false,"fork":false,"pushed_at":"2024-11-26T22:41:50.000Z","size":17887,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T22:55:25.725Z","etag":null,"topics":["auth","authentication","cloudinary-api","deeplinking","javascript","mongodb-atlas","nodejs","restful-api","sendgrid","stripe"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/7ossam7atem1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-17T03:00:34.000Z","updated_at":"2024-11-26T22:41:53.000Z","dependencies_parsed_at":"2024-07-20T11:30:28.917Z","dependency_job_id":null,"html_url":"https://github.com/7ossam7atem1/Deyarak","commit_stats":null,"previous_names":["7ossam7atem1/deyarak"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7ossam7atem1%2FDeyarak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7ossam7atem1%2FDeyarak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7ossam7atem1%2FDeyarak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7ossam7atem1%2FDeyarak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/7ossam7atem1","download_url":"https://codeload.github.com/7ossam7atem1/Deyarak/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245006719,"owners_count":20546136,"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":["auth","authentication","cloudinary-api","deeplinking","javascript","mongodb-atlas","nodejs","restful-api","sendgrid","stripe"],"created_at":"2025-01-27T22:55:33.180Z","updated_at":"2026-04-12T06:32:12.857Z","avatar_url":"https://github.com/7ossam7atem1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏠 Deyarak\n\n\u003cdiv align=\"center\"\u003e\n\n![License](https://img.shields.io/badge/License-MIT-green.svg)\n![Node.js](https://img.shields.io/badge/Node.js-18+-339933?logo=node.js\u0026logoColor=white)\n![Express](https://img.shields.io/badge/Express-4.18-000000?logo=express\u0026logoColor=white)\n![MongoDB](https://img.shields.io/badge/MongoDB-8.2-47A248?logo=mongodb\u0026logoColor=white)\n\n**A modern real estate rental platform connecting property owners with renters**\n\n[Features](#-features) • [Tech Stack](#-tech-stack) • [Installation](#-installation) • [API Documentation](#-api-documentation) • [Deployment](#-deployment)\n\n\u003c/div\u003e\n\n---\n\n## 📋 Table of Contents\n\n- [About](#-about)\n- [Features](#-features)\n- [Tech Stack](#-tech-stack)\n- [Architecture](#-architecture)\n- [Prerequisites](#-prerequisites)\n- [Installation](#-installation)\n- [Environment Variables](#-environment-variables)\n- [API Documentation](#-api-documentation)\n- [Testing](#-testing)\n- [Deployment](#-deployment)\n- [Project Structure](#-project-structure)\n- [Contributing](#-contributing)\n- [License](#-license)\n- [Acknowledgments](#-acknowledgments)\n\n---\n\n## 🎯 About\n\n**Deyarak** is a comprehensive Node.js web server designed for the real estate industry. It facilitates direct property rental transactions between property owners and renters, eliminating intermediaries and streamlining the rental process.\n\nThis project was developed as a graduation project, implementing modern web development practices and industry-standard security measures.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://res.cloudinary.com/dptpklbgm/image/upload/v1720920441/logos/lcqyngrh4rtnamfofenb.png\" alt=\"Deyarak Logo\" width=\"500\"/\u003e\n\u003c/div\u003e\n\n---\n\n## ✨ Features\n\n- 🔐 **Secure Authentication** - JWT-based authentication with password hashing\n- 🏘️ **Property Management** - Complete CRUD operations for property listings\n- 💳 **Payment Integration** - Stripe integration for secure payment processing\n- 📧 **Email Notifications** - Automated email notifications via SendGrid\n- 📸 **Image Upload** - Cloudinary integration for property image storage\n- ⭐ **Review System** - User reviews and ratings for properties\n- 📞 **Contact Management** - Contact form and inquiry system\n- 📚 **API Documentation** - Swagger/OpenAPI documentation\n- 🧪 **Testing** - Comprehensive test suite with Jasmine\n- 🛡️ **Security** - Rate limiting, data sanitization, and security headers\n\n---\n\n## 🛠️ Tech Stack\n\n### Backend\n- **Runtime**: Node.js\n- **Framework**: Express.js\n- **Language**: JavaScript\n- **Architecture**: MVC (Model-View-Controller)\n\n### Database\n- **Database**: MongoDB\n- **ODM**: Mongoose\n\n### Authentication \u0026 Security\n- **Authentication**: JSON Web Tokens (JWT)\n- **Password Hashing**: bcryptjs\n- **Security Middleware**: Helmet, express-rate-limit, express-mongo-sanitize, HPP\n\n### Services \u0026 Integrations\n- **Image Storage**: Cloudinary\n- **Email Service**: SendGrid (Production), Mailtrap (Development)\n- **Payment Processing**: Stripe\n- **API Documentation**: Swagger (swagger-jsdoc, swagger-ui-express)\n\n### Testing\n- **Testing Framework**: Jasmine\n- **HTTP Testing**: Supertest\n\n### Additional Tools\n- **Image Processing**: Sharp\n- **File Upload**: Multer\n- **Email Templates**: Pug\n- **Logging**: Morgan\n- **Validation**: Validator\n\n---\n\n## 🏗️ Architecture\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://res.cloudinary.com/dptpklbgm/image/upload/v1720922994/logos/tfirzwtlkvn9creaqmzd.jpg\" alt=\"Architecture Diagram\" width=\"800\"/\u003e\n\u003c/div\u003e\n\nThe application follows the **MVC (Model-View-Controller)** architectural pattern:\n\n- **Models**: Data schemas and business logic (MongoDB/Mongoose)\n- **Views**: Email templates (Pug templates)\n- **Controllers**: Request handling and business logic\n- **Routes**: API endpoint definitions\n- **Middleware**: Authentication, error handling, security\n\n---\n\n## 📦 Prerequisites\n\nBefore you begin, ensure you have the following installed:\n\n- **Node.js** (v18 or higher)\n- **npm** (v9 or higher) or **yarn**\n- **MongoDB** (local installation or MongoDB Atlas account)\n- **Git**\n\n---\n\n## 🚀 Installation\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/7ossam7atem1/Deyarak.git\ncd Deyarak\n```\n\n### 2. Install Dependencies\n\n```bash\nnpm install\n```\n\n### 3. Environment Configuration\n\nCreate a `.env` file in the root directory (or copy from `.env.example` if available) and configure the environment variables (see [Environment Variables](#-environment-variables) section below).\n\n### 4. Start the Development Server\n\n```bash\nnpm start\n```\n\nThe server will start on the port specified in your `.env` file (default: 2000).\n\n### 5. Access the Application\n\n- **API Base URL**: `http://localhost:2000/api/v1`\n- **API Documentation**: `http://localhost:2000/api-docs`\n\n---\n\n## 🔐 Environment Variables\n\nCreate a `.env` file in the root directory with the following variables:\n\n### Application Configuration\n```env\nNODE_ENV=development\nPORT=2000\n```\n\n### Database Configuration\n```env\nDATABASE=mongodb+srv://\u003cusername\u003e:\u003cpassword\u003e@cluster.mongodb.net/database-name\nDATABASE_PASSWORD=your-database-password\n```\n\n### JWT Configuration\n```env\nJWT_SECRET=your-super-secret-jwt-key\nJWT_EXPIRES_IN=90d\nJWT_COOKIE_EXPIRES_IN=90\n```\n\n### Email Configuration (Development - Mailtrap)\n```env\nEMAIL_USERNAME=your-mailtrap-username\nEMAIL_PASSWORD=your-mailtrap-password\nEMAIL_HOST=smtp.mailtrap.io\nEMAIL_PORT=2525\nEMAIL_FROM=noreply@deyarak.com\n```\n\n### Email Configuration (Production - SendGrid)\n```env\nSENDGRID_USERNAME=your-sendgrid-username\nSENDGRID_PASSWORD=your-sendgrid-api-key\n```\n\n### Payment Configuration (Stripe)\n```env\nSTRIPE_SECRET_KEY=your-stripe-secret-key\n```\n\n### Cloudinary Configuration\n```env\nCLOUD_NAME=your-cloudinary-cloud-name\nCLOUD_API_KEY=your-cloudinary-api-key\nCLOUD_API_SECRET=your-cloudinary-api-secret\n```\n\n\u003e ⚠️ **Important**: Never commit your `.env` file to version control. Add it to your `.gitignore` file.\n\n---\n\n## 📚 API Documentation\n\nInteractive API documentation is available via Swagger UI:\n\n**Live Documentation**: [https://deyarak-app.onrender.com/api-docs/](https://deyarak-app.onrender.com/api-docs/)\n\n### API Endpoints\n\nThe API is organized into the following main routes:\n\n- **Properties**: `/api/v1/properties` - Property management endpoints\n- **Users**: `/api/v1/users` - User authentication and management\n- **Reviews**: `/api/v1/reviews` - Property reviews and ratings\n- **Rentings**: `/api/v1/rentings` - Rental transactions and payments\n- **Contacts**: `/api/v1/contacts` - Contact form submissions\n\nFor detailed endpoint documentation, visit the Swagger UI interface.\n\n---\n\n## 🧪 Testing\n\nRun the test suite using Jasmine:\n\n```bash\nnpm test\n```\n\nOr directly with:\n\n```bash\nnpx jasmine\n```\n\nThe test suite includes:\n- Unit tests for controllers\n- Integration tests for API endpoints\n- Authentication and authorization tests\n\n---\n\n## 🚢 Deployment\n\n### Production Build\n\nTo run the application in production mode:\n\n```bash\nnpm run start:prod\n```\n\n### Deployment Platform\n\nThis application is deployed on **Render**:\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://res.cloudinary.com/dptpklbgm/image/upload/v1720923848/logos/a3nsvefdhej2deyx5dsh.jpg\" alt=\"Render Deployment\" width=\"600\"/\u003e\n\u003c/div\u003e\n\n### Deployment Checklist\n\n- [ ] Set all required environment variables in your hosting platform\n- [ ] Ensure MongoDB connection string is configured\n- [ ] Configure production email service (SendGrid)\n- [ ] Set up Stripe production keys\n- [ ] Configure Cloudinary production settings\n- [ ] Enable HTTPS/SSL\n- [ ] Set up monitoring and logging\n- [ ] Configure CORS for production domain\n\n---\n\n## 📁 Project Structure\n\n```\nDeyarak/\n├── controllers/          # Request handlers and business logic\n│   ├── authController.js\n│   ├── contactController.js\n│   ├── errorController.js\n│   ├── factoryHandler.js\n│   ├── propertyController.js\n│   ├── rentingController.js\n│   ├── reviewController.js\n│   └── userController.js\n├── models/              # MongoDB schemas and models\n│   ├── contactModel.js\n│   ├── propertyModel.js\n│   ├── rentingModel.js\n│   ├── reviewModel.js\n│   └── userModel.js\n├── routes/              # API route definitions\n│   ├── contactRoutes.js\n│   ├── paymentRoutes.js\n│   ├── propertyRoutes.js\n│   ├── reviewRoutes.js\n│   └── userRoutes.js\n├── utils/               # Utility functions and helpers\n│   ├── apiMaestro.js\n│   ├── appError.js\n│   ├── catchAsyncronization.js\n│   ├── cloudinary.js\n│   ├── email.js\n│   ├── swagger.js\n│   └── swagger.json\n├── views/               # Email templates (Pug)\n│   └── email/\n│       ├── _style.pug\n│       ├── baseEmail.pug\n│       ├── passwordReset.pug\n│       └── welcome.pug\n├── public/              # Static files\n│   ├── img/\n│   ├── success.css\n│   └── success.html\n├── spec/                # Test specifications\n│   ├── apiSpec.js\n│   └── support/\n│       └── jasmine.json\n├── dev-data/            # Development data and scripts\n│   ├── customScript.js\n│   └── property.json\n├── app.js               # Express application setup\n├── server.js            # Server entry point\n└── package.json         # Project dependencies\n```\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! If you'd like to contribute to this project:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nPlease ensure your code follows the existing style and includes appropriate tests.\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n\n---\n\n## 👤 Author\n\n**Hossam Hatem**\n\n- GitHub: [@7ossam7atem1](https://github.com/7ossam7atem1)\n- Project Link: [https://github.com/7ossam7atem1/Deyarak](https://github.com/7ossam7atem1/Deyarak)\n\n---\n\n## 🙏 Acknowledgments\n\n- **Supervisor**: Prof. Dr. Mahmoud Hussien\n- **Institution**: Faculty of computers and information\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7ossam7atem1%2Fdeyarak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F7ossam7atem1%2Fdeyarak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7ossam7atem1%2Fdeyarak/lists"}