{"id":16979871,"url":"https://github.com/mariatorrentedev/ecannab-server","last_synced_at":"2026-04-11T05:31:24.581Z","repository":{"id":233360618,"uuid":"337145978","full_name":"mariatorrentedev/eCannab-server","owner":"mariatorrentedev","description":"v1 Application created for CBD Wholesale sellers so that they can create single websites, adding products and resources to it. A double registration implemented 1. user, 2.customer in a user site.","archived":false,"fork":false,"pushed_at":"2021-02-25T20:26:35.000Z","size":353,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T14:38:44.262Z","etag":null,"topics":["chai","express","javascript","knex","mocha","node","postgresql","react","restful-api"],"latest_commit_sha":null,"homepage":"https://ecannab-client.vercel.app/","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/mariatorrentedev.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}},"created_at":"2021-02-08T16:57:56.000Z","updated_at":"2021-04-22T15:13:24.000Z","dependencies_parsed_at":"2024-04-15T23:58:17.526Z","dependency_job_id":null,"html_url":"https://github.com/mariatorrentedev/eCannab-server","commit_stats":null,"previous_names":["mariatorrentedev/ecannab-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mariatorrentedev/eCannab-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariatorrentedev%2FeCannab-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariatorrentedev%2FeCannab-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariatorrentedev%2FeCannab-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariatorrentedev%2FeCannab-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mariatorrentedev","download_url":"https://codeload.github.com/mariatorrentedev/eCannab-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariatorrentedev%2FeCannab-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31669575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"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":["chai","express","javascript","knex","mocha","node","postgresql","react","restful-api"],"created_at":"2024-10-14T01:47:27.028Z","updated_at":"2026-04-11T05:31:24.550Z","avatar_url":"https://github.com/mariatorrentedev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eCannaB API\n\neCannab is not a ecommerce platform, is the v1 application created for CBD wholesale sellers looking to start their online business, in a simple and efficient way, by creating their own website, adding products and resources to it, and providing a registration system to their customers so that they can navigate privately to see the resources, and add products to the cart. (Orders made by customers cooming soon)\n\nAs a user, you will have the option to:\n\n- Register and Login.\n- Create/Edit/Delete your site, with your own subdomain.\n- Create/Edit/Delete/Add Products to your site.\n- Create/Edit/Delete/Add Resources to your site.\n\nAs a customer of a user site you will have the option to:\n\n- Register to be able to add products to the cart and see the resources available.\n- 🔜Cooming soon (placing orders by customers in a site)\n\n---\n\n### 🌐 1. Working Prototype\n\nYou can access a working prototype of the React app here:\n\n## 🔗 [Live Link](https://ecannab-client.vercel.app/)\n\nand Node app here:\n\n## 🔗 [API](https://ecannab-api.herokuapp.com/) | [API REPO](https://github.com/cartodeveloper/eCannab-server/)\n\n---\n\n### ✍️ 2. User Stories\n\nThis app is for 4 types of users:\n\n- a user=CBD Wholesale seller visitor.\n- a login user.\n- a customer visitor\n- a login customer in a user site.\n\n###### Landing Page (Importance - Low) (Est: 1h)\n\n- as a visitor\n- I want to understand what I can do with this app (or sign up, or log in)\n- so I can decide if I want to use it.\n\n###### Login Page / User and Customer (Importance - High) (Est: 3h)\n\n- As a returning register user or customer\n- I want to enter my password and email to use this app,\n- So I can have access to my account.\n\n###### Sign Up / User and Customer (Importance - High) (Est: 3h)\n\n- As a visitor,\n- I want to register to use this app\n- So I can create a personal account.\n\n###### Dashboard (Importance - High) (Est: 5h)\n\n- As a logged-in user,\n- I want to be able to preview the content of the app (Site Creation/ Resources / Products / Orders).\n- So I can decide what section I want to navigate to.\n\n###### SiteHome (Importance - High) (Est: 2h)\n\n- As a customer visitor I can see the list of products, search and filter.\n- As a logged-in customer I can add products to the cart and make orders.\n\n---\n\n### 📳 3. Functionality\n\nThe app's functionality includes:\n\n- Every User has the ability to create an account and login.\n- Every User has the ability to create/edit/delete a site.\n- Every User has the ability to create/edit/delete products and adds it to a site.\n- Every User has the ability to create/edit/delete products and adds it to a site.\n- Every Customer in a User Site can create an account and login.\n- Every Customer in a User Site has the ability to add products to the cart\n- Every Customer has the ability to search products by title and more.\n\n- Further implementation every customer will be able to make orders in a User Site.\n\n---\n\n### 👩🏽‍💻 4. Technology\n\n- Front-End: HTML5, CSS3, JavaScript ES6, React\n- Back-End: Node.js, Express.js, Mocha, Chai, RESTful API Endpoints, Postgres\n- Development Environment: Heroku, DBeaver.\n\n---\n\n### 🎨 5. Screenshots\n\n- eCannaB User Experience:\n  ![User Experience](https://github.com/cartodeveloper/eCannaB-client/blob/main/public/videos/user-experience.gif?raw=true)\n\n- Customer in user site experience:\n  ![User Experience](https://github.com/cartodeveloper/eCannaB-client/blob/main/public/videos/customer-users-experience.gif?raw=true)\n\n---\n\n### 🟡 6. Back-end Structure - Business Objects\n\n- Users (database table)\n\n  - id (auto-generated)\n  - username (email validation)\n  - password (at least 8 chars, at least one alpha and a special character validation)\n\n- Resources(database table)\n\n  - id(auto-generated)\n  - name (text not null)\n  - link (text not null)\n  - r_image(text not null)\n  - site_id(foreign key)\n\n- Sites (database table)\n\n  - id (auto-generated)\n  - brand (text not null)\n  - logo (text not null)\n  - seller_description (text not null)\n  - subdomain (text not null)\n  - resources (an array of id resources)\n  - user_id(foreign key)\n\n- Products (database table)\n\n  - id (auto-generated)\n  - title (text not null)\n  - brand (text not null)\n  - p_image (text not null)\n  - price (decimal)\n  - in_stock (integer)\n  - p_description (text not null)\n  - site_id(foreign key)\n\n- Customers (database table)\n\n  - id (auto-generated)\n  - username (email validation)\n  - password (at least 8 chars, at least one alpha and a special character validation)\n  - site_id(foreign key)\n\n- Orders (database table)\n\n  - id (auto-generated)\n  - total_paid\n  - products (an array of the products ids )\n  - customer_id(foreign key)\n\n---\n\n### 📑API Documentation\n\n#### API Overview\n\n```\n    /api\n    .\n    ├── /auth\n    │   └── POST\n    │       ├── /login\n    ├── /users\n    │   └── POST\n    │       └── /\n    ├── /s\n    │   └── GET\n    │       POST\n    │       PUT\n    │       DELETE\n    │       └── /\n    ├── /resources\n    │   └── GET\n    │       POST\n    |       PUT\n    |       DELETE\n    │       └──/\n    ├── /products\n    │   └── GET\n    │       POST\n    │       PUT\n    │       DELETE\n    │       └── /\n    ├── /authcustomer\n    │   └── POST\n    │       ├── /login\n    ├── /customers\n    │   └── POST\n    │       └── /\n```\n\n#### API Detail\n\n| Method |          Path           |                          Purpose |\n| :----- | :---------------------: | -------------------------------: |\n| GET    |       /api/users        |                     Get the user |\n| POST   |       /api/users        |                Register the user |\n| POST   |     /api/auth/login     |    Validates username \u0026 password |\n| GET    |         /api/s          |       Get all sites from a user. |\n| POST   |         /api/s          |   Create a site in user session. |\n| PUT    |       /api/s/:id        |                       Edit site. |\n| DELETE |       /api/s/:id        |                     Delete site. |\n| GET    |     /api/resources      |   Get all resources from a site. |\n| POST   |     /api/resources      |     Create resources for a site. |\n| PUT    |   /api/resources/:id    |                  Edit resources. |\n| DELETE |   /api/resources/:id    |                Delete resources. |\n| GET    |      /api/products      |    Get all products from a site. |\n| POST   |      /api/products      |      Create products for a site. |\n| PUT    |    /api/products/:id    |                   Edit products. |\n| DELETE |    /api/products/:id    |                 Delete products. |\n| GET    |     /api/customers      |                Get the customer. |\n| POST   |     /api/customers      | Register the customer in a site. |\n| POST   | /api/authcustomer/login |    Validates username \u0026 password |\n\n---\n\n### ❓❔ 9. How to run it\n\nUse command line to navigate into the project folder and run the following in terminal\n\n##### Local React scripts\n\n- To install the react project ===\u003e npm install\n- To run react (on port 3000) ===\u003e npm start\n- To run tests ===\u003e npm run test\n\n##### Local Node scripts\n\n- To install the node project ===\u003e npm install\n- To migrate the database ===\u003e npm run migrate -- 1\n- To run Node server (on port 8000) ===\u003e npm run dev\n- To run tests ===\u003e npm run test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariatorrentedev%2Fecannab-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmariatorrentedev%2Fecannab-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariatorrentedev%2Fecannab-server/lists"}