{"id":28816358,"url":"https://github.com/heptastar/hittechlibrary","last_synced_at":"2026-03-10T14:04:07.098Z","repository":{"id":295534568,"uuid":"990334749","full_name":"heptastar/HitTechLibrary","owner":"heptastar","description":"📚 HitTechLibrary: An Open-sourced Book Management System based on Free-charged Cloudflare Pages and D1 Database, full-stacked with Nextjs and Tailwindcss","archived":false,"fork":false,"pushed_at":"2025-05-27T06:19:49.000Z","size":908,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-18T17:04:08.358Z","etag":null,"topics":["book-management-system","cloudflare","cms","library","nextjs15"],"latest_commit_sha":null,"homepage":"https://main.lib-cfd1pg-250523-js-njs-cfpg.pages.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heptastar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-26T00:49:36.000Z","updated_at":"2025-05-27T06:19:53.000Z","dependencies_parsed_at":"2025-05-26T04:07:48.763Z","dependency_job_id":null,"html_url":"https://github.com/heptastar/HitTechLibrary","commit_stats":null,"previous_names":["heptastar/hittechlibrary"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/heptastar/HitTechLibrary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heptastar%2FHitTechLibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heptastar%2FHitTechLibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heptastar%2FHitTechLibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heptastar%2FHitTechLibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heptastar","download_url":"https://codeload.github.com/heptastar/HitTechLibrary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heptastar%2FHitTechLibrary/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260595647,"owners_count":23033787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["book-management-system","cloudflare","cms","library","nextjs15"],"created_at":"2025-06-18T17:03:04.670Z","updated_at":"2026-03-10T14:04:02.052Z","avatar_url":"https://github.com/heptastar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 HitTechLibrary: An Open-sourced Book Management System based on Free-charged Cloudflare Pages and D1 Database, full-stacked with Nextjs and Tailwindcss\n\n## 0. Demo\n- Demo addr: https://main.lib-cfd1pg-250523-js-njs-cfpg.pages.dev/\n- Demo admin user account: admin@qq.com\n- Demo password: 122\n- Demo common user acc: u2@qq.com\n- Demo common user pwd: 122\n  \n## 1. Features\n- book create, retrieve, update and delete\n- lending record's create, update, retieve\n- common user login and registration\n- admin user login and registration\n- common user lending info display\n  \n## 2. Install and Use\n1. clone the project to local machine e.g. macbook or linux, then goto remove folders if exist then install needed packages\n~~~\nrm -rf .next\nrm -rf node_modules\nrm package-lock.json \nnpm install \n~~~\n\n2. login to cloudflare from local machine\n~~~\nnpm i -D wrangler@latest\nnpx wrangler login\n~~~\n\n3. create a cloudflare d1 database for storing tables of the project\n~~~\nnpx wrangler d1 create libdb2\n~~~\n\n- you will obtain db info from cf as follows\n~~~\n  \"d1_databases\": [\n    {\n      \"binding\": \"DB\",\n      \"database_name\": \"libdb2\",\n      \"database_id\": \"XXX-YOUR-ID-NUMBER-XXX\"\n    }\n  ]\n~~~\n- append this json to the wrangler.jsonc located in root of the project, line 40 to 44\n~~~\n{\n\t\"$schema\": \"node_modules/wrangler/config-schema.json\",\n\t\"name\": \"lib-cfd1pg-250523-js-njs-cfpg\",\n\t\"compatibility_date\": \"2025-05-23\",\n\t\"compatibility_flags\": [\n\t\t\"nodejs_compat\"\n\t],\n\t\"pages_build_output_dir\": \".vercel/output/static\",\n\t\"observability\": {\n\t\t\"enabled\": true\n\t},\n\t\"d1_databases\": [\n\t\t{\n\t\t  \"binding\": \"DB\",\n\t\t  \"database_name\": \"libdb2\",\n\t\t  \"database_id\": \"XXX-YOUR-ID-NUMBER-XXX\"\n\t\t}\n\t  ],\n\t\"vars\": { \n\t\t\"JWT_SECRET\": \"your-super-secret-key\" \n\t},\n~~~\n\n4. tables create and initialize, using the sql files under schemas folder under root\n~~~\n-- users table create in local and remote\nnpx wrangler d1 execute libdb2 --file schemas/users.sql\nnpx wrangler d1 execute libdb2 --remote --file schemas/users.sql\n\n-- books table\nnpx wrangler d1 execute libdb2 --file schemas/book.sql\nnpx wrangler d1 execute libdb2 --remote --file schemas/book.sql\n\n-- books search full-text index\nnpx wrangler d1 execute libdb2 --remote --file schemas/booksearch.sql\nnpx wrangler d1 execute libdb2 --file schemas/booksearch.sql\n\n-- books search trigger for full text index\nnpx wrangler d1 execute libdb2 --remote --file schemas/booksetrigger.sql\nnpx wrangler d1 execute libdb2 --file schemas/booksetrigger.sql\n\n-- lendings table for storing lending records\nnpx wrangler d1 execute libdb2 --remote --file schemas/lend.sql\nnpx wrangler d1 execute libdb2 --file schemas/lend.sql\n\n-- optional: to insert mock data\nnpx wrangler d1 execute libdb2 --remote --file schemas/randbook.sql\nnpx wrangler d1 execute libdb2 --file schemas/randbook.sql\n~~~\n\n5. start project in local machine\n~~~\nnpm run preview\n~~~\n\n6. deploy to cloudflare\n~~~\nnpm run deploy\n~~~\n- you will obtain following infor\n~~~\n✨ Compiled Worker successfully\n✨ Uploading Worker bundle\n✨ Uploading _routes.json\n🌎 Deploying...\n✨ Deployment complete! Take a peek over at https://YOUR-ASSIGNED-ID.lib-cfd1pg-250523-js-njs-cfpg.pages.dev\n✨ Deployment alias URL: https://main.YOUR-ASSIGNED-DOMAINNAME.pages.dev\n~~~\n\n7. admin user setting\n- click the previous assigned url to register admin account, for example, admin@qq.com, with password 122\n- goto cloudflare.com to login with your Cloudflare account\n- sidebar-\u003e Storage \u0026 Databases-\u003e D1 SQL Database-\u003e libdb2-\u003e Tables-\u003e users-\u003e ... -\u003e update-\u003e userrank NEEDS TO BE CHANGED TO 3\n- user admin@qq.com with pwd 122 to login at URL: https://main.YOUR-ASSIGNED-DOMAINNAME.pages.dev\n- BY HERE ALL IS DONE! ENJOY!\n\n## Contact\n- this project is continuous dev and maintained by [Heptastar Intelligent Tech](www.hit2023.com), contact us.\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheptastar%2Fhittechlibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheptastar%2Fhittechlibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheptastar%2Fhittechlibrary/lists"}