Tools: ThinkInk: Optimizing the Reader's Journey with Generative AI and Copilot CLI

Tools: ThinkInk: Optimizing the Reader's Journey with Generative AI and Copilot CLI

Source: Dev.to

What I Built ## ⚙️ Installation and Execution ## Requirements ## 📸 App Showcase: See it in Action ## 🌍 Seamless Multilingual Interface ## 📂 Local Library Exploration ## 🤖 AI-Powered Intelligence (Gemini) ## My Experience with GitHub Copilot CLI ## My Step-by-Step Process: ## Why Working Step-by-Step was so Rewarding ## 🎀 Conclusion ## 👤 Author GitHub Copilot CLI Challenge Submission This is a submission for the GitHub Copilot CLI Challenge I am a person who loves reading, but sometimes I find it hard to decide which book to choose or to find one about a new topic I want to explore. I created this application for people like me: readers looking to get hooked on a story before opening it and walk away with key ideas at the end; but also for those who want to start their reading journey and don't know where to begin. ThinkInk is an application designed to accompany and motivate both established and new readers to discover titles, get to know authors, and explore their works. During development, many ideas for improvement emerged, which led me to split the application into two sections: As a Data Engineer, my goal is always to make data accessible and useful. Although I started ThinkInk in Spanish, I knew a global challenge required a global reach. With Copilot's guidance, I moved beyond my comfort zone to implement a seamless multi-language experience, ensuring no reader is left behind. 🚀 Explore the Repository: ThinkInk on GitHub 1. Clone the repository 2. Create virtual environment 3. Install dependencies 4. Configure Gemini (Optional but recommended) Step B: Create .env file In the project root, create a .env file: 5. Run the application The app will open at http://localhost:8502 Note: If you encounter any issues during the installation on Windows (such as virtual environment errors), I have included a troubleshooting section in the README to help you out. The application dynamically translates the entire interface and content, providing a truly global experience for any reader. Reflective Reading: Users can interact with a curated local database of classic books, answering pre- and post-reading questions designed to deepen their connection with the text. Dynamic Data Loading: Even the local data (titles, authors, and insights) adapts to the selected language, ensuring consistency across the platform. This is where the magic happens. By integrating Google Gemini AI, ThinkInk breaks the limits of a static library: In-Depth Analysis: Uses generative AI to provide summaries and character breakdowns for any book in the local repository. Smart Topic Discovery: Users can search for books based on specific themes (e.g., "Friendship", "Dystopia"). Gemini acts as an expert literary consultant to find the perfect match. I absolutely loved the experience. Although I use Copilot daily for my Data Engineering tasks, I hadn't yet ventured into building a full application from scratch. I built this app using Streamlit, and while I was already familiar with the tool, Copilot was what added that "Senior" touch to the entire development process. 🗺️ Defining the Solution: I started by giving Copilot context about the application and the features I wanted. I asked for a professional folder structure and, after validating it, we created the first functional version using locally stored books. 🧪 Validating Quality from the Start: I requested the creation and execution of unit tests. Seeing how Copilot designed the tests helped me learn a lot about the testing process. 🤖 Powering up with AI (Gemini): To increase the complexity, I used GitHub Copilot CLI to help me integrate Google Gemini AI. I wanted to apply specific restrictions to the AI's usage, so we implemented Guardrails. We configured rules to ensure the tool only responds about books, avoiding offensive content or off-topic subjects—something I consider vital when working with these technologies. 🌍 Breaking Barriers with i18n: I wanted the app to be bilingual. When I asked for recommendations, Copilot offered three different options and suggested i18n because it is lightweight and ideal for my level of experience with internationalization. The comments it generated were incredibly helpful in understanding how the multi-language flow works. ✨ Refinement and Documentation: Finally, we iterated to remove redundant functions that were complicating navigation. We also generated README.md files in both languages, ensuring the technical content remained consistent. Instead of sending a massive prompt with everything I needed, I decided to work iteratively. This allowed me to: Building ThinkInk has been a fun and deeply educational experience. As a Data Engineer, this project allowed me to bridge the gap between data processing and frontend interface development. Although I had worked with Streamlit before, Copilot helped me easily overcome the barrier of adding that professional touch with ease. Thanks to this, I now plan to create new applications by exploring other frontend languages as well. I believe the step-by-step methodology using GitHub Copilot CLI was the key to success: it gave me full control over every change and, most importantly, allowed me to deeply understand the code being generated. I highly recommend this iterative approach to maintain full mastery over the projects you are working on. I hope this application helps the community and inspires more people to build new things, unlocking new skills and exploring the potential of AI in development. Mirina Gonzales Rodriguez - DEV Profile Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse COMMAND_BLOCK: git clone https://github.com/Mirina-Gonzales/ThinkInk-app.git cd ThinkInk-app Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK: git clone https://github.com/Mirina-Gonzales/ThinkInk-app.git cd ThinkInk-app COMMAND_BLOCK: git clone https://github.com/Mirina-Gonzales/ThinkInk-app.git cd ThinkInk-app COMMAND_BLOCK: python -m venv venv source venv/bin/activate # Linux/Mac # or venv\Scripts\activate # Windows Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK: python -m venv venv source venv/bin/activate # Linux/Mac # or venv\Scripts\activate # Windows COMMAND_BLOCK: python -m venv venv source venv/bin/activate # Linux/Mac # or venv\Scripts\activate # Windows COMMAND_BLOCK: pip install -r requirements.txt Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK: pip install -r requirements.txt COMMAND_BLOCK: pip install -r requirements.txt CODE_BLOCK: GEMINI_API_KEY=your_key_here Enter fullscreen mode Exit fullscreen mode CODE_BLOCK: GEMINI_API_KEY=your_key_here CODE_BLOCK: GEMINI_API_KEY=your_key_here COMMAND_BLOCK: cp .env.example .env # Then edit .env with your key Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK: cp .env.example .env # Then edit .env with your key COMMAND_BLOCK: cp .env.example .env # Then edit .env with your key CODE_BLOCK: streamlit run app.py Enter fullscreen mode Exit fullscreen mode CODE_BLOCK: streamlit run app.py CODE_BLOCK: streamlit run app.py - Local Exploration: Allows interaction with a list of 10 books stored in a file within the repository. It includes detailed information about the book and the author. This section works autonomously and locally, as the data is integrated directly into the code. - Exploration with Generative IA (Gemini): To expand the possibilities, I integrated Gemini. This section allows discovering books by topic, author, or title without restrictions. For this functionality, the user only needs to add a secret key (which can be generated for free for testing purposes), expanding the application's functionality. - Python 3.8+ - pip (package manager) - Go to Google AI Studio - Click "Get API Key" - Copy your key - 🗺️ Defining the Solution: I started by giving Copilot context about the application and the features I wanted. I asked for a professional folder structure and, after validating it, we created the first functional version using locally stored books. - 🧪 Validating Quality from the Start: I requested the creation and execution of unit tests. Seeing how Copilot designed the tests helped me learn a lot about the testing process. - 🤖 Powering up with AI (Gemini): To increase the complexity, I used GitHub Copilot CLI to help me integrate Google Gemini AI. I wanted to apply specific restrictions to the AI's usage, so we implemented Guardrails. We configured rules to ensure the tool only responds about books, avoiding offensive content or off-topic subjects—something I consider vital when working with these technologies. - 🌍 Breaking Barriers with i18n: I wanted the app to be bilingual. When I asked for recommendations, Copilot offered three different options and suggested i18n because it is lightweight and ideal for my level of experience with internationalization. The comments it generated were incredibly helpful in understanding how the multi-language flow works. - ✨ Refinement and Documentation: Finally, we iterated to remove redundant functions that were complicating navigation. We also generated README.md files in both languages, ensuring the technical content remained consistent. - Full Control: I could supervise every change and avoid getting lost among so many new features. - Precise Adjustments: If Copilot generated something that didn't quite match what I expected for the app, we corrected it in the moment before moving forward. - Real Learning: By going step-by-step, I was able to understand the "why" behind every solution, especially regarding testing and language management—areas I hadn't worked in before.