https://github.com/bjesus/teatime Skip to content Navigation Menu Toggle navigation Sign in * Product + GitHub Copilot Write better code with AI + Security Find and fix vulnerabilities + Actions Automate any workflow + Codespaces Instant dev environments + Issues Plan and track work + Code Review Manage code changes + Discussions Collaborate outside of code + Code Search Find more, search less Explore + All features + Documentation + GitHub Skills + Blog * Solutions By company size + Enterprises + Small and medium teams + Startups By use case + DevSecOps + DevOps + CI/CD + View all use cases By industry + Healthcare + Financial services + Manufacturing + Government + View all industries View all solutions * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} bjesus / teatime Public * Notifications You must be signed in to change notification settings * Fork 0 * Star 51 A fully static distributed library system powered by IPFS, SQLite and GitHub bjesus.github.io/teatime/ License MIT license 51 stars 0 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 4 * Pull requests 0 * Actions * Wiki * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Wiki * Security * Insights bjesus/teatime main BranchesTags [ ] Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 43 Commits .github/workflows .github/workflows components components server server .gitignore .gitignore LICENSE LICENSE README.md README.md app.config.ts app.config.ts app.vue app.vue indexdb.ts indexdb.ts nuxt.config.ts nuxt.config.ts package-lock.json package-lock.json package.json package.json tsconfig.json tsconfig.json View all files Repository files navigation * README * MIT license TeaTime TeaTime is a fully static distributed library system powered by IPFS, SQLite, and GitHub [382481806-] Auto-updating instances are hosted on Netlify and GitHub Pages A Distributed Library The TeaTime web application is completely decoupled from its databases and the files it fetches. The databases used in TeaTime are GitHub repositories tagged with the teatime-database topic, which are published on GitHub Pages. Each repository contains a config.json file that points to an SQLite database. Before a user performs a search in TeaTime, they choose which database to use and then TeaTime queries the SQLite database using sql.js-httpvfs. Each row in the SQLite database is an item in the library, and a file hash column is used for getting the item from IPFS. Since the web application is a static site, and the databases are comprised of static files, both can be easily forked, replicated, and deployed. Frontend instances are GitHub repositories tagged with the teatime-instance topic. With the files being served off IPFS, this distributed architecture contributes to TeaTime's resilience. Features * Search by title, author, year or format * Maintain reading history, and return to page when re-opening file * Download files locally * Cache files in IndexedDB for fast loading * Drop files on TeaTime to render them * Dark mode and full screen mode * No cookies, no login * ...Completely distributed Developing the Frontend TeaTime is Nuxt.js application. You can easily run it locally by cloning the repository and following these steps: 1. Install the dependencies: npm install 2. Run the server: npm run dev 3. Navigate to http://localhost:3000 Check out the Nuxt documentation for more information. Creating a Database Tip The easiest way to create your own database is by forking the JSON-based database repository and adjusting the JSON files according to your needs. GitHub Actions will then generate an SQLite file and upload it to GitHub Pages. To manually generate an SQLite database that TeaTime can work with, follow the example on the database repository. Each SQLite database contains a table with the below schema. Note that column names can be adjusted in the config.json file. CREATE TABLE "books" ( "id" INTEGER, "title" TEXT, "author" TEXT, "year" INTEGER, "lang" TEXT, "size" INTEGER, "ext" TEXT, "ipfs_cid" TEXT, PRIMARY KEY("id" AUTOINCREMENT) ); The dbConfig section of config.json is identical to the output of the sql.js-httpvfs create_db.sh script. If the SQLite file is too big, you can split it. Note the information about optimizing your database. You will also want to use FTS. Then, publish your repository to GitHub Pages and assign the teatime-database topic to your repository. Contributing Even if you cannot code, a great way to contribute is to simply fork this repository, as well as your favorite database repositories. If you fork the repository, it could be better to do it manually (git clone && git remote add your-origin ... && git push your-origin main) so that the repositories won't be directly linked. It's also a good practice to star the database repositories you find useful, as this determines their order in the TeaTime user interface, making it easier for other users to find the best databases. About A fully static distributed library system powered by IPFS, SQLite and GitHub bjesus.github.io/teatime/ Topics teatime-instance Resources Readme License MIT license Activity Stars 51 stars Watchers 1 watching Forks 0 forks Report repository Languages * Vue 94.1% * TypeScript 5.9% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.