├── .dockerignore ├── .env.example ├── .gitattributes ├── .github └── workflows │ └── docker-publish.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── data └── tasks.json ├── favicon.svg ├── index.html ├── logo.png ├── package-lock.json ├── package.json ├── server.js ├── server.js.bak └── styles.css /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | data 4 | .env 5 | .git 6 | .gitignore 7 | README.md 8 | Dockerfile 9 | .dockerignore -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # Port for the server to listen on (default: 3000) 2 | PORT=3000 3 | 4 | # Optional PIN protection (4-10 digits) 5 | # DUMBKAN_PIN=1234 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Build and Push Docker Image 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - Rewrite 8 | - dev 9 | 10 | env: 11 | DOCKER_IMAGE: dumbwareio/dumbkan 12 | PLATFORMS: linux/amd64,linux/arm64 13 | 14 | jobs: 15 | build-and-push: 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | # Step 1: Check out the repository 20 | - name: Checkout code 21 | uses: actions/checkout@v3 22 | 23 | # Step 2: Log in to Docker Hub 24 | - name: Log in to Docker Hub 25 | uses: docker/login-action@v2 26 | with: 27 | username: ${{ secrets.DOCKER_USERNAME }} 28 | password: ${{ secrets.DOCKER_PASSWORD }} 29 | 30 | # Step 3: Set Docker tags 31 | - name: Set Docker tags 32 | id: docker_meta 33 | run: | 34 | if [ "${{ github.ref }}" = "refs/heads/main" ]; then 35 | echo "DOCKER_TAGS=${DOCKER_IMAGE}:latest" >> $GITHUB_ENV 36 | elif [ "${{ github.ref }}" = "refs/heads/Rewrite" ]; then 37 | echo "DOCKER_TAGS=${DOCKER_IMAGE}:rewrite" >> $GITHUB_ENV 38 | elif [ "${{ github.ref }}" = "refs/heads/dev" ]; then 39 | # Generate timestamp in format YYYYMMDD-HHMMSS 40 | TIMESTAMP=$(date -u +"%Y%m%d-%H%M%S") 41 | # Set both the nightly tag and the timestamped nightly tag 42 | echo "DOCKER_TAGS=${DOCKER_IMAGE}:nightly,${DOCKER_IMAGE}:nightly-${TIMESTAMP}" >> $GITHUB_ENV 43 | fi 44 | 45 | # Step 4: Set up Docker Buildx 46 | - name: Set up Docker Buildx 47 | uses: docker/setup-buildx-action@v2 48 | 49 | # Step 5: Build and Push Docker Image 50 | - name: Build and Push Docker Image 51 | uses: docker/build-push-action@v3 52 | with: 53 | context: . 54 | push: true 55 | tags: ${{ env.DOCKER_TAGS }} 56 | platforms: ${{ env.PLATFORMS }} 57 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # vuepress v2.x temp and cache directory 104 | .temp 105 | .cache 106 | 107 | # Docusaurus cache and generated files 108 | .docusaurus 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | # TernJS port file 120 | .tern-port 121 | 122 | # Stores VSCode versions used for testing VSCode extensions 123 | .vscode-test 124 | 125 | # yarn v2 126 | .yarn/cache 127 | .yarn/unplugged 128 | .yarn/build-state.yml 129 | .yarn/install-state.gz 130 | .pnp.* 131 | 132 | /dumbdata/ 133 | .DS_Store 134 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine 2 | 3 | WORKDIR /app 4 | 5 | COPY package*.json ./ 6 | 7 | RUN npm install --production 8 | 9 | COPY . . 10 | 11 | ENV PORT=3000 12 | 13 | EXPOSE 3000 14 | 15 | CMD ["node", "server.js"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DumbKan - Simple Kanban Board 2 | 3 | A lightweight, mobile-friendly Kanban board application for managing tasks and projects. Built with vanilla JavaScript and Node.js. 4 | 5 | ![dumbkan](https://github.com/user-attachments/assets/80d32ace-a8b9-476b-a235-df857c1d0c36) 6 | 7 | 8 | ## Features 9 | 10 | ### 🎯 Task Management 11 | - Create, edit, and delete tasks easily 12 | - Double-click (desktop) or double-tap (mobile) to edit tasks 13 | - Drag and drop tasks between columns 14 | - Smooth animations and visual feedback during interactions 15 | 16 | ### 📱 Mobile-Optimized 17 | - Responsive design that works on all devices 18 | - Touch-friendly interface 19 | - Double-tap to edit tasks on mobile 20 | - Easy task movement with touch gestures 21 | 22 | ### 📋 Board Management 23 | - Multiple boards support (Work, Personal, etc.) 24 | - Create and delete boards 25 | - Switch between boards instantly 26 | - Persistent board state 27 | 28 | ### 📊 Column Management 29 | - Add new columns for custom workflows 30 | - Edit column names inline 31 | - Remove columns with confirmation 32 | - Drag tasks between columns 33 | 34 | ### 🎨 Theme Support 35 | - Light and dark mode 36 | - System theme detection 37 | - Smooth theme transitions 38 | - Theme persistence across sessions 39 | 40 | ### 💾 Data Persistence 41 | - Automatic saving of changes 42 | - Persistent across page refreshes 43 | - JSON-based storage 44 | - No database required 45 | 46 | ## Environment Variables 47 | 48 | | Variable | Description | Default | Required | 49 | |----------|-------------|---------|----------| 50 | | PORT | Port for the server to listen on | 3000 | No | 51 | | DUMBKAN_PIN | PIN protection (4-10 digits) | - | No | 52 | 53 | ## PIN Protection 54 | When `DUMBKAN_PIN` is set, the app requires PIN verification before accessing or modifying boards. The PIN must be 4-10 digits long. 55 | 56 | ## Data Persistence 57 | Task data is stored in `/app/data/tasks.json`. When using Docker, mount this directory as a volume to persist data between container restarts. 58 | 59 | ## Getting Started 60 | 61 | ### Option 1: Docker (Recommended) 62 | 1. Pull the image: 63 | ```bash 64 | docker pull dumbwareio/dumbkan:latest 65 | ``` 66 | 67 | 2. Run the container: 68 | ```bash 69 | docker run -d -p 3000:3000 -v $(pwd)/data:/app/data --env-file .env dumbwareio/dumbkan:latest 70 | ``` 71 | 72 | 3. Open your browser and navigate to: 73 | ``` 74 | http://localhost:3000 75 | ``` 76 | 77 | ### Option 2: Local Installation 78 | 1. Clone the repository: 79 | ```bash 80 | git clone https://github.com/dumbwareio/dumbkan.git 81 | cd dumbkan 82 | ``` 83 | 84 | 2. Install dependencies: 85 | ```bash 86 | npm install 87 | ``` 88 | 89 | 3. Start the server: 90 | ```bash 91 | npm start 92 | ``` 93 | 94 | 4. Open your browser and navigate to: 95 | ``` 96 | http://localhost:3000 97 | ``` 98 | 99 | ## Usage Guide 100 | 101 | ### Managing Tasks 102 | - Click "Add Task" to create a new task 103 | - Double-click (or double-tap on mobile) to edit a task 104 | - Drag and drop tasks between columns 105 | - Delete tasks using the delete button in the edit modal 106 | 107 | ### Working with Boards 108 | - Click the board name to open the board selector 109 | - Use "Manage Boards" to add or remove boards 110 | - Each board maintains its own columns and tasks 111 | 112 | ### Customizing Columns 113 | - Click "Add Column" to create a new column 114 | - Click a column name to edit it 115 | - Use the remove icon (×) to delete a column 116 | 117 | ### Theme Switching 118 | - Click the sun/moon icon to toggle between light and dark modes 119 | - Theme automatically syncs with system preferences 120 | - Theme choice persists across sessions 121 | 122 | ## Technical Details 123 | 124 | - Built with vanilla JavaScript - no frameworks 125 | - Node.js backend with Express 126 | - File-based JSON storage 127 | - Responsive CSS with modern features 128 | - Mobile-first design approach 129 | 130 | ## Contributing 131 | 132 | Feel free to submit issues and enhancement requests! 133 | -------------------------------------------------------------------------------- /data/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "boards": { 3 | "work": { 4 | "name": "Work", 5 | "columns": { 6 | "todo": { 7 | "name": "To Do", 8 | "tasks": [] 9 | }, 10 | "doing": { 11 | "name": "Doing", 12 | "tasks": [] 13 | }, 14 | "done": { 15 | "name": "Done", 16 | "tasks": [] 17 | } 18 | } 19 | }, 20 | "personal": { 21 | "name": "Personal", 22 | "columns": { 23 | "column-1737820503477": { 24 | "name": "To Do", 25 | "tasks": [] 26 | }, 27 | "column-1737820504596": { 28 | "name": "Doing", 29 | "tasks": [] 30 | }, 31 | "column-1737820919397": { 32 | "name": "Done", 33 | "tasks": [] 34 | } 35 | } 36 | } 37 | }, 38 | "activeBoard": "personal" 39 | } -------------------------------------------------------------------------------- /favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DumbKan - Simple Kanban Board 7 | 8 | 9 | 10 |
11 |
12 |

DumbKan

13 | 14 |
15 | 16 |
17 |
18 |
19 |

To Do

20 |
21 | 22 |
23 | 24 |
25 |

Doing

26 |
27 | 28 |
29 | 30 |
31 |

Done

32 |
33 | 34 |
35 |
36 |
37 | 38 | 39 |
40 | 41 | 42 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DumbWareio/DumbKan/5e009d5c2543a8a24cef134487d36d4b390ab943/logo.png -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dumbkan", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "dumbkan", 9 | "version": "1.0.0", 10 | "dependencies": { 11 | "cookie-parser": "^1.4.7", 12 | "dotenv": "^16.3.1", 13 | "express": "^4.18.2" 14 | } 15 | }, 16 | "node_modules/accepts": { 17 | "version": "1.3.8", 18 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 19 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 20 | "dependencies": { 21 | "mime-types": "~2.1.34", 22 | "negotiator": "0.6.3" 23 | }, 24 | "engines": { 25 | "node": ">= 0.6" 26 | } 27 | }, 28 | "node_modules/array-flatten": { 29 | "version": "1.1.1", 30 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 31 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" 32 | }, 33 | "node_modules/body-parser": { 34 | "version": "1.20.3", 35 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", 36 | "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", 37 | "dependencies": { 38 | "bytes": "3.1.2", 39 | "content-type": "~1.0.5", 40 | "debug": "2.6.9", 41 | "depd": "2.0.0", 42 | "destroy": "1.2.0", 43 | "http-errors": "2.0.0", 44 | "iconv-lite": "0.4.24", 45 | "on-finished": "2.4.1", 46 | "qs": "6.13.0", 47 | "raw-body": "2.5.2", 48 | "type-is": "~1.6.18", 49 | "unpipe": "1.0.0" 50 | }, 51 | "engines": { 52 | "node": ">= 0.8", 53 | "npm": "1.2.8000 || >= 1.4.16" 54 | } 55 | }, 56 | "node_modules/bytes": { 57 | "version": "3.1.2", 58 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 59 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 60 | "engines": { 61 | "node": ">= 0.8" 62 | } 63 | }, 64 | "node_modules/call-bind-apply-helpers": { 65 | "version": "1.0.1", 66 | "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", 67 | "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", 68 | "dependencies": { 69 | "es-errors": "^1.3.0", 70 | "function-bind": "^1.1.2" 71 | }, 72 | "engines": { 73 | "node": ">= 0.4" 74 | } 75 | }, 76 | "node_modules/call-bound": { 77 | "version": "1.0.3", 78 | "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", 79 | "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", 80 | "dependencies": { 81 | "call-bind-apply-helpers": "^1.0.1", 82 | "get-intrinsic": "^1.2.6" 83 | }, 84 | "engines": { 85 | "node": ">= 0.4" 86 | }, 87 | "funding": { 88 | "url": "https://github.com/sponsors/ljharb" 89 | } 90 | }, 91 | "node_modules/content-disposition": { 92 | "version": "0.5.4", 93 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 94 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 95 | "dependencies": { 96 | "safe-buffer": "5.2.1" 97 | }, 98 | "engines": { 99 | "node": ">= 0.6" 100 | } 101 | }, 102 | "node_modules/content-type": { 103 | "version": "1.0.5", 104 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 105 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 106 | "engines": { 107 | "node": ">= 0.6" 108 | } 109 | }, 110 | "node_modules/cookie": { 111 | "version": "0.7.1", 112 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", 113 | "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", 114 | "engines": { 115 | "node": ">= 0.6" 116 | } 117 | }, 118 | "node_modules/cookie-parser": { 119 | "version": "1.4.7", 120 | "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz", 121 | "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==", 122 | "license": "MIT", 123 | "dependencies": { 124 | "cookie": "0.7.2", 125 | "cookie-signature": "1.0.6" 126 | }, 127 | "engines": { 128 | "node": ">= 0.8.0" 129 | } 130 | }, 131 | "node_modules/cookie-parser/node_modules/cookie": { 132 | "version": "0.7.2", 133 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", 134 | "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", 135 | "license": "MIT", 136 | "engines": { 137 | "node": ">= 0.6" 138 | } 139 | }, 140 | "node_modules/cookie-signature": { 141 | "version": "1.0.6", 142 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 143 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" 144 | }, 145 | "node_modules/debug": { 146 | "version": "2.6.9", 147 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 148 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 149 | "dependencies": { 150 | "ms": "2.0.0" 151 | } 152 | }, 153 | "node_modules/depd": { 154 | "version": "2.0.0", 155 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 156 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 157 | "engines": { 158 | "node": ">= 0.8" 159 | } 160 | }, 161 | "node_modules/destroy": { 162 | "version": "1.2.0", 163 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 164 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 165 | "engines": { 166 | "node": ">= 0.8", 167 | "npm": "1.2.8000 || >= 1.4.16" 168 | } 169 | }, 170 | "node_modules/dotenv": { 171 | "version": "16.4.7", 172 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", 173 | "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", 174 | "engines": { 175 | "node": ">=12" 176 | }, 177 | "funding": { 178 | "url": "https://dotenvx.com" 179 | } 180 | }, 181 | "node_modules/dunder-proto": { 182 | "version": "1.0.1", 183 | "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", 184 | "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", 185 | "dependencies": { 186 | "call-bind-apply-helpers": "^1.0.1", 187 | "es-errors": "^1.3.0", 188 | "gopd": "^1.2.0" 189 | }, 190 | "engines": { 191 | "node": ">= 0.4" 192 | } 193 | }, 194 | "node_modules/ee-first": { 195 | "version": "1.1.1", 196 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 197 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 198 | }, 199 | "node_modules/encodeurl": { 200 | "version": "2.0.0", 201 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", 202 | "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", 203 | "engines": { 204 | "node": ">= 0.8" 205 | } 206 | }, 207 | "node_modules/es-define-property": { 208 | "version": "1.0.1", 209 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", 210 | "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", 211 | "engines": { 212 | "node": ">= 0.4" 213 | } 214 | }, 215 | "node_modules/es-errors": { 216 | "version": "1.3.0", 217 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 218 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 219 | "engines": { 220 | "node": ">= 0.4" 221 | } 222 | }, 223 | "node_modules/es-object-atoms": { 224 | "version": "1.1.1", 225 | "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", 226 | "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", 227 | "dependencies": { 228 | "es-errors": "^1.3.0" 229 | }, 230 | "engines": { 231 | "node": ">= 0.4" 232 | } 233 | }, 234 | "node_modules/escape-html": { 235 | "version": "1.0.3", 236 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 237 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 238 | }, 239 | "node_modules/etag": { 240 | "version": "1.8.1", 241 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 242 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 243 | "engines": { 244 | "node": ">= 0.6" 245 | } 246 | }, 247 | "node_modules/express": { 248 | "version": "4.21.2", 249 | "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", 250 | "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", 251 | "dependencies": { 252 | "accepts": "~1.3.8", 253 | "array-flatten": "1.1.1", 254 | "body-parser": "1.20.3", 255 | "content-disposition": "0.5.4", 256 | "content-type": "~1.0.4", 257 | "cookie": "0.7.1", 258 | "cookie-signature": "1.0.6", 259 | "debug": "2.6.9", 260 | "depd": "2.0.0", 261 | "encodeurl": "~2.0.0", 262 | "escape-html": "~1.0.3", 263 | "etag": "~1.8.1", 264 | "finalhandler": "1.3.1", 265 | "fresh": "0.5.2", 266 | "http-errors": "2.0.0", 267 | "merge-descriptors": "1.0.3", 268 | "methods": "~1.1.2", 269 | "on-finished": "2.4.1", 270 | "parseurl": "~1.3.3", 271 | "path-to-regexp": "0.1.12", 272 | "proxy-addr": "~2.0.7", 273 | "qs": "6.13.0", 274 | "range-parser": "~1.2.1", 275 | "safe-buffer": "5.2.1", 276 | "send": "0.19.0", 277 | "serve-static": "1.16.2", 278 | "setprototypeof": "1.2.0", 279 | "statuses": "2.0.1", 280 | "type-is": "~1.6.18", 281 | "utils-merge": "1.0.1", 282 | "vary": "~1.1.2" 283 | }, 284 | "engines": { 285 | "node": ">= 0.10.0" 286 | }, 287 | "funding": { 288 | "type": "opencollective", 289 | "url": "https://opencollective.com/express" 290 | } 291 | }, 292 | "node_modules/finalhandler": { 293 | "version": "1.3.1", 294 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", 295 | "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", 296 | "dependencies": { 297 | "debug": "2.6.9", 298 | "encodeurl": "~2.0.0", 299 | "escape-html": "~1.0.3", 300 | "on-finished": "2.4.1", 301 | "parseurl": "~1.3.3", 302 | "statuses": "2.0.1", 303 | "unpipe": "~1.0.0" 304 | }, 305 | "engines": { 306 | "node": ">= 0.8" 307 | } 308 | }, 309 | "node_modules/forwarded": { 310 | "version": "0.2.0", 311 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 312 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 313 | "engines": { 314 | "node": ">= 0.6" 315 | } 316 | }, 317 | "node_modules/fresh": { 318 | "version": "0.5.2", 319 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 320 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 321 | "engines": { 322 | "node": ">= 0.6" 323 | } 324 | }, 325 | "node_modules/function-bind": { 326 | "version": "1.1.2", 327 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 328 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 329 | "funding": { 330 | "url": "https://github.com/sponsors/ljharb" 331 | } 332 | }, 333 | "node_modules/get-intrinsic": { 334 | "version": "1.2.7", 335 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", 336 | "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", 337 | "dependencies": { 338 | "call-bind-apply-helpers": "^1.0.1", 339 | "es-define-property": "^1.0.1", 340 | "es-errors": "^1.3.0", 341 | "es-object-atoms": "^1.0.0", 342 | "function-bind": "^1.1.2", 343 | "get-proto": "^1.0.0", 344 | "gopd": "^1.2.0", 345 | "has-symbols": "^1.1.0", 346 | "hasown": "^2.0.2", 347 | "math-intrinsics": "^1.1.0" 348 | }, 349 | "engines": { 350 | "node": ">= 0.4" 351 | }, 352 | "funding": { 353 | "url": "https://github.com/sponsors/ljharb" 354 | } 355 | }, 356 | "node_modules/get-proto": { 357 | "version": "1.0.1", 358 | "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", 359 | "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", 360 | "dependencies": { 361 | "dunder-proto": "^1.0.1", 362 | "es-object-atoms": "^1.0.0" 363 | }, 364 | "engines": { 365 | "node": ">= 0.4" 366 | } 367 | }, 368 | "node_modules/gopd": { 369 | "version": "1.2.0", 370 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", 371 | "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", 372 | "engines": { 373 | "node": ">= 0.4" 374 | }, 375 | "funding": { 376 | "url": "https://github.com/sponsors/ljharb" 377 | } 378 | }, 379 | "node_modules/has-symbols": { 380 | "version": "1.1.0", 381 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", 382 | "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", 383 | "engines": { 384 | "node": ">= 0.4" 385 | }, 386 | "funding": { 387 | "url": "https://github.com/sponsors/ljharb" 388 | } 389 | }, 390 | "node_modules/hasown": { 391 | "version": "2.0.2", 392 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 393 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 394 | "dependencies": { 395 | "function-bind": "^1.1.2" 396 | }, 397 | "engines": { 398 | "node": ">= 0.4" 399 | } 400 | }, 401 | "node_modules/http-errors": { 402 | "version": "2.0.0", 403 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 404 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 405 | "dependencies": { 406 | "depd": "2.0.0", 407 | "inherits": "2.0.4", 408 | "setprototypeof": "1.2.0", 409 | "statuses": "2.0.1", 410 | "toidentifier": "1.0.1" 411 | }, 412 | "engines": { 413 | "node": ">= 0.8" 414 | } 415 | }, 416 | "node_modules/iconv-lite": { 417 | "version": "0.4.24", 418 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 419 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 420 | "dependencies": { 421 | "safer-buffer": ">= 2.1.2 < 3" 422 | }, 423 | "engines": { 424 | "node": ">=0.10.0" 425 | } 426 | }, 427 | "node_modules/inherits": { 428 | "version": "2.0.4", 429 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 430 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 431 | }, 432 | "node_modules/ipaddr.js": { 433 | "version": "1.9.1", 434 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 435 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 436 | "engines": { 437 | "node": ">= 0.10" 438 | } 439 | }, 440 | "node_modules/math-intrinsics": { 441 | "version": "1.1.0", 442 | "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", 443 | "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", 444 | "engines": { 445 | "node": ">= 0.4" 446 | } 447 | }, 448 | "node_modules/media-typer": { 449 | "version": "0.3.0", 450 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 451 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 452 | "engines": { 453 | "node": ">= 0.6" 454 | } 455 | }, 456 | "node_modules/merge-descriptors": { 457 | "version": "1.0.3", 458 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", 459 | "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", 460 | "funding": { 461 | "url": "https://github.com/sponsors/sindresorhus" 462 | } 463 | }, 464 | "node_modules/methods": { 465 | "version": "1.1.2", 466 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 467 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 468 | "engines": { 469 | "node": ">= 0.6" 470 | } 471 | }, 472 | "node_modules/mime": { 473 | "version": "1.6.0", 474 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 475 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 476 | "bin": { 477 | "mime": "cli.js" 478 | }, 479 | "engines": { 480 | "node": ">=4" 481 | } 482 | }, 483 | "node_modules/mime-db": { 484 | "version": "1.52.0", 485 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 486 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 487 | "engines": { 488 | "node": ">= 0.6" 489 | } 490 | }, 491 | "node_modules/mime-types": { 492 | "version": "2.1.35", 493 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 494 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 495 | "dependencies": { 496 | "mime-db": "1.52.0" 497 | }, 498 | "engines": { 499 | "node": ">= 0.6" 500 | } 501 | }, 502 | "node_modules/ms": { 503 | "version": "2.0.0", 504 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 505 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 506 | }, 507 | "node_modules/negotiator": { 508 | "version": "0.6.3", 509 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 510 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 511 | "engines": { 512 | "node": ">= 0.6" 513 | } 514 | }, 515 | "node_modules/object-inspect": { 516 | "version": "1.13.3", 517 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", 518 | "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", 519 | "engines": { 520 | "node": ">= 0.4" 521 | }, 522 | "funding": { 523 | "url": "https://github.com/sponsors/ljharb" 524 | } 525 | }, 526 | "node_modules/on-finished": { 527 | "version": "2.4.1", 528 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 529 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 530 | "dependencies": { 531 | "ee-first": "1.1.1" 532 | }, 533 | "engines": { 534 | "node": ">= 0.8" 535 | } 536 | }, 537 | "node_modules/parseurl": { 538 | "version": "1.3.3", 539 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 540 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 541 | "engines": { 542 | "node": ">= 0.8" 543 | } 544 | }, 545 | "node_modules/path-to-regexp": { 546 | "version": "0.1.12", 547 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", 548 | "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" 549 | }, 550 | "node_modules/proxy-addr": { 551 | "version": "2.0.7", 552 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 553 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 554 | "dependencies": { 555 | "forwarded": "0.2.0", 556 | "ipaddr.js": "1.9.1" 557 | }, 558 | "engines": { 559 | "node": ">= 0.10" 560 | } 561 | }, 562 | "node_modules/qs": { 563 | "version": "6.13.0", 564 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", 565 | "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", 566 | "dependencies": { 567 | "side-channel": "^1.0.6" 568 | }, 569 | "engines": { 570 | "node": ">=0.6" 571 | }, 572 | "funding": { 573 | "url": "https://github.com/sponsors/ljharb" 574 | } 575 | }, 576 | "node_modules/range-parser": { 577 | "version": "1.2.1", 578 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 579 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 580 | "engines": { 581 | "node": ">= 0.6" 582 | } 583 | }, 584 | "node_modules/raw-body": { 585 | "version": "2.5.2", 586 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", 587 | "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", 588 | "dependencies": { 589 | "bytes": "3.1.2", 590 | "http-errors": "2.0.0", 591 | "iconv-lite": "0.4.24", 592 | "unpipe": "1.0.0" 593 | }, 594 | "engines": { 595 | "node": ">= 0.8" 596 | } 597 | }, 598 | "node_modules/safe-buffer": { 599 | "version": "5.2.1", 600 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 601 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 602 | "funding": [ 603 | { 604 | "type": "github", 605 | "url": "https://github.com/sponsors/feross" 606 | }, 607 | { 608 | "type": "patreon", 609 | "url": "https://www.patreon.com/feross" 610 | }, 611 | { 612 | "type": "consulting", 613 | "url": "https://feross.org/support" 614 | } 615 | ] 616 | }, 617 | "node_modules/safer-buffer": { 618 | "version": "2.1.2", 619 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 620 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 621 | }, 622 | "node_modules/send": { 623 | "version": "0.19.0", 624 | "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", 625 | "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", 626 | "dependencies": { 627 | "debug": "2.6.9", 628 | "depd": "2.0.0", 629 | "destroy": "1.2.0", 630 | "encodeurl": "~1.0.2", 631 | "escape-html": "~1.0.3", 632 | "etag": "~1.8.1", 633 | "fresh": "0.5.2", 634 | "http-errors": "2.0.0", 635 | "mime": "1.6.0", 636 | "ms": "2.1.3", 637 | "on-finished": "2.4.1", 638 | "range-parser": "~1.2.1", 639 | "statuses": "2.0.1" 640 | }, 641 | "engines": { 642 | "node": ">= 0.8.0" 643 | } 644 | }, 645 | "node_modules/send/node_modules/encodeurl": { 646 | "version": "1.0.2", 647 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 648 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 649 | "engines": { 650 | "node": ">= 0.8" 651 | } 652 | }, 653 | "node_modules/send/node_modules/ms": { 654 | "version": "2.1.3", 655 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 656 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 657 | }, 658 | "node_modules/serve-static": { 659 | "version": "1.16.2", 660 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", 661 | "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", 662 | "dependencies": { 663 | "encodeurl": "~2.0.0", 664 | "escape-html": "~1.0.3", 665 | "parseurl": "~1.3.3", 666 | "send": "0.19.0" 667 | }, 668 | "engines": { 669 | "node": ">= 0.8.0" 670 | } 671 | }, 672 | "node_modules/setprototypeof": { 673 | "version": "1.2.0", 674 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 675 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 676 | }, 677 | "node_modules/side-channel": { 678 | "version": "1.1.0", 679 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", 680 | "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", 681 | "dependencies": { 682 | "es-errors": "^1.3.0", 683 | "object-inspect": "^1.13.3", 684 | "side-channel-list": "^1.0.0", 685 | "side-channel-map": "^1.0.1", 686 | "side-channel-weakmap": "^1.0.2" 687 | }, 688 | "engines": { 689 | "node": ">= 0.4" 690 | }, 691 | "funding": { 692 | "url": "https://github.com/sponsors/ljharb" 693 | } 694 | }, 695 | "node_modules/side-channel-list": { 696 | "version": "1.0.0", 697 | "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", 698 | "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", 699 | "dependencies": { 700 | "es-errors": "^1.3.0", 701 | "object-inspect": "^1.13.3" 702 | }, 703 | "engines": { 704 | "node": ">= 0.4" 705 | }, 706 | "funding": { 707 | "url": "https://github.com/sponsors/ljharb" 708 | } 709 | }, 710 | "node_modules/side-channel-map": { 711 | "version": "1.0.1", 712 | "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", 713 | "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", 714 | "dependencies": { 715 | "call-bound": "^1.0.2", 716 | "es-errors": "^1.3.0", 717 | "get-intrinsic": "^1.2.5", 718 | "object-inspect": "^1.13.3" 719 | }, 720 | "engines": { 721 | "node": ">= 0.4" 722 | }, 723 | "funding": { 724 | "url": "https://github.com/sponsors/ljharb" 725 | } 726 | }, 727 | "node_modules/side-channel-weakmap": { 728 | "version": "1.0.2", 729 | "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", 730 | "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", 731 | "dependencies": { 732 | "call-bound": "^1.0.2", 733 | "es-errors": "^1.3.0", 734 | "get-intrinsic": "^1.2.5", 735 | "object-inspect": "^1.13.3", 736 | "side-channel-map": "^1.0.1" 737 | }, 738 | "engines": { 739 | "node": ">= 0.4" 740 | }, 741 | "funding": { 742 | "url": "https://github.com/sponsors/ljharb" 743 | } 744 | }, 745 | "node_modules/statuses": { 746 | "version": "2.0.1", 747 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 748 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 749 | "engines": { 750 | "node": ">= 0.8" 751 | } 752 | }, 753 | "node_modules/toidentifier": { 754 | "version": "1.0.1", 755 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 756 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 757 | "engines": { 758 | "node": ">=0.6" 759 | } 760 | }, 761 | "node_modules/type-is": { 762 | "version": "1.6.18", 763 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 764 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 765 | "dependencies": { 766 | "media-typer": "0.3.0", 767 | "mime-types": "~2.1.24" 768 | }, 769 | "engines": { 770 | "node": ">= 0.6" 771 | } 772 | }, 773 | "node_modules/unpipe": { 774 | "version": "1.0.0", 775 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 776 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 777 | "engines": { 778 | "node": ">= 0.8" 779 | } 780 | }, 781 | "node_modules/utils-merge": { 782 | "version": "1.0.1", 783 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 784 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 785 | "engines": { 786 | "node": ">= 0.4.0" 787 | } 788 | }, 789 | "node_modules/vary": { 790 | "version": "1.1.2", 791 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 792 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 793 | "engines": { 794 | "node": ">= 0.8" 795 | } 796 | } 797 | } 798 | } 799 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dumbkan", 3 | "version": "1.0.0", 4 | "description": "A stupidly simple Kanban board", 5 | "main": "server.js", 6 | "scripts": { 7 | "start": "node server.js" 8 | }, 9 | "dependencies": { 10 | "cookie-parser": "^1.4.7", 11 | "dotenv": "^16.3.1", 12 | "express": "^4.18.2" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | require('dotenv').config(); 2 | const express = require('express'); 3 | const fs = require('fs').promises; 4 | const path = require('path'); 5 | const cookieParser = require('cookie-parser'); 6 | const app = express(); 7 | 8 | // Brute force protection setup 9 | const MAX_ATTEMPTS = 5; 10 | const LOCKOUT_TIME = 15 * 60 * 1000; // 15 minutes in milliseconds 11 | const loginAttempts = new Map(); 12 | 13 | // Reset attempts for an IP 14 | function resetAttempts(ip) { 15 | loginAttempts.delete(ip); 16 | } 17 | 18 | // Check if an IP is locked out 19 | function isLockedOut(ip) { 20 | const attempts = loginAttempts.get(ip); 21 | if (!attempts) return false; 22 | 23 | // If enough time has passed, reset attempts 24 | if (Date.now() - attempts.lastAttempt >= LOCKOUT_TIME) { 25 | resetAttempts(ip); 26 | return false; 27 | } 28 | 29 | return attempts.count >= MAX_ATTEMPTS; 30 | } 31 | 32 | // Record a failed attempt for an IP 33 | function recordAttempt(ip) { 34 | const attempts = loginAttempts.get(ip) || { count: 0, lastAttempt: 0 }; 35 | attempts.count++; 36 | attempts.lastAttempt = Date.now(); 37 | loginAttempts.set(ip, attempts); 38 | } 39 | 40 | // Clean up old lockouts periodically 41 | setInterval(() => { 42 | const now = Date.now(); 43 | for (const [ip, attempts] of loginAttempts.entries()) { 44 | if (now - attempts.lastAttempt >= LOCKOUT_TIME) { 45 | loginAttempts.delete(ip); 46 | } 47 | } 48 | }, LOCKOUT_TIME); 49 | 50 | app.use(express.json()); 51 | app.use(cookieParser()); 52 | 53 | // Ensure data directory and tasks.json exist 54 | async function initializeStorage() { 55 | try { 56 | await fs.mkdir('data').catch(() => {}); 57 | try { 58 | await fs.access('data/tasks.json'); 59 | } catch { 60 | // Initialize with default structure 61 | const defaultData = { 62 | boards: { 63 | work: { 64 | name: 'Work', 65 | columns: { 66 | todo: { name: 'To Do', tasks: [] }, 67 | doing: { name: 'Doing', tasks: [] }, 68 | done: { name: 'Done', tasks: [] } 69 | } 70 | }, 71 | personal: { 72 | name: 'Personal', 73 | columns: { 74 | todo: { name: 'To Do', tasks: [] }, 75 | doing: { name: 'Doing', tasks: [] }, 76 | done: { name: 'Done', tasks: [] } 77 | } 78 | } 79 | }, 80 | activeBoard: 'work' 81 | }; 82 | await fs.writeFile('data/tasks.json', JSON.stringify(defaultData, null, 2)); 83 | } 84 | } catch (error) { 85 | console.error('Error initializing storage:', error); 86 | } 87 | } 88 | 89 | // Initialize storage before starting server 90 | initializeStorage(); 91 | 92 | // HTML Template 93 | const html = ` 94 | 95 | 96 | 97 | 98 | DumbKan - Simple Kanban Board 99 | 1094 | 1095 | 1096 | 1111 | 1112 | 1131 | 1132 | 1152 | 1153 | 1175 | 1176 | 1192 | 1193 |
1194 |
1195 |
1196 |

DumbKan

1197 |
1198 | 1199 | 1205 |
1206 |
1207 | 1208 |
1209 |
1210 |
1211 |
1212 |

To Do

1213 |
1214 | 1215 |
1216 |
1217 |

Doing

1218 |
1219 | 1220 |
1221 |
1222 |

Done

1223 |
1224 | 1225 |
1226 | 1227 |
1228 |
1229 | 1230 |
1231 | 1232 | 2347 | 2348 | `; 2349 | 2350 | // PIN middleware 2351 | function requirePin(req, res, next) { 2352 | const pin = process.env.DUMBKAN_PIN; 2353 | if (!pin || pin.length < 4 || pin.length > 10) { 2354 | return next(); 2355 | } 2356 | 2357 | const providedPin = req.headers['x-pin'] || req.cookies.DUMBKAN_PIN; 2358 | if (providedPin !== pin) { 2359 | return res.status(401).json({ error: 'Invalid PIN' }); 2360 | } 2361 | next(); 2362 | } 2363 | 2364 | // PIN endpoints 2365 | app.get('/api/pin-required', (req, res) => { 2366 | const pin = process.env.DUMBKAN_PIN; 2367 | const required = pin && pin.length >= 4 && pin.length <= 10; 2368 | res.json({ 2369 | required, 2370 | length: required ? pin.length : 0 2371 | }); 2372 | }); 2373 | 2374 | app.post('/api/verify-pin', (req, res) => { 2375 | // If no PIN is set, authentication is successful 2376 | if (!process.env.DUMBKAN_PIN || process.env.DUMBKAN_PIN.trim() === '') { 2377 | return res.json({ success: true }); 2378 | } 2379 | 2380 | const ip = req.ip; 2381 | 2382 | // Check if IP is locked out 2383 | if (isLockedOut(ip)) { 2384 | const attempts = loginAttempts.get(ip); 2385 | const timeLeft = Math.ceil((LOCKOUT_TIME - (Date.now() - attempts.lastAttempt)) / 1000 / 60); 2386 | return res.status(429).json({ 2387 | error: `Too many attempts. Please try again in ${timeLeft} minutes.` 2388 | }); 2389 | } 2390 | 2391 | const { pin } = req.body; 2392 | 2393 | if (!pin || typeof pin !== 'string') { 2394 | return res.status(400).json({ error: 'Invalid PIN format' }); 2395 | } 2396 | 2397 | if (pin === process.env.DUMBKAN_PIN) { 2398 | // Reset attempts on successful login 2399 | resetAttempts(ip); 2400 | 2401 | // Set cookie and return success 2402 | res.cookie('DUMBKAN_PIN', pin, { 2403 | httpOnly: true, 2404 | secure: process.env.NODE_ENV === 'production', 2405 | sameSite: 'strict' 2406 | }); 2407 | res.json({ success: true }); 2408 | } else { 2409 | // Record failed attempt 2410 | recordAttempt(ip); 2411 | 2412 | const attempts = loginAttempts.get(ip); 2413 | const attemptsLeft = MAX_ATTEMPTS - attempts.count; 2414 | 2415 | res.status(401).json({ 2416 | error: 'Invalid PIN', 2417 | attemptsLeft: Math.max(0, attemptsLeft) 2418 | }); 2419 | } 2420 | }); 2421 | 2422 | // Routes 2423 | app.get('/', (req, res) => { 2424 | const pin = process.env.DUMBKAN_PIN; 2425 | if (!pin || pin.length < 4 || pin.length > 10) { 2426 | return res.send(html); 2427 | } 2428 | 2429 | const providedPin = req.headers['x-pin'] || req.cookies.DUMBKAN_PIN; 2430 | if (!providedPin || providedPin !== pin) { 2431 | return res.redirect('/login'); 2432 | } 2433 | 2434 | res.send(html); 2435 | }); 2436 | 2437 | app.get('/login', async (req, res) => { 2438 | const pin = process.env.DUMBKAN_PIN; 2439 | const isPinDisabled = !pin || pin.trim() === ''; 2440 | 2441 | if (isPinDisabled) { 2442 | return res.redirect('/'); 2443 | } 2444 | 2445 | const providedPin = req.headers['x-pin']; 2446 | if (providedPin === pin) { 2447 | return res.redirect('/'); 2448 | } 2449 | 2450 | // Send login page HTML 2451 | res.send(` 2452 | 2453 | 2454 | 2455 | 2456 | DumbKan 2457 | 2550 | 2551 | 2552 | 2561 | 2658 | 2659 | `); 2660 | }); 2661 | 2662 | app.get('/data/tasks.json', requirePin, async (_, res) => { 2663 | try { 2664 | const data = await fs.readFile('data/tasks.json', 'utf8'); 2665 | res.json(JSON.parse(data)); 2666 | } catch (error) { 2667 | console.error('Error reading tasks:', error); 2668 | res.status(500).json({ error: 'Failed to read tasks' }); 2669 | } 2670 | }); 2671 | 2672 | app.post('/data/tasks.json', requirePin, async (req, res) => { 2673 | try { 2674 | await fs.writeFile('data/tasks.json', JSON.stringify(req.body, null, 2)); 2675 | res.json({ ok: true }); 2676 | } catch (error) { 2677 | console.error('Error saving tasks:', error); 2678 | res.status(500).json({ error: 'Failed to save' }); 2679 | } 2680 | }); 2681 | 2682 | // Start server 2683 | app.listen(process.env.PORT || 3000, () => { 2684 | console.log(`Running on port ${process.env.PORT || 3000}`); 2685 | if (process.env.DUMBKAN_PIN) { 2686 | console.log('PIN protection enabled'); 2687 | } 2688 | }); -------------------------------------------------------------------------------- /server.js.bak: -------------------------------------------------------------------------------- 1 | require('dotenv').config(); 2 | const express = require('express'); 3 | const fs = require('fs').promises; 4 | const path = require('path'); 5 | const app = express(); 6 | 7 | app.use(express.json()); 8 | 9 | // Ensure data directory and tasks.json exist 10 | async function initializeStorage() { 11 | try { 12 | await fs.mkdir('data').catch(() => {}); 13 | try { 14 | await fs.access('data/tasks.json'); 15 | } catch { 16 | // Initialize with default structure 17 | const defaultData = { 18 | boards: { 19 | work: { 20 | name: 'Work', 21 | columns: { 22 | todo: { name: 'To Do', tasks: [] }, 23 | doing: { name: 'Doing', tasks: [] }, 24 | done: { name: 'Done', tasks: [] } 25 | } 26 | }, 27 | personal: { 28 | name: 'Personal', 29 | columns: { 30 | todo: { name: 'To Do', tasks: [] }, 31 | doing: { name: 'Doing', tasks: [] }, 32 | done: { name: 'Done', tasks: [] } 33 | } 34 | } 35 | }, 36 | activeBoard: 'work' 37 | }; 38 | await fs.writeFile('data/tasks.json', JSON.stringify(defaultData, null, 2)); 39 | } 40 | } catch (error) { 41 | console.error('Error initializing storage:', error); 42 | } 43 | } 44 | 45 | // Initialize storage before starting server 46 | initializeStorage(); 47 | 48 | // Middleware 49 | const auth = (req, res, next) => { 50 | const pin = process.env.DUMBKAN_PIN; 51 | if (!pin || pin.length < 4 || pin.length > 10 || !/^\d+$/.test(pin)) { 52 | return next(); 53 | } 54 | 55 | const providedPin = req.headers['x-pin']; 56 | if (providedPin === pin) { 57 | return next(); 58 | } 59 | 60 | res.status(401).json({ error: 'Unauthorized' }); 61 | }; 62 | 63 | // Routes 64 | app.get('/', (_, res) => res.send(html)); 65 | 66 | app.get('/api/pin-required', (_, res) => { 67 | const pin = process.env.DUMBKAN_PIN; 68 | const required = !!(pin && pin.length >= 4 && pin.length <= 10 && /^\d+$/.test(pin)); 69 | res.json({ required }); 70 | }); 71 | 72 | app.post('/api/verify-pin', (req, res) => { 73 | const pin = process.env.DUMBKAN_PIN; 74 | if (!pin || pin.length < 4 || pin.length > 10 || !/^\d+$/.test(pin)) { 75 | return res.json({ ok: true }); 76 | } 77 | 78 | const { pin: providedPin } = req.body; 79 | if (providedPin === pin) { 80 | res.json({ ok: true }); 81 | } else { 82 | res.status(401).json({ error: 'Invalid PIN' }); 83 | } 84 | }); 85 | 86 | app.get('/data/tasks.json', auth, async (_, res) => { 87 | try { 88 | const data = await fs.readFile('data/tasks.json', 'utf8'); 89 | res.json(JSON.parse(data)); 90 | } catch (error) { 91 | console.error('Error reading tasks:', error); 92 | res.status(500).json({ error: 'Failed to read tasks' }); 93 | } 94 | }); 95 | 96 | app.post('/data/tasks.json', auth, async (req, res) => { 97 | try { 98 | await fs.writeFile('data/tasks.json', JSON.stringify(req.body, null, 2)); 99 | res.json({ ok: true }); 100 | } catch (error) { 101 | console.error('Error saving tasks:', error); 102 | res.status(500).json({ error: 'Failed to save' }); 103 | } 104 | }); 105 | 106 | // Start server 107 | app.listen(process.env.PORT || 3000, () => { 108 | console.log(`Running on port ${process.env.PORT || 3000}`); 109 | const pin = process.env.DUMBKAN_PIN; 110 | if (pin && pin.length >= 4 && pin.length <= 10 && /^\d+$/.test(pin)) { 111 | console.log('PIN protection enabled'); 112 | } 113 | }); 114 | 115 | const html = ` 116 | 117 | 118 | DumbKan 119 | 120 | 121 | 197 | 198 | 199 | 213 | 214 | // ... existing HTML ... 215 | 216 | 330 | 331 | `; -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /* Colors */ 3 | --primary: #2196F3; 4 | --primary-hover: #1976D2; 5 | --bg-light: #f5f5f5; 6 | --container-light: white; 7 | --text-light: #333; 8 | --border-light: #ccc; 9 | --bg-dark: #1a1a1a; 10 | --container-dark: #2d2d2d; 11 | --text-dark: white; 12 | --border-dark: #404040; 13 | 14 | /* Theme variables */ 15 | --background: var(--bg-light); 16 | --container: var(--container-light); 17 | --text: var(--text-light); 18 | --border: var(--border-light); 19 | 20 | /* Layout */ 21 | --border-radius: 12px; 22 | --shadow: 0 2px 4px rgba(0,0,0,0.1); 23 | --transition: 0.2s ease; 24 | } 25 | 26 | /* Dark theme */ 27 | @media (prefers-color-scheme: dark) { 28 | :root { 29 | --background: var(--bg-dark); 30 | --container: var(--container-dark); 31 | --text: var(--text-dark); 32 | --border: var(--border-dark); 33 | } 34 | } 35 | 36 | .dark-theme { 37 | --background: var(--bg-dark); 38 | --container: var(--container-dark); 39 | --text: var(--text-dark); 40 | --border: var(--border-dark); 41 | } 42 | 43 | /* Base styles */ 44 | * { 45 | margin: 0; 46 | padding: 0; 47 | box-sizing: border-box; 48 | } 49 | 50 | body { 51 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 52 | background: var(--background); 53 | color: var(--text); 54 | line-height: 1.6; 55 | transition: background-color var(--transition); 56 | } 57 | 58 | .app { 59 | min-height: 100vh; 60 | padding: 2rem; 61 | } 62 | 63 | /* Header */ 64 | header { 65 | max-width: 1200px; 66 | margin: 0 auto 2rem; 67 | display: flex; 68 | justify-content: flex-start; 69 | align-items: center; 70 | gap: 2rem; 71 | padding: 0 1rem; 72 | } 73 | 74 | .header-left { 75 | display: flex; 76 | align-items: center; 77 | gap: 2rem; 78 | flex: 1; 79 | } 80 | 81 | h1 { 82 | font-size: 2rem; 83 | color: var(--primary); 84 | } 85 | 86 | #theme-toggle { 87 | background: none; 88 | border: none; 89 | font-size: 1.5rem; 90 | cursor: pointer; 91 | padding: 0.5rem; 92 | border-radius: var(--border-radius); 93 | transition: transform var(--transition); 94 | margin-left: auto; 95 | } 96 | 97 | #theme-toggle:hover { 98 | transform: scale(1.1); 99 | } 100 | 101 | /* Board */ 102 | .board { 103 | display: grid; 104 | grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 105 | gap: 1rem; 106 | max-width: 1200px; 107 | margin: 0 auto; 108 | } 109 | 110 | .column { 111 | background: var(--container); 112 | padding: 1rem; 113 | border-radius: var(--border-radius); 114 | box-shadow: var(--shadow); 115 | border: 1px solid var(--border); 116 | } 117 | 118 | .column h2 { 119 | margin-bottom: 1rem; 120 | font-size: 1.25rem; 121 | } 122 | 123 | .tasks { 124 | min-height: 200px; 125 | margin-bottom: 1rem; 126 | } 127 | 128 | /* Tasks */ 129 | .task { 130 | background: var(--container); 131 | padding: 1rem; 132 | margin-bottom: 0.5rem; 133 | border-radius: var(--border-radius); 134 | border: 1px solid var(--border); 135 | cursor: grab; 136 | transition: transform var(--transition), box-shadow var(--transition); 137 | } 138 | 139 | .task:hover { 140 | transform: translateY(-2px); 141 | box-shadow: 0 4px 8px rgba(0,0,0,0.1); 142 | } 143 | 144 | .task.dragging { 145 | opacity: 0.5; 146 | cursor: grabbing; 147 | } 148 | 149 | /* Buttons */ 150 | .add-task { 151 | width: 100%; 152 | padding: 0.75rem; 153 | background: var(--primary); 154 | color: white; 155 | border: none; 156 | border-radius: var(--border-radius); 157 | cursor: pointer; 158 | transition: background-color var(--transition); 159 | } 160 | 161 | .add-task:hover { 162 | background: var(--primary-hover); 163 | } 164 | 165 | /* Toast */ 166 | .toast { 167 | position: fixed; 168 | bottom: 2rem; 169 | right: 2rem; 170 | padding: 1rem 2rem; 171 | background: var(--container); 172 | border-radius: var(--border-radius); 173 | box-shadow: var(--shadow); 174 | animation: slideIn 0.3s ease; 175 | } 176 | 177 | @keyframes slideIn { 178 | from { 179 | transform: translateY(100%); 180 | opacity: 0; 181 | } 182 | to { 183 | transform: translateY(0); 184 | opacity: 1; 185 | } 186 | } 187 | 188 | /* PIN Modal */ 189 | .modal { 190 | position: fixed; 191 | top: 0; 192 | left: 0; 193 | width: 100%; 194 | height: 100%; 195 | background: rgba(0, 0, 0, 0.5); 196 | display: flex; 197 | align-items: center; 198 | justify-content: center; 199 | backdrop-filter: blur(5px); 200 | } 201 | 202 | .modal-content { 203 | background: var(--container); 204 | padding: 2rem; 205 | border-radius: var(--border-radius); 206 | box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); 207 | max-width: 400px; 208 | width: 90%; 209 | text-align: center; 210 | } 211 | 212 | .modal h2 { 213 | margin-bottom: 2rem; 214 | color: var(--text); 215 | } 216 | 217 | .pin-input { 218 | display: flex; 219 | gap: 1rem; 220 | justify-content: center; 221 | margin-bottom: 2rem; 222 | } 223 | 224 | .pin-input input { 225 | width: 3rem; 226 | height: 3.5rem; 227 | text-align: center; 228 | font-size: 1.5rem; 229 | border: 2px solid var(--border); 230 | border-radius: var(--border-radius); 231 | background: var(--container); 232 | color: var(--text); 233 | transition: border-color var(--transition); 234 | } 235 | 236 | .pin-input input:focus { 237 | outline: none; 238 | border-color: var(--primary); 239 | } 240 | 241 | .pin-keypad { 242 | display: grid; 243 | grid-template-columns: repeat(3, 1fr); 244 | gap: 0.75rem; 245 | max-width: 300px; 246 | margin: 0 auto; 247 | } 248 | 249 | .pin-keypad button { 250 | background: var(--container); 251 | border: 1px solid var(--border); 252 | color: var(--text); 253 | padding: 1rem; 254 | font-size: 1.25rem; 255 | border-radius: var(--border-radius); 256 | cursor: pointer; 257 | transition: all var(--transition); 258 | } 259 | 260 | .pin-keypad button:hover { 261 | background: var(--primary); 262 | color: white; 263 | border-color: var(--primary); 264 | } 265 | 266 | .pin-keypad .clear { 267 | color: #f44336; 268 | } 269 | 270 | .pin-keypad .enter { 271 | color: #4caf50; 272 | } 273 | 274 | .pin-keypad .clear:hover { 275 | background: #f44336; 276 | border-color: #f44336; 277 | color: white; 278 | } 279 | 280 | .pin-keypad .enter:hover { 281 | background: #4caf50; 282 | border-color: #4caf50; 283 | color: white; 284 | } 285 | 286 | /* Responsive */ 287 | @media (max-width: 768px) { 288 | .app { 289 | padding: 1rem; 290 | } 291 | 292 | .board { 293 | grid-template-columns: 1fr; 294 | } 295 | 296 | .pin-input input { 297 | width: 2.5rem; 298 | height: 3rem; 299 | font-size: 1.25rem; 300 | } 301 | } 302 | 303 | /* Board Selector */ 304 | .board-selector { 305 | position: relative; 306 | margin-left: 2rem; 307 | z-index: 1000; 308 | } 309 | 310 | .board-button { 311 | background: var(--container); 312 | border: 1px solid var(--border); 313 | color: var(--text); 314 | padding: 0.5rem 1rem; 315 | border-radius: var(--border-radius); 316 | cursor: pointer; 317 | display: flex; 318 | align-items: center; 319 | gap: 0.5rem; 320 | font-size: 1rem; 321 | min-width: 120px; 322 | transition: all var(--transition); 323 | } 324 | 325 | .board-button:hover { 326 | background: var(--primary); 327 | color: white; 328 | border-color: var(--primary); 329 | } 330 | 331 | .board-button::after { 332 | content: '▼'; 333 | font-size: 0.8em; 334 | margin-left: auto; 335 | } 336 | 337 | .board-menu { 338 | position: absolute; 339 | top: calc(100% + 0.5rem); 340 | left: 0; 341 | min-width: 200px; 342 | background: var(--container); 343 | border: 1px solid var(--border); 344 | border-radius: var(--border-radius); 345 | box-shadow: var(--shadow); 346 | overflow: hidden; 347 | } 348 | 349 | .board-menu button { 350 | width: 100%; 351 | padding: 0.75rem 1rem; 352 | background: none; 353 | border: none; 354 | color: var(--text); 355 | text-align: left; 356 | cursor: pointer; 357 | font-size: 1rem; 358 | transition: all var(--transition); 359 | white-space: nowrap; 360 | } 361 | 362 | .board-menu button:hover { 363 | background: var(--primary); 364 | color: white; 365 | } 366 | 367 | .board-menu button:not(:last-child) { 368 | border-bottom: 1px solid var(--border); 369 | } 370 | 371 | .manage-boards-btn { 372 | display: flex; 373 | align-items: center; 374 | gap: 0.5rem; 375 | border-top: 1px solid var(--border) !important; 376 | margin-top: 0.5rem; 377 | padding-top: 1rem !important; 378 | } 379 | 380 | .manage-boards-btn:hover { 381 | background: none !important; 382 | color: var(--primary) !important; 383 | } 384 | 385 | .manage-boards-btn .icon { 386 | font-size: 1.1em; 387 | opacity: 0.8; 388 | } --------------------------------------------------------------------------------