{"id":26449307,"url":"https://github.com/emmannweb/nest-fullstack","last_synced_at":"2026-04-11T01:05:00.028Z","repository":{"id":281859886,"uuid":"946046467","full_name":"emmannweb/nest-fullstack","owner":"emmannweb","description":"Mini E-commerce Website with NestJs, Mongodb, Nodemailer, React, Material UI, Redux toolkit","archived":false,"fork":false,"pushed_at":"2025-07-07T14:01:51.000Z","size":1478,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-07T15:22:18.648Z","etag":null,"topics":["datagrid","docker","docker-compose","formik","material-ui","mongodb","nestjs","nodemailer","reactjs","redux-toolkit","s3","typescript","yup"],"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/emmannweb.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}},"created_at":"2025-03-10T14:24:54.000Z","updated_at":"2025-07-07T14:01:54.000Z","dependencies_parsed_at":"2025-07-07T15:21:45.414Z","dependency_job_id":"8f8168cf-a41f-439d-9dfd-9ed3da194db4","html_url":"https://github.com/emmannweb/nest-fullstack","commit_stats":null,"previous_names":["emmannweb/nest-fullstack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emmannweb/nest-fullstack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmannweb%2Fnest-fullstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmannweb%2Fnest-fullstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmannweb%2Fnest-fullstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmannweb%2Fnest-fullstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emmannweb","download_url":"https://codeload.github.com/emmannweb/nest-fullstack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmannweb%2Fnest-fullstack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269956215,"owners_count":24503123,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["datagrid","docker","docker-compose","formik","material-ui","mongodb","nestjs","nodemailer","reactjs","redux-toolkit","s3","typescript","yup"],"created_at":"2025-03-18T14:54:12.620Z","updated_at":"2026-04-11T01:04:59.983Z","avatar_url":"https://github.com/emmannweb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Small E-commerce project\n\nThis project allows you to simulate orders with a button on the frontend of the application, then add one or more products to the cart (the cart is using Redux toolkit and localStorage to save products; after creating the order, the localStorage is cleared), and check the created order on the Dashboard;\n\n## 3 Entities\n\n- Product\n- Category\n- Order\n\n## Relation\n\n- Product \u0026 Category : Many to Many\n- Order \u0026 Product: One to Many\n\n## Features (Backend)\n\n- DTOs implemented\n- When a product is created it is added to a category, and that category receives the ID of that product.\n- When updating a product, you can add one or more categories to a product,\n  the ID of that product will be registered in all the categories mentionned.\n- When you delete a product, that product's ID is deleted from all categories it belongs to.\n- When deleting a category, the ID of that category will be deleted from all products it belongs to.\n  This way, consistency will be maintained.\n\n- Error handling.\n- When an order is created an event is listened for each order creation to send email notification with Nodemailer using the implemented email service.\n- Image upload has been implemented in the backend with AWS S3 and generates an URL to save with new product creation.\n\n## Features (Frontend)\n\n- Material UI.\n- Form validations with Formik and Yup.\n  -Datagrid for listing Products, Categories and Order.\n- When editing a product, you could add one or more categories.\n- Image upload\n- When the cart is empty the order simulation button is disabled.\n\n## Dashboard de KPIs via Mongo DB Aggregation:\n\n- Total quantity of orders.\n- Average value per order.\n- Total revenue.\n- Orders by period (daily, weekly, monthly).\n- Number of categories.\n- Daily sale with dates and chart.\n\n## Tech Stack\n\n**Frontend:** React, Material UI, Formik, Yup, Datagrid, Custom Hooks, Redux toolkit, toast notification\n\n**Backend:** NestJs, Express, AWS S3, Mongo DB, Nodemailer, Cors, Helmet, Event, @nestjs/config\n\n**TOOLS:** Docker\n\n## API Reference\n\n#### Get all products\n\n```http\n  GET /product\n```\n\n#### Get single product\n\n```http\n  GET /product/${id}\n```\n\n| Parameter | Type     | Description                                  |\n| :-------- | :------- | :------------------------------------------- |\n| `id`      | `string` | **Required \u0026 valid**. Id of product to fetch |\n\n#### Update one product\n\n```http\n  PATCH /product/${id}\n```\n\n| Parameter | Type     | Description                                   |\n| :-------- | :------- | :-------------------------------------------- |\n| `id`      | `string` | **Required \u0026 valid**. Id of product to update |\n\n#### Delete one product\n\n```http\n  DELETE /product/${id}\n```\n\n| Parameter | Type     | Description                                   |\n| :-------- | :------- | :-------------------------------------------- |\n| `id`      | `string` | **Required \u0026 valid**. Id of product to delete |\n\n#### Populate Product \u0026 Category\n\n```http\n  GET /product/category/populate\n```\n\n#### Get all catgeories\n\n```http\n  GET /category\n```\n\n#### Get single category\n\n```http\n  GET /category/${id}\n```\n\n| Parameter | Type     | Description                                   |\n| :-------- | :------- | :-------------------------------------------- |\n| `id`      | `string` | **Required \u0026 valid**. Id of category to fetch |\n\n#### Update one category\n\n```http\n  PATCH /category/${id}\n```\n\n| Parameter | Type     | Description                                    |\n| :-------- | :------- | :--------------------------------------------- |\n| `id`      | `string` | **Required \u0026 valid**. Id of category to update |\n\n#### Delete one category\n\n```http\n  DELETE /category/${id}\n```\n\n| Parameter | Type     | Description                                    |\n| :-------- | :------- | :--------------------------------------------- |\n| `id`      | `string` | **Required \u0026 valid**. Id of category to delete |\n\n#### Count categories\n\n```http\n  GET /count/result\n```\n\n#### Get all orders\n\n```http\n  GET /order\n```\n\n#### Get single order\n\n```http\n  GET /order/${id}\n```\n\n| Parameter | Type     | Description                                |\n| :-------- | :------- | :----------------------------------------- |\n| `id`      | `string` | **Required \u0026 valid**. Id of order to fetch |\n\n#### Update one order\n\n```http\n  PATCH /category/${id}\n```\n\n| Parameter | Type     | Description                                 |\n| :-------- | :------- | :------------------------------------------ |\n| `id`      | `string` | **Required \u0026 valid**. Id of order to update |\n\n#### Delete one order\n\n```http\n  DELETE /order/${id}\n```\n\n| Parameter | Type     | Description                                 |\n| :-------- | :------- | :------------------------------------------ |\n| `id`      | `string` | **Required \u0026 valid**. Id of order to delete |\n\n#### Upload imagem (We only use upload service inside product)\n\n```http\n  POST /upload\n```\n\n#### Sending E-mail (We only use email service not the enpoint via event)\n\n```http\n  POST /email\n```\n\n## Environment Variables\n\nTo run this project, you will need to add the following environment variables to your .env file\n\n`S3_ACCESS_KEY`\n`S3_SECRET_ACCESS_KEY`\n`S3_REGION`\n`S3_BUCKET_NAME`\n`EMAIL_HOST`\n`EMAIL_USERNAME`\n`EMAIL_PASSWORD`\n\n## Installation\n\nDownload nest-fullstack Github folder (Should have docker install)\n\n```bash\n  cd nest-fullstack\n  RUN  docker compose up -d\n```\n\nTo build and run images in a container.\n\nRestore Mongo DB Database from the ROOT folder\n\n```bash\n  docker cp ./db.archive mongo-db:/db.archive\n```\n\n```bash\n  docker exec -it mongo-db mongorestore --uri mongodb://localhost:27017 --gzip --archive=db.archive\n```\n\n## Screenshots\n\n![Home Page](./images-print/home.png)\n\n![Home Page](./images-print/dashboard.png)\n\n![Home Page](./images-print/orders.png)\n\n![Home Page](./images-print/product.png)\n\n![Home Page](./images-print/update-product.png)\n\n![Home Page](./images-print/product-endpoint-print.png)\n\n![Home Page](./images-print/category-endpoint-print.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmannweb%2Fnest-fullstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femmannweb%2Fnest-fullstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmannweb%2Fnest-fullstack/lists"}