{"id":17703768,"url":"https://github.com/mo7ammedd/talabat-apis","last_synced_at":"2025-03-13T07:32:06.835Z","repository":{"id":258655637,"uuid":"868203310","full_name":"Mo7ammedd/Talabat-APIs","owner":"Mo7ammedd","description":"Talabat Integration Platform API System Clone","archived":false,"fork":false,"pushed_at":"2025-01-14T00:50:48.000Z","size":306,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T19:07:07.662Z","etag":null,"topics":["cashing","dotnet","entity-framework","onion-architecture","redis","repository","specification","sqlserver","unit-of-work"],"latest_commit_sha":null,"homepage":"https://documenter.getpostman.com/view/28646082/2sAY4yfghP","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mo7ammedd.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-05T18:36:18.000Z","updated_at":"2025-01-19T00:08:11.000Z","dependencies_parsed_at":"2024-10-25T00:19:57.942Z","dependency_job_id":"18f4de2a-9380-436a-8b76-feccefa97f62","html_url":"https://github.com/Mo7ammedd/Talabat-APIs","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"0bdd42da547c1eaa20667a863f9f5b90540b1c36"},"previous_names":["mo7ammedd/talabat-apis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mo7ammedd%2FTalabat-APIs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mo7ammedd%2FTalabat-APIs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mo7ammedd%2FTalabat-APIs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mo7ammedd%2FTalabat-APIs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mo7ammedd","download_url":"https://codeload.github.com/Mo7ammedd/Talabat-APIs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243361379,"owners_count":20278559,"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":["cashing","dotnet","entity-framework","onion-architecture","redis","repository","specification","sqlserver","unit-of-work"],"created_at":"2024-10-24T21:05:47.499Z","updated_at":"2025-03-13T07:32:06.826Z","avatar_url":"https://github.com/Mo7ammedd.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Talabat API Project\r\n\r\n### Overview\r\nA scalable e-commerce platform built with modern architectural patterns and best practices. This platform leverages Entity Framework, LINQ, and follows Clean Architecture principles to provide a robust solution for e-commerce needs.\r\n\r\n### Architecture\r\nThe project is structured into the following layers:\r\n\r\n```\r\nsrc/\r\n├── Talabat.APIs/           # API controllers and presentation layer\r\n├── Talabat.Core/           # Domain entities, interfaces, business logic\r\n├── Talabat.Repository/     # Data access implementation\r\n├── Talabat.Services/       # Business services implementation\r\n```\r\n\r\n### Project Structure Explanation\r\n- **Talabat.APIs**: Contains API controllers, filters, and configuration\r\n- **Talabat.Core**: Houses domain entities, interfaces, and core business logic\r\n- **Talabat.Repository**: Implements data access patterns and database operations\r\n- **Talabat.Services**: Contains business service implementations and external integrations\r\n\r\n### Features\r\n- **Onion Architecture**: Separation of concerns and maintainability.\r\n- **Repository Pattern**: Abstraction of the data access layer and consistent interface for querying the database.\r\n- **Unit of Work Pattern**: Management of the context and transaction of the Entity Framework.\r\n- **Specification Pattern**: Building complex queries in a composable and maintainable way.\r\n- **Stripe Payment Gateway**: Integration with Stripe for payment processing.\r\n\r\n### Getting Started\r\n\r\n#### Prerequisites\r\n- .NET 6.0 SDK\r\n- Docker and Docker Compose\r\n- Visual Studio 2022 or VS Code\r\n- redis\r\n\r\n#### Running with Docker\r\n1. Clone the repository:\r\n    ```bash\r\n    git clone https://github.com/Mo7ammedd/Talabat-APIs.git\r\n    cd Talabat-APIs\r\n    ```\r\n\r\n2. Build and run the containers:\r\n    ```bash\r\n    docker-compose up --build\r\n    ```\r\n\r\nThis will start:\r\n- Talabat API on port 8080\r\n- Redis on port 6379\r\n- SQL Server on port 1433\r\n\r\n#### Local Development\r\n1. Update the connection strings in `appsettings.json`:\r\n    ```json\r\n    {\r\n      \"ConnectionStrings\": {\r\n        \"DefaultConnection\": \"Server=localhost;Database=TalabatDb;User=sa;Password=YourStrong!Passw0rd;\",\r\n        \"IdentityConnection\": \"Server=localhost;Database=TalabatIdentity;User Id=sa;Password=YourStrong!Passw0rd;\"\r\n      },\r\n      \"Redis\": {\r\n        \"ConnectionString\": \"localhost:6379\"\r\n      },\r\n      \"Jwt\": {\r\n        \"SecretKey\": \"7f98e3b1-4b7b-4b7b-8b7b-7b7b7b7b7b7b\",\r\n        \"ValidIssuer\": \"https://localhost:7284/\",\r\n        \"ValidAudience\": \"Mohammed-Mostafa-Apis-Client\",\r\n        \"TokenLifeTime\": 60\r\n      }\r\n       \"StripeSettings\": {\r\n      \"PublishableKey\": \"\",\r\n      \"SecretKey\": \"\"\r\n     }\r\n    }\r\n    ```\r\n\r\n2. Run the application:\r\n    ```bash\r\n    dotnet restore\r\n    dotnet run --project Talabat.APIs\r\n    ```\r\n\r\n### API Documentation\r\n- API documentation available at `https://localhost:7284/swagger/index.html`\r\n- Detailed endpoint documentation in the `Talabat.APIs` project\r\n- Postman documentation available [here](https://documenter.getpostman.com/view/28646082/2sAY4yfghP)\r\n\r\n### Development Workflow\r\n1. Make changes to the code\r\n2. Build the Docker image: `docker-compose build`\r\n3. Run the containers: `docker-compose up`\r\n4. Access the API at `http://localhost:8080`\r\n\r\n### Endpoints\r\n\r\n**AccountController**\r\n- `POST /api/account/login`: Login a user\r\n- `POST /api/account/register`: Register a new user\r\n- `GET /api/account`: Get the current user\r\n- `GET /api/account/address`: Get the user's address\r\n- `PUT /api/account/address`: Update the user's address\r\n- `GET /api/account/emailexists`: Check if an email exists\r\n- `PUT /api/account/update`: Update the user's information\r\n- `PUT /api/account/updatepassword`: Update the user's password\r\n\r\n**BasketController**\r\n- `GET /api/basket`: Get a basket by ID\r\n- `POST /api/basket`: Update a basket\r\n- `DELETE /api/basket/id`: Delete a basket by ID\r\n\r\n**ErrorsController**\r\n- `GET /errors/{code}`: Handle errors\r\n\r\n**OrderController**\r\n- `POST /api/order`: Create a new order\r\n- `GET /api/order`: Get orders for the current user\r\n- `GET /api/order/{id}`: Get an order by ID\r\n- `GET /api/order/deliveryMethods`: Get delivery methods\r\n\r\n**ProductsController**\r\n- `GET /api/products`: Get a list of products\r\n- `GET /api/products/{id}`: Get a product by ID\r\n- `GET /api/products/brands`: Get a list of product brands\r\n- `GET /api/products/categories`: Get a list of product categories\r\n\r\n### Testing\r\n```bash\r\n# Run unit tests\r\ndotnet test\r\n\r\n# Run the application with Docker\r\ndocker-compose up\r\n```\r\n\r\n### Monitoring and Logging\r\n- Health checks available at `/health`\r\n- Logs are written to console and can be viewed using `docker-compose logs`\r\n\r\n### Contributing\r\n1. Fork the repository\r\n2. Create a feature branch\r\n3. Commit your changes\r\n4. Push to the branch\r\n5. Create a pull request\r\n\r\n### License\r\nThis project is licensed under the MIT License.\r\n\r\n### Support\r\nFor support, please create an issue in the repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmo7ammedd%2Ftalabat-apis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmo7ammedd%2Ftalabat-apis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmo7ammedd%2Ftalabat-apis/lists"}