{"id":22558002,"url":"https://github.com/jd-apprentice/libritos","last_synced_at":"2025-07-07T06:32:48.336Z","repository":{"id":200432098,"uuid":"705447900","full_name":"jd-apprentice/libritos","owner":"jd-apprentice","description":"📚 Libritos: Your Personal Reading Assistant with a User-Friendly Interface","archived":false,"fork":false,"pushed_at":"2024-10-27T01:51:13.000Z","size":7730,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T16:19:01.166Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jd-apprentice.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}},"created_at":"2023-10-16T02:51:33.000Z","updated_at":"2025-06-03T16:28:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"f18ef2a5-80c1-4d4d-b22f-1cff3582bf2b","html_url":"https://github.com/jd-apprentice/libritos","commit_stats":null,"previous_names":["jd-apprentice/libritos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jd-apprentice/libritos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-apprentice%2Flibritos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-apprentice%2Flibritos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-apprentice%2Flibritos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-apprentice%2Flibritos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jd-apprentice","download_url":"https://codeload.github.com/jd-apprentice/libritos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jd-apprentice%2Flibritos/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264027516,"owners_count":23546090,"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":[],"created_at":"2024-12-07T20:10:36.930Z","updated_at":"2025-07-07T06:32:48.301Z","avatar_url":"https://github.com/jd-apprentice.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 Libritos\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"500\" height=\"500\" src=\"static/images/logo.png\"\u003e\n\u003c/p\u003e\n\n# Table of Contents 📚\n\n- [About 📔](#about-)\n- [Deployment 🚀](#Deployment-)\n    - [Requirements 📋](#requirements-)\n        - [Create a cloudflare account and add your domain.](#create-a-cloudflare-account-and-add-your-domain)\n        - [Migration](#migration)\n        - [Create a discord bot and add it to your server](#create-a-discord-bot-and-add-it-to-your-server)\n- [Usage](#usage)\n    - [Discord Bot 🤖](#discord-bot-)\n    - [Web Application 🌐](#web-application-)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n\n# About 📔\n\nLibritos is a simple web application that allows you to search for books that you previously added from a discord bot.\n\nThe discord bot is set at a specific channel and it will listen to files such as pdf, epub, mobi, etc. and it will upload them to a server. The server will then process the file and add it to the database. The web application will then allow you to search for the book and download it.\n\n# Deployment 🚀\n\n## Requirements 📋\n\n- Go \u003e1.23 [Link](https://golang.org)\n- Bun \u003e1.1.28 [Link](https://bun.sh)\n- Cloudflare [Link](https://cloudflare.com)\n- Github [Link](https://github.com)\n- Discord [Link](https://discord.com/developers/applications)\n\n### Create a cloudflare account and add your domain.\n\nThe domain should point to the render deployment something like this\n\n![DNS](static/images/cloudflare.png)\n\nSo in my case the website will be available at `https://libritos.jonathan.com.ar`\n\n### Migration\n\nIn the root of the project run the following command\n\n```bash\nmake migration\n```\n\n### Create a render account and add the repository\n\nCreate a `web service` and add my repository which is `https://github.com/jd-apprentice/libritos`\n\n![web service](static/images/web_service.png)\n\n![repository](static/images/add_repository.png)\n\nBase configuration would be something like this\n\n![base](static/images/base_config.png)\n\nNow for advance configuration is where we add our environment variables\n\n![environment](static/images/environment_variables.png)\n\nAlso remember to add the /health endpoint to the health check\n\nHere is a table with the environment variables\n\n| Name | Value | Example |\n| ---- | ----- | ------- |\n| DISCORD_TOKEN | Discord bot token from the developer portal | 123456789 |\n| DISCORD_CHANNEL_ID | Discord channel id where the bot is allowed to receive files | 123456789 |\n| ALLOWED_FORMATS | Allowed formats for the bot to upload | \"application/pdf, application/epub+zip, application/x-mobipocket-ebook\"\n| BOOKS_TABLE | Name of the table where the books are going to be stored | books |\n\n### Create a discord bot and add it to your server\n\nIn the discord developer portal create a bot\n\n![developer portal](static/images/developer_portal.png)\n\nUnder the `Bot` section we are going to retrieve the token\n\n![token](static/images/token.png)\n\nBot is going to need the following permissions in the `OAuth2` section\n\n- Read Messages/View Channels\n- Send Messages\n- Read Message History\n- Use Slash Commands\n\nThen in the `Bot` section make sure message intents are enabled like this\n\n![intents](static/images/intents.png)\n\n# Usage 📖\n\n## Discord Bot 🤖\n\nHow to use the discord bot:\n\nsend a message with the following format\n\n```\nimage: \u003curl\u003e\ndescription: \u003cmessage\u003e\n```\n\nand a file attached to the message\n\n`files must be smaller than 20MB`\n\n![send_file](static/images/send_sample.png)\n\nif everything was okay you will see the `file saved` message\n\n![save](static/images/save.png)\n\nelse you will see the proper validation that is stopping the file from being uploaded\n\n## Web Application 🌐\n\nOnce the file is uploaded to the server you can see it in the web application\n\n![web](static/images/web.png)\n\n# Contributing 🤝\n\nContributions, issues and feature requests are welcome!\n\n# License 📝\n\nThis project is [GPL-3.0](LICENSE) licensed.\n\n# Contact 📧\n\nSocial media links and email address available at my [linktr.ee](https://linktr.ee/jd_apprentice)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjd-apprentice%2Flibritos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjd-apprentice%2Flibritos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjd-apprentice%2Flibritos/lists"}