{"id":28001168,"url":"https://github.com/brakmic/pos-pwa_with_bluetooth","last_synced_at":"2026-04-20T09:33:19.816Z","repository":{"id":289982615,"uuid":"960931772","full_name":"brakmic/POS-PWA_with_Bluetooth","owner":"brakmic","description":"PWA based on React with Bluetooth suppport","archived":false,"fork":false,"pushed_at":"2025-04-06T12:28:25.000Z","size":42043,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T05:57:40.103Z","etag":null,"topics":["bluetooth","point-of-sale","pwa","python","react","service-worker","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/brakmic.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,"zenodo":null}},"created_at":"2025-04-05T11:36:21.000Z","updated_at":"2025-04-24T15:26:24.000Z","dependencies_parsed_at":"2025-04-26T06:13:33.403Z","dependency_job_id":null,"html_url":"https://github.com/brakmic/POS-PWA_with_Bluetooth","commit_stats":null,"previous_names":["brakmic/pos-pwa_with_bluetooth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brakmic/POS-PWA_with_Bluetooth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FPOS-PWA_with_Bluetooth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FPOS-PWA_with_Bluetooth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FPOS-PWA_with_Bluetooth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FPOS-PWA_with_Bluetooth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brakmic","download_url":"https://codeload.github.com/brakmic/POS-PWA_with_Bluetooth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FPOS-PWA_with_Bluetooth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32041444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["bluetooth","point-of-sale","pwa","python","react","service-worker","typescript"],"created_at":"2025-05-08T23:57:47.903Z","updated_at":"2026-04-20T09:33:19.790Z","avatar_url":"https://github.com/brakmic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# POS PWA Project\n\nThis project is a Point of Sale (POS) Progressive Web Application with multiple connectivity options, including direct API access and Bluetooth connectivity through a bridge.\n\n![pos_demo](./assets/gifs/pos_demo.gif)\n\n## Project Structure\n\n```\npwa/\n├── src/                 # Main React application\n├── mock-api/            # Mock API server with SQLite database\n├── mock-bt-bridge/      # Mock Bluetooth bridge (WebSockets)\n├── raspberry_proxy/     # Raspberry Pi Bluetooth proxy (Python)\n└── certs/               # SSL certificates for development\n```\n\n## System Architecture\n\n```\n┌──────────────────────────────────────────────────┐\n│                  POS PWA (Browser)               │\n│                                                  │\n│  ┌─────────────┐    ┌───────────┐    ┌────────┐  │\n│  │    React    │    │  Service  │    │  Cache │  │\n│  │ Components  │───▶│  Worker   │───▶│ Manager│  │\n│  └─────────────┘    └───────────┘    └────────┘  │\n│           │                │                     │\n└───────────┼────────────────┼─────────────────────┘\n            │                │\n            ▼                ▼\n┌───────────────────┐  ┌────────────────────────┐\n│  Direct HTTP(S)   │  │   Bluetooth Connection │\n│    Connection     │  │                        │\n└─────────┬─────────┘  └──────────┬─────────────┘\n          │                       │\n          ▼                       ▼\n┌────────────────────┐  ┌─────────────────────┐\n│     Mock API       │  │  Mock BT Bridge     │\n│  (or real API)     │◀─┤  (or real device)   │\n└────────────────────┘  └─────────────────────┘\n```\n\n## Available Scripts\n\n### Main Application\n\nIn the project directory, you can run:\n\n```bash\n# Standard development mode (HTTP)\nnpm start\n\n# Secure development mode (HTTPS)\nnpm run start:secure\n```\n\n### Mock API Server\n\nIn the mock-api directory:\n\n```bash\n# Start the API server (HTTP)\nnpm run dev\n\n# Start the API server with HTTPS\nnpm run dev:secure\n\n# Build the API server\nnpm run build\n\n# Run the built API server\nnpm run start\n```\n\nThe API server will be available at:\n- HTTP: http://localhost:5000\n- HTTPS: https://localhost:5000\n- Swagger Documentation: http://localhost:5000/api-docs\n\n### Mock Bluetooth Bridge\n\nIn the mock-bt-bridge directory:\n\n```bash\n# Start the BT bridge (WS)\nnpm run dev\n\n# Start the BT bridge with secure WebSockets (WSS)\nnpm run dev:secure\n\n# Build the BT bridge\nnpm run build\n\n# Run the built BT bridge\nnpm run start\n```\n\nThe Bluetooth Bridge will be available at:\n- WS: ws://localhost:3030\n- WSS: wss://localhost:3030\n\n## Development Environment\n\nYou can run the complete development environment with:\n\n```bash\n# Start all services (HTTP/WS)\n./scripts/run-dev-environment.sh\n\n# Start all services with HTTPS/WSS\n./scripts/run-dev-environment.sh secure\n```\n\n## API Documentation\n\nThe Mock API includes Swagger documentation available at `/api-docs` when the server is running. This provides interactive documentation for all available endpoints, including:\n\n- Products API (`/api/products`)\n- Categories API (`/api/categories`)\n- Customers API (`/api/customers`)\n- Orders API (`/api/orders`)\n\nYou can use the Swagger UI to explore the API and make test requests directly from your browser.\n\n## Network Connectivity Options\n\nThe POS application supports three connectivity modes:\n\n1. **WLAN**: Direct API access over HTTP(S)\n2. **Bluetooth**: Connection via Bluetooth bridge to API\n3. **Offline**: Cached data from service worker when no connection is available\n\nThe application automatically selects the best connectivity option based on availability.\n\n## Bluetooth Connectivity\n\nThe application can connect to a Bluetooth device using the Web Bluetooth API. In development mode, a mock Bluetooth bridge is provided using WebSockets. In production, the application can connect to a real Bluetooth device (like a Raspberry Pi running the included proxy).\n\n---\n\n## Getting Started with Create React App\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm start`\n\nRuns the app in the development mode.\\\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.\\\nYou will also see any lint errors in the console.\n\n### `npm test`\n\nLaunches the test runner in the interactive watch mode.\\\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n### `npm run build`\n\nBuilds the app for production to the `build` folder.\\\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.\\\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n### `npm run eject`\n\n**Note: this is a one-way operation. Once you `eject`, you can’t go back!**\n\nIf you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.\n\nInstead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.\n\nYou don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.\n\n## Learn More\n\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n\nTo learn React, check out the [React documentation](https://reactjs.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Fpos-pwa_with_bluetooth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrakmic%2Fpos-pwa_with_bluetooth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Fpos-pwa_with_bluetooth/lists"}