{"id":49215910,"url":"https://github.com/mohammadbekran/food-management-app","last_synced_at":"2026-04-24T00:02:28.679Z","repository":{"id":353388481,"uuid":"1018534144","full_name":"MohammadBekran/food-management-app","owner":"MohammadBekran","description":"A food delivery and management system built with NestJS, TypeScript, and PostgreSQL.","archived":false,"fork":false,"pushed_at":"2026-04-23T18:24:18.000Z","size":2347,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-23T18:35:59.861Z","etag":null,"topics":["aws-s3","jwt-authentication","nestjs","openapi","postgresql","swagger","typeorm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/MohammadBekran.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-12T13:18:39.000Z","updated_at":"2026-04-23T18:24:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/MohammadBekran/food-management-app","commit_stats":null,"previous_names":["mohammadbekran/food-management-app"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/MohammadBekran/food-management-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadBekran%2Ffood-management-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadBekran%2Ffood-management-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadBekran%2Ffood-management-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadBekran%2Ffood-management-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohammadBekran","download_url":"https://codeload.github.com/MohammadBekran/food-management-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadBekran%2Ffood-management-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32203362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T20:19:26.138Z","status":"ssl_error","status_checked_at":"2026-04-23T20:19:23.520Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws-s3","jwt-authentication","nestjs","openapi","postgresql","swagger","typeorm","typescript"],"created_at":"2026-04-24T00:02:27.856Z","updated_at":"2026-04-24T00:02:28.671Z","avatar_url":"https://github.com/MohammadBekran.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Food Management App\n\nA food delivery and management system built with NestJS, TypeScript, and PostgreSQL.\n\n## Features\n\n- User authentication with OTP verification\n- Supplier registration and management\n- Menu and category management\n- Shopping cart functionality\n- Payment processing with ZarinPal\n- Order management system\n\n## Tech Stack\n\n- **Backend**: NestJS, TypeScript\n- **Database**: PostgreSQL with TypeORM\n- **Authentication**: JWT with OTP\n- **File Storage**: AWS S3\n- **Payment**: ZarinPal integration\n- **Documentation**: Swagger/OpenAPI\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js (v18+)\n- PostgreSQL\n- AWS S3 account (for file storage)\n\n### Installation\n\n```bash\n# Install dependencies\npnpm install\n\n# Set up environment variables\ncp .env.example .env\n# Edit .env with your configuration\n\n# Run database migrations\npnpm run migration:run\n\n# Start development server\npnpm run start:dev\n```\n\n### Environment Variables\n\n```env\n# Server\nPORT=3000\n\n# Database\nDB_HOST=localhost\nDB_PORT=5432\nDB_USERNAME=your_username\nDB_PASSWORD=your_password\nDB_NAME=food_management\n\n# JWT Secrets\nJWT_USER_ACCESS_TOKEN_SECRET=your_user_access_secret\nJWT_USER_REFRESH_TOKEN_SECRET=your_user_refresh_secret\nJWT_SUPPLIER_ACCESS_TOKEN_SECRET=your_supplier_access_secret\nJWT_SUPPLIER_REFRESH_TOKEN_SECRET=your_supplier_refresh_secret\n\n# AWS S3\nS3_BUCKET_NAME=your_bucket_name\n\n# ZarinPal Payment Gateway\nZARINPAL_MERCHANT_ID=your_merchant_id\nZARINPAL_REQUEST_URL=https://api.zarinpal.com/pg/v4/payment/request.json\nZARINPAL_VERIFY_URL=https://api.zarinpal.com/pg/v4/payment/verify.json\nZARINPAL_GATEWAY_URL=https://www.zarinpal.com/pg/StartPay\nPAYMENT_GATEWAY_URL=your_payment_callback_url\n\n# Frontend\nFRONTEND_URL=http://localhost:3001\n```\n\n## API Documentation\n\nOnce the server is running, visit `http://localhost:3000/api-docs` for the Swagger documentation.\n\n## Project Structure\n\n```\nsrc/\n├── common/           # Shared utilities, decorators, DTOs\n├── modules/\n│   ├── auth/         # Authentication\n│   ├── user/         # User management\n│   ├── supplier/     # Supplier management\n│   ├── menu/         # Menu and categories\n│   ├── basket/       # Shopping cart\n│   ├── order/        # Order management\n│   ├── payment/      # Payment processing\n│   └── discount/     # Discount codes\n├── configs/          # Configuration files\n└── migrations/       # Database migrations\n```\n\n## Available Scripts\n\n```bash\n# Development\npnpm run start:dev\n\n# Production\npnpm run start:prod\n\n# Database\npnpm run migration:run\npnpm run migration:revert\npnpm run migration:generate\n\n# Testing\npnpm run test\npnpm run test:e2e\n```\n\n## API Endpoints\n\n### Authentication (`/api/auth`)\n\n| Method | Endpoint     | Description      | Auth Required |\n| ------ | ------------ | ---------------- | ------------- |\n| POST   | `/send-otp`  | Send OTP to user | ❌            |\n| POST   | `/check-otp` | Verify user OTP  | ❌            |\n\n### User Management (`/api/user`)\n\n| Method | Endpoint         | Description                 | Auth Required |\n| ------ | ---------------- | --------------------------- | ------------- |\n| GET    | `/`              | Get user profile            | ✅ User       |\n| PUT    | `/`              | Update user profile         | ✅ User       |\n| GET    | `/my-orders`     | Get user orders (paginated) | ✅ User       |\n| GET    | `/get-order/:id` | Get specific user order     | ✅ User       |\n\n### User Address Management (`/api/user-address`)\n\n| Method | Endpoint | Description               | Auth Required |\n| ------ | -------- | ------------------------- | ------------- |\n| GET    | `/`      | Get user addresses        | ✅ User       |\n| POST   | `/`      | Create user address       | ✅ User       |\n| GET    | `/:id`   | Get specific user address | ✅ User       |\n| PUT    | `/:id`   | Update user address       | ✅ User       |\n| DELETE | `/:id`   | Delete user address       | ✅ User       |\n\n### Supplier Management (`/api/supplier`)\n\n| Method | Endpoint                                | Description                     | Auth Required |\n| ------ | --------------------------------------- | ------------------------------- | ------------- |\n| POST   | `/signup`                               | Supplier registration           | ❌            |\n| POST   | `/send-otp`                             | Send OTP to supplier            | ❌            |\n| POST   | `/check-otp`                            | Verify supplier OTP             | ❌            |\n| POST   | `/supplementary-information`            | Save additional information     | ✅ Supplier   |\n| PUT    | `/upload-documents`                     | Upload supplier documents       | ✅ Supplier   |\n| PUT    | `/upload-contract`                      | Upload contract                 | ✅ Supplier   |\n| GET    | `/`                                     | Get supplier profile            | ✅ Supplier   |\n| PUT    | `/`                                     | Update supplier profile         | ✅ Supplier   |\n| GET    | `/get-orders`                           | Get supplier orders (paginated) | ✅ Supplier   |\n| GET    | `/get-order/:id`                        | Get specific supplier order     | ✅ Supplier   |\n| PUT    | `/orders/:orderId/items/:itemId/status` | Update order item status        | ✅ Supplier   |\n\n### Category Management (`/api/category`)\n\n| Method | Endpoint         | Description                    | Auth Required |\n| ------ | ---------------- | ------------------------------ | ------------- |\n| POST   | `/`              | Create category                | ✅ Supplier   |\n| GET    | `/`              | Get all categories (paginated) | ❌            |\n| GET    | `/by-slug/:slug` | Get category by slug           | ❌            |\n| PATCH  | `/:id`           | Update category                | ✅ Supplier   |\n| DELETE | `/:id`           | Delete category                | ✅ Supplier   |\n\n### Menu Management (`/api/menu`)\n\n| Method | Endpoint                               | Description            | Auth Required |\n| ------ | -------------------------------------- | ---------------------- | ------------- |\n| POST   | `/`                                    | Create menu item       | ✅ Supplier   |\n| PUT    | `/:id`                                 | Update menu item       | ✅ Supplier   |\n| GET    | `/get-menu-by-supplier-id/:supplierId` | Get menus by supplier  | ❌            |\n| GET    | `/:id`                                 | Get specific menu item | ✅ Supplier   |\n| DELETE | `/:id`                                 | Delete menu item       | ✅ Supplier   |\n\n### Menu Group Management (`/api/menu-group`)\n\n| Method | Endpoint | Description             | Auth Required |\n| ------ | -------- | ----------------------- | ------------- |\n| POST   | `/`      | Create menu group       | ✅ Supplier   |\n| GET    | `/`      | Get menu groups         | ✅ Supplier   |\n| GET    | `/:id`   | Get specific menu group | ✅ Supplier   |\n| PUT    | `/:id`   | Update menu group       | ✅ Supplier   |\n| DELETE | `/:id`   | Delete menu group       | ✅ Supplier   |\n\n### Order Management (`/api/order`)\n\n| Method | Endpoint      | Description                | Auth Required |\n| ------ | ------------- | -------------------------- | ------------- |\n| GET    | `/:id`        | Get specific order details | ✅ User       |\n| PUT    | `/:id/cancel` | Cancel order               | ✅ User       |\n\n### Shopping Cart (`/api/basket`)\n\n| Method | Endpoint           | Description             | Auth Required |\n| ------ | ------------------ | ----------------------- | ------------- |\n| GET    | `/`                | Get basket contents     | ✅ User       |\n| POST   | `/`                | Add item to basket      | ✅ User       |\n| DELETE | `/`                | Remove item from basket | ✅ User       |\n| POST   | `/add-discount`    | Apply discount code     | ✅ User       |\n| DELETE | `/remove-discount` | Remove discount code    | ✅ User       |\n\n### Discount Management (`/api/discount`)\n\n| Method | Endpoint | Description                   | Auth Required |\n| ------ | -------- | ----------------------------- | ------------- |\n| POST   | `/`      | Create discount               | ✅ Admin      |\n| PUT    | `/:code` | Update discount               | ✅ Admin      |\n| DELETE | `/:code` | Delete discount               | ✅ Admin      |\n| GET    | `/`      | Get all discounts (paginated) | ✅ Admin      |\n\n### Payment (`/api/payment`)\n\n| Method | Endpoint  | Description             | Auth Required |\n| ------ | --------- | ----------------------- | ------------- |\n| POST   | `/`       | Initiate payment        | ✅ User       |\n| GET    | `/verify` | Verify payment callback | ❌            |\n\n## Database Schema\n\nThe app uses the following main entities:\n\n- Users (customers)\n- Suppliers (restaurants)\n- Categories\n- Menus\n- Orders\n- Order Items\n- Payments\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadbekran%2Ffood-management-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammadbekran%2Ffood-management-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadbekran%2Ffood-management-app/lists"}