{"id":18390440,"url":"https://github.com/codeconut-ltd/gh-market-products-store","last_synced_at":"2026-04-06T08:32:26.374Z","repository":{"id":174024663,"uuid":"651663797","full_name":"Codeconut-Ltd/GH-Market-Products-Store","owner":"Codeconut-Ltd","description":"Market stall mobile app for sales tracking of products.","archived":false,"fork":false,"pushed_at":"2023-07-26T15:11:25.000Z","size":1115,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-12T08:57:09.112Z","etag":null,"topics":["app","application","axios","bootstrap","dompurify","i18next","js","mysql","php","react","react-app","react-hooks","react-router","reactjs","recoil","recoil-app","recoil-example","styled-component","styled-components","typescript"],"latest_commit_sha":null,"homepage":"https://project-1-0.codeconut.io","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Codeconut-Ltd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-06-09T18:56:44.000Z","updated_at":"2023-06-09T19:30:00.000Z","dependencies_parsed_at":"2023-09-05T20:45:28.387Z","dependency_job_id":null,"html_url":"https://github.com/Codeconut-Ltd/GH-Market-Products-Store","commit_stats":null,"previous_names":["codeconut-ltd/gh-market-products-store"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Codeconut-Ltd/GH-Market-Products-Store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeconut-Ltd%2FGH-Market-Products-Store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeconut-Ltd%2FGH-Market-Products-Store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeconut-Ltd%2FGH-Market-Products-Store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeconut-Ltd%2FGH-Market-Products-Store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Codeconut-Ltd","download_url":"https://codeload.github.com/Codeconut-Ltd/GH-Market-Products-Store/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeconut-Ltd%2FGH-Market-Products-Store/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"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":["app","application","axios","bootstrap","dompurify","i18next","js","mysql","php","react","react-app","react-hooks","react-router","reactjs","recoil","recoil-app","recoil-example","styled-component","styled-components","typescript"],"created_at":"2024-11-06T01:47:47.226Z","updated_at":"2026-04-06T08:32:26.358Z","avatar_url":"https://github.com/Codeconut-Ltd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Market Products Store](teaser.png)](https://project-1-0.codeconut.io)\n\n\n# Product register\n\nTOC\n\n- [About](#about)\n- [Use](#use)\n- [Documentation](#documentation)\n- [Testing](#testing)\n- [Issues](#issues)\n\n\u003cbr\u003e\n\n---\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Codeconut-Ltd_GH-Market-Products-Store\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Codeconut-Ltd_GH-Market-Products-Store)\n\n\u003cbr\u003e\u003cbr\u003e\n\n## About\n\nProof of concept mobile web-app for market product sales tracking.\n\nRegisters actual products being sold, as well as the time (stored in the DB). \nThis information is crucial for sellers to figure out the best times at a market vs. \nthose times that could be spent better doing something else.\n\n\u003e This is the tech and skill demo version withour real application data like products.\n\u003e Early, conceptual MVP phase with some features to be refined and finished on demand.\n\n---\n\n## Use\n\n### Install\n\n#### Dependencies\n\nInstall Node and Composer on local system.\n\n- [Composer](https://getcomposer.org)\n- [Node.js](https://nodejs.org/en)\n\nThen run in CLI:\n\n```bash\ncomposer install\nnpm install\n```\n\n### PHP + Database\n\n- Install a PHP server and database that can run the API's PHP code\n  - Copy credentials template from `_internals`\n  - Adjust path to credentials under `public/api/index`\n  - Initialize the database with SQL from `_internals/sql/*.sql`\n- Run the build and upload the `build` folder\n  - Build contains the API that needs PHP and SQL to run\n\n### Environment\n\n- Create file `.env` with content from `env.example` (adjust as needed)\n- See info about `htpasswd` settings to adjust depending on hosting environment.\n\n\u003e Be aware that running DEV server _vs_ running build scripts use different environments. Build is for production only.\n\n### Run\n\n#### Development\n\n```bash\n# Start DEV server (with hot reload)\n# - Uses development path config\nnpm run start\n```\n\n#### Production\n\n```bash\n# Build production bundle for deployment\n# - Uses '.env.production' file and different paths\nnpm run build\n\n# Start LIVE server preview (static files)\n# - Intended to be used with production build only\nnpm run run\n```\n\n### Updates\n\n#### Packages\n\nSee: `composer.json`, `package.json`\n\nFor security reasons: Package versions have been made static without upgrade possibility.\nIf you need to update within the current major version, add the `^` symbol in front of version numbers.\n\n---\n\n## Documentation\n\n### Access\n\n- `.htaccess`: Update path under `AuthUserFile`\n- `.htpasswd`: See secret values in `.env.example`\n\n### Config\n\nAny system and app configuration.\n\n- Backend\n  - URLs: `/public/api/config/*.php`\n  - Routes: `.../api/app/request/routes.php`\n- Frontend\n  - Environment: `.env*`\n  - URLs: `/src/config/*.ts`\n\n\u003e Path eventually without `/public/`\n\n### Data / Products\n\n- JSON: `/public/api/data/products.json`\n\nTo use image placeholder, remove the `img` attribute from a product in `productList`.\nAny given path will try to load the image, even if thaht is a 404.\n\n### Modules\n\nApplication dependencies for feature development and production.\n\n#### Backend\n\n| Module / Stack                                        | Use case      |\n| ----------------------------------------------------- | ------------- |\n| [DotEnv - Symfony](https://github.com/symfony/dotenv) | DotEnv in PHP |\n| [Kint](https://github.com/kint-php/kint)              | PHP debugger  |\n| [PDO](https://www.php.net/manual/en/book.pdo.php)     | PDO database  |\n\n#### Frontend\n\n| Module / Stack                                                              | Use case                       |\n| --------------------------------------------------------------------------- | ------------------------------ |\n| [Axios](https://axios-http.com/docs/intro)                                  | HTTP Requests (GET, POST, ...) |\n| [Bootstrap](https://getbootstrap.com/docs/5.0)                              | Component and CSS framework    |\n| [i18next](https://www.i18next.com)                                          | Languages, Localisation        |\n| [React](https://reactjs.org)                                                | Web application framework      |\n| [React Icons](https://react-icons.github.io/react-icons)                    | Icons (e.g. FontAwesome)       |\n| [React Router](https://reactrouter.com/docs/en/v6/getting-started/overview) | Routing                        |\n| [Recoil](https://recoiljs.org)                                              | State management ('Pub sub')   |\n| [Styled Components](https://styled-components.com)                          | CSS in JS                      |\n| [TypeScript](https://www.typescriptlang.org)                                | TypeScript                     |\n\n#### WIP\n\nNot in use (yet) - Frontend or backend.\n\n| Module / Stack                                          | Use case                               |\n| ------------------------------------------------------- | -------------------------------------- |\n| [DomPurify](https://github.com/cure53/DOMPurify)        | Sanitizing, Input security             |\n| [Jest](https://jestjs.io)                               | Unit and E2E tests                     |\n| [PhpUnit](https://phpunit.de)                           | Unit tests                             |\n| [Prop Types](https://www.npmjs.com/package/prop-types)  | Runtime, dynamic type checks           |\n| [React Styleguidist](https://react-styleguidist.js.org) | Component documentation and styleguide |\n\n### Solutions\n\nSpecific settings that diverge from expected default setups.\n\n| Resource                                                                                                   | Use case            |\n| ---------------------------------------------------------------------------------------------------------- | ------------------- |\n| [Create React App - Deployment](https://create-react-app.dev/docs/deployment/#building-for-relative-paths) | Subfolder URL setup |\n\n### Training\n\nGenerally important to know.\n\n| Resource                                                       | Topics                 |\n| -------------------------------------------------------------- | ---------------------- |\n| [Javascript](https://javascript.info)                          | Modern JavaScript      |\n| [React - Course](https://github.com/Asabeneh/30-Days-Of-React) | 30 Days of React       |\n| [React - Hooks](https://reactjs.org/docs/hooks-intro.html)     | React API - Hooks      |\n| [React - Guides](https://reactresources.com)                   | Tutorials and Snippets |\n\nImportant React concepts:\n\n- Props, State, Component lifecycle\n- Hooks: useEffect, useState\n\n---\n\n## Testing\n\nChecklist for QA purposes.\n\n| Section         | Component                 | Test                                                |\n| --------------- | ------------------------- | --------------------------------------------------- |\n| Layout / Header | Reset (button)            | Must not be clickable without selection             |\n| Layout / Header | Reset (button)            | Click must delete product selection and price views |\n| Layout / Header | Finish (button)           | Must not be clickable without selection             |\n| Layout / Header | Finish (button)           | Click must open modal view                          |\n| Dashboard       | Orders total price (text) | Price updates on subsequent Ajax calls              |\n| Modal Overview  | Save (button)             | Click must send Ajax POST request                   |\n| Products        | Product item (accordion)  | Toggle must open item; show text and images         |\n\n---\n\n## Issues\n\n### Development ENV\n\n#### PHP API\n\nIf the application shows a broken interface, it's likely a failed PHP call to the API returning weird data; e.g. `/api/?method=price` returns path instead data. In this case the server/ PHP version is not compatible to the application.\n\n#### Build folder\n\nThis will lead to merge conflicts over time. It's solely included to simplify a minimalist one-way workflow,\nand to keep a safe running artifact independent from any NPM hickups, when re-installing the app after a while.\n\n#### Recoil\n\n##### 'Duplicate atom key ...'\n\n- Where: Browser console, message\n- When: Sometimes on code change and DEV env rebuild\n- Solution: Reload website manually\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeconut-ltd%2Fgh-market-products-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeconut-ltd%2Fgh-market-products-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeconut-ltd%2Fgh-market-products-store/lists"}