├── .editorconfig ├── .github └── workflows │ └── main.yml ├── README.md ├── css └── style.css ├── data └── sample.json ├── favicon.ico ├── img ├── beef-burger.png ├── choco-glaze-donut-peanut.png ├── choco-glaze-donut.png ├── cinnamon-roll.png ├── coffee-latte.png ├── croissant.png ├── ice-chocolate.png ├── ice-tea.png ├── matcha-latte.png ├── receipt-logo.png ├── red-glaze-donut.png ├── sandwich.png └── sawarma.png ├── index.html ├── js └── script.js └── sound ├── beep-29.mp3 └── button-21.mp3 /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*.{js,css,html}] 4 | indent_size = 2 5 | indent_style = space 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | end_of_line = lf -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build and Deploy 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | build-and-deploy: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout 🛎️ 11 | uses: actions/checkout@v2.3.1 12 | - name: Deploy 🚀 13 | uses: JamesIves/github-pages-deploy-action@4.1.1 14 | with: 15 | branch: gh-pages # The branch the action should deploy to. 16 | folder: "." # The folder the action should deploy. 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | TAILWIND POS 2 | ============ 3 | 4 |  5 | 6 | Tailwind POS is a POS (Point of Sales) application built with [Tailwind.css](https://tailwindcss.com) and [Alpine.js](https://github.com/alpinejs/alpine/). I create this application in order to exercise myself to build web application in "traditional" way, without any module bundler/build tools such as webpack, rollup, postcss, etc. So yes, it load tailwind.css and alpine.js via CDN. 7 | 8 | You can view the demo at [https://www.emsifa.com/tailwind-pos/](https://www.emsifa.com/tailwind-pos/). 9 | 10 | ## Attribution 11 | 12 | Sample food photos in this application are downloaded from freepik.com accounts listed below: 13 | 14 | * [topntp26](https://www.freepik.com/topntp26) 15 | * [mrsiraphol](https://www.freepik.com/mrsiraphol) 16 | * [jcomp](https://www.freepik.com/jcomp) 17 | * [timolina](https://www.freepik.com/timolina) 18 | * [Racool_studio](https://www.freepik.com/Racool_studio) 19 | * [8photo](https://www.freepik.com/8photo) 20 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | /* width */ 2 | ::-webkit-scrollbar { 3 | width: 5px; 4 | } 5 | 6 | /* Track */ 7 | ::-webkit-scrollbar-track { 8 | background: #cfd8dc; 9 | border-radius: 5px; 10 | } 11 | 12 | /* Handle */ 13 | ::-webkit-scrollbar-thumb { 14 | background: #b0bec5; 15 | border-radius: 5px; 16 | } 17 | 18 | /* Handle on hover */ 19 | ::-webkit-scrollbar-thumb:hover { 20 | background: #90a4ae; 21 | } 22 | 23 | .bg-cyan-50, .hover\:bg-cyan-50:hover { 24 | background-color: #e0f7fa; 25 | } 26 | .bg-cyan-100, .hover\:bg-cyan-100:hover { 27 | background-color: #b2ebf2; 28 | } 29 | .bg-cyan-200, .hover\:bg-cyan-200:hover { 30 | background-color: #80deea; 31 | } 32 | .bg-cyan-300, .hover\:bg-cyan-300:hover { 33 | background-color: #4dd0e1; 34 | } 35 | .bg-cyan-400, .hover\:bg-cyan-400:hover { 36 | background-color: #26c6da; 37 | } 38 | .bg-cyan-500, .hover\:bg-cyan-500:hover { 39 | background-color: #00bcd4; 40 | } 41 | .bg-cyan-600, .hover\:bg-cyan-600:hover { 42 | background-color: #00acc1; 43 | } 44 | .bg-cyan-700, .hover\:bg-cyan-700:hover { 45 | background-color: #0097a7; 46 | } 47 | .bg-cyan-800, .hover\:bg-cyan-800:hover { 48 | background-color: #00838f; 49 | } 50 | .bg-cyan-900, .hover\:bg-cyan-900:hover { 51 | background-color: #006064; 52 | } 53 | 54 | 55 | .text-cyan-50, .hover\:text-cyan-50:hover { 56 | color: #e0f7fa; 57 | } 58 | .text-cyan-100, .hover\:text-cyan-100:hover { 59 | color: #b2ebf2; 60 | } 61 | .text-cyan-200, .hover\:text-cyan-200:hover { 62 | color: #80deea; 63 | } 64 | .text-cyan-300, .hover\:text-cyan-300:hover { 65 | color: #4dd0e1; 66 | } 67 | .text-cyan-400, .hover\:text-cyan-400:hover { 68 | color: #26c6da; 69 | } 70 | .text-cyan-500, .hover\:text-cyan-500:hover { 71 | color: #00bcd4; 72 | } 73 | .text-cyan-600, .hover\:text-cyan-600:hover { 74 | color: #00acc1; 75 | } 76 | .text-cyan-700, .hover\:text-cyan-700:hover { 77 | color: #0097a7; 78 | } 79 | .text-cyan-800, .hover\:text-cyan-800:hover { 80 | color: #00838f; 81 | } 82 | .text-cyan-900, .hover\:text-cyan-900:hover { 83 | color: #006064; 84 | } 85 | 86 | .bg-blue-gray-50, .hover\:bg-blue-gray-50:hover { 87 | background-color: #eceff1; 88 | } 89 | .bg-blue-gray-100, .hover\:bg-blue-gray-100:hover { 90 | background-color: #cfd8dc; 91 | } 92 | .bg-blue-gray-200, .hover\:bg-blue-gray-200:hover { 93 | background-color: #b0bec5; 94 | } 95 | .bg-blue-gray-300, .hover\:bg-blue-gray-300:hover { 96 | background-color: #90a4ae; 97 | } 98 | .bg-blue-gray-400, .hover\:bg-blue-gray-400:hover { 99 | background-color: #78909c; 100 | } 101 | .bg-blue-gray-500, .hover\:bg-blue-gray-500:hover { 102 | background-color: #607d8b; 103 | } 104 | .bg-blue-gray-600, .hover\:bg-blue-gray-600:hover { 105 | background-color: #546e7a; 106 | } 107 | .bg-blue-gray-700, .hover\:bg-blue-gray-700:hover { 108 | background-color: #455a64; 109 | } 110 | .bg-blue-gray-800, .hover\:bg-blue-gray-800:hover { 111 | background-color: #37474f; 112 | } 113 | .bg-blue-gray-900, .hover\:bg-blue-gray-900:hover { 114 | background-color: #263238; 115 | } 116 | 117 | .text-blue-gray-50, .hover\:text-blue-gray-50:hover { 118 | color: #eceff1; 119 | } 120 | .text-blue-gray-100, .hover\:text-blue-gray-100:hover { 121 | color: #cfd8dc; 122 | } 123 | .text-blue-gray-200, .hover\:text-blue-gray-200:hover { 124 | color: #b0bec5; 125 | } 126 | .text-blue-gray-300, .hover\:text-blue-gray-300:hover { 127 | color: #90a4ae; 128 | } 129 | .text-blue-gray-400, .hover\:text-blue-gray-400:hover { 130 | color: #78909c; 131 | } 132 | .text-blue-gray-500, .hover\:text-blue-gray-500:hover { 133 | color: #607d8b; 134 | } 135 | .text-blue-gray-600, .hover\:text-blue-gray-600:hover { 136 | color: #546e7a; 137 | } 138 | .text-blue-gray-700, .hover\:text-blue-gray-700:hover { 139 | color: #455a64; 140 | } 141 | .text-blue-gray-800, .hover\:text-blue-gray-800:hover { 142 | color: #37474f; 143 | } 144 | .text-blue-gray-900, .hover\:text-blue-gray-900:hover { 145 | color: #263238; 146 | } 147 | .bg-teal-50, .hover\:bg-teal-50:hover { 148 | background-color: #e0f2f1; 149 | } 150 | .bg-teal-100, .hover\:bg-teal-100:hover { 151 | background-color: #b2dfdb; 152 | } 153 | .bg-teal-200, .hover\:bg-teal-200:hover { 154 | background-color: #80cbc4; 155 | } 156 | .bg-teal-300, .hover\:bg-teal-300:hover { 157 | background-color: #4db6ac; 158 | } 159 | .bg-teal-400, .hover\:bg-teal-400:hover { 160 | background-color: #26a69a; 161 | } 162 | .bg-teal-500, .hover\:bg-teal-500:hover { 163 | background-color: #009688; 164 | } 165 | .bg-teal-600, .hover\:bg-teal-600:hover { 166 | background-color: #00897b; 167 | } 168 | .bg-teal-700, .hover\:bg-teal-700:hover { 169 | background-color: #00796b; 170 | } 171 | .bg-teal-800, .hover\:bg-teal-800:hover { 172 | background-color: #00695c; 173 | } 174 | .bg-teal-900, .hover\:bg-teal-900:hover { 175 | background-color: #004d40; 176 | } 177 | 178 | .text-teal-50, .hover\:text-teal-50:hover { 179 | color: #e0f2f1; 180 | } 181 | .text-teal-100, .hover\:text-teal-100:hover { 182 | color: #b2dfdb; 183 | } 184 | .text-teal-200, .hover\:text-teal-200:hover { 185 | color: #80cbc4; 186 | } 187 | .text-teal-300, .hover\:text-teal-300:hover { 188 | color: #4db6ac; 189 | } 190 | .text-teal-400, .hover\:text-teal-400:hover { 191 | color: #26a69a; 192 | } 193 | .text-teal-500, .hover\:text-teal-500:hover { 194 | color: #009688; 195 | } 196 | .text-teal-600, .hover\:text-teal-600:hover { 197 | color: #00897b; 198 | } 199 | .text-teal-700, .hover\:text-teal-700:hover { 200 | color: #00796b; 201 | } 202 | .text-teal-800, .hover\:text-teal-800:hover { 203 | color: #00695c; 204 | } 205 | .text-teal-900, .hover\:text-teal-900:hover { 206 | color: #004d40; 207 | } 208 | 209 | .nowrap { 210 | white-space: nowrap; 211 | } 212 | 213 | .glass { 214 | background-color: rgba(100, 120, 130, .6); 215 | backdrop-filter: blur(10px); 216 | } 217 | 218 | table td { 219 | vertical-align: top; 220 | } 221 | 222 | #receipt-content { 223 | max-height: 70vh; 224 | } 225 | 226 | @media print { 227 | .hide-print { 228 | display: none !important; 229 | } 230 | .print-area { 231 | display: block; 232 | } 233 | } 234 | -------------------------------------------------------------------------------- /data/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "products": [ 3 | { 4 | "id": 1, 5 | "name": "Beef Burger", 6 | "price": 45000, 7 | "image": "img/beef-burger.png", 8 | "options": null 9 | }, 10 | { 11 | "id": 2, 12 | "name": "Sandwich", 13 | "price": 32000, 14 | "image": "img/sandwich.png", 15 | "options": null 16 | }, 17 | { 18 | "id": 3, 19 | "name": "Sawarma", 20 | "price": 30000, 21 | "image": "img/sawarma.png", 22 | "options": null 23 | }, 24 | { 25 | "id": 4, 26 | "name": "Croissant", 27 | "price": 16000, 28 | "image": "img/croissant.png", 29 | "options": null 30 | }, 31 | { 32 | "id": 5, 33 | "name": "Cinnamon Roll", 34 | "price": 20000, 35 | "image": "img/cinnamon-roll.png", 36 | "options": null 37 | }, 38 | { 39 | "id": 6, 40 | "name": "Choco Glaze Donut with Peanut", 41 | "price": 10000, 42 | "image": "img/choco-glaze-donut-peanut.png", 43 | "options": null 44 | }, 45 | { 46 | "id": 7, 47 | "name": "Choco Glazed Donut", 48 | "price": 10000, 49 | "image": "img/choco-glaze-donut.png", 50 | "options": null 51 | }, 52 | { 53 | "id": 8, 54 | "name": "Red Glazed Donut", 55 | "price": 10000, 56 | "image": "img/red-glaze-donut.png", 57 | "options": null 58 | }, 59 | { 60 | "id": 9, 61 | "name": "Iced Coffee Latte", 62 | "price": 25000, 63 | "image": "img/coffee-latte.png", 64 | "options": null 65 | }, 66 | { 67 | "id": 10, 68 | "name": "Iced Chocolate", 69 | "price": 20000, 70 | "image": "img/ice-chocolate.png", 71 | "options": null 72 | }, 73 | { 74 | "id": 11, 75 | "name": "Iced Tea", 76 | "price": 15000, 77 | "image": "img/ice-tea.png", 78 | "options": null 79 | }, 80 | { 81 | "id": 12, 82 | "name": "Iced Matcha Latte", 83 | "price": 22000, 84 | "image": "img/matcha-latte.png", 85 | "options": null 86 | } 87 | ] 88 | } -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/favicon.ico -------------------------------------------------------------------------------- /img/beef-burger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/beef-burger.png -------------------------------------------------------------------------------- /img/choco-glaze-donut-peanut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/choco-glaze-donut-peanut.png -------------------------------------------------------------------------------- /img/choco-glaze-donut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/choco-glaze-donut.png -------------------------------------------------------------------------------- /img/cinnamon-roll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/cinnamon-roll.png -------------------------------------------------------------------------------- /img/coffee-latte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/coffee-latte.png -------------------------------------------------------------------------------- /img/croissant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/croissant.png -------------------------------------------------------------------------------- /img/ice-chocolate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/ice-chocolate.png -------------------------------------------------------------------------------- /img/ice-tea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/ice-tea.png -------------------------------------------------------------------------------- /img/matcha-latte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/matcha-latte.png -------------------------------------------------------------------------------- /img/receipt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/receipt-logo.png -------------------------------------------------------------------------------- /img/red-glaze-donut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/red-glaze-donut.png -------------------------------------------------------------------------------- /img/sandwich.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/sandwich.png -------------------------------------------------------------------------------- /img/sawarma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emsifa/tailwind-pos/fda7c6d89404a16395dd4441d1a8791a53980271/img/sawarma.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |