Stories

Insights, ideas, and experiences

Discord Bot API

I got to know about this assignment from a Discord server. I never worked on the Discord API before and found this quite fascinating. 1. I started working on this by first checking what the Discord API is and found that it's very interesting. 2. I created a Typescript-based project and added all the environment variables. 3. Created a Discord Bot and got the keys. 4. Wrote a program to ensure the Discord Bot is connected to my server. 5. I started with a brute approach to by using a database to store the messages and perform search on it provided the word and it's limit. 6. Then I wrote logic to use slash command in the chat of the server. 7. Now using the Discord API Link, any admin can use the API in their discord server. Problems faced:- - Could not understand the flow and how to connect the Discord API. - Optimizing the logic to get all the messages fetched from Discord API and store them in best way possible in database. - Discord API can only look up to 100 messages (latest), acting as a drawback thus further optimization is needed. Future Plans:- - Optimize the database to store messages efficiently. - Ensure the Discord Bot has all the permissions and is accessible to large number of people with least complexity. - Create an application to help people use these Discord Bots for there Discord server. You can check out the GitHub repo here: https://github.com/VanshikaSabharwal/Discord-Bot

Vanshika Sabharwal2026-02-19

I explored how to speed up query processing in the database.

I was assigned to optimize the database to reduce query processing time so that user drop-offs decreased by 40% due as 3–5 second processing delays could be overcome. I asked one of my seniors for a real-world optimization tip — no theory knowledge — and he told me to use indexes. I searched a bit and found that adding indexes is as simple as adding a few lines of code to my existing Prisma schema file and then running a migration to apply the changes to the actual database. I made a test-indexes.ts file as well, which shows the difference — adding indexes caused a drastic drop in query processing time by more than 50%. But why are indexes so fast? They use a B-Tree data structure under the hood, which allows Postgres to search for the needed data with a time complexity of O(log⁡n). Without indexes, Postgres has to do a sequential scan over the whole table, which is O(n) — way slower, especially when dealing with lots of rows. I have implemented using indexes as optimizations in my personal project, V-Wallet. You can check out the GitHub repo here: https://github.com/VanshikaSabharwal/v-wallet.

Vanshika Sabharwal2025-11-01

How my Journey started with The Palisadoes Foundation

In August 2024, I merged my first PR in the Palisadoes Foundation. It was a small PR that updated a dependency. Worked on 2 more PR the same month, one more related to updating a dependency and another of automatically adding labels to the issues raised. Then things got harder when I tried to work on medium-level issues, such as updating the setup script for configuring the Talawa-Admin and API. However, I understood that I came in my second year of college, and I am learning how to work in open source, as I had only created personal projects in my first year, and things are really different when you work on real-world tech projects. So, slowly I learned and merged those 2 PR. I spent the next few months fixing the long-broken Docker configuration. This became a hate-love relationship with Docker. It took me 2–3 months, but it was worth it. Side by side, I also worked on UI features. By then, it had been about 5–6 months of contributing, and suddenly it was GSOC application season. It was February, and my end-sem exams were also approaching. Still, I couldn’t stop contributing. That month was hectic — I was fixing issues, talking to Peter, having late-night meetings on deploying a site for Palisadoes, and balancing exams at the same time. I was sad because we couldn’t get a fully working deployment ready before the application, but we learned so much: why silent failures were happening, how GitHub workflows weren’t catching them, and that frontend-backend connections (mainly CORS issues) were the biggest blockers. Though I felt sad, I was happy that Palisadoes still made it into GSOC, and I was one of the first to congratulate them. I was happy then and applied to GSOC as a mentee. Things were going fine, my results for end semester exams came, and by god’s grace, I passed in all my subjects. Much motivated to keep doing what I am doing. I took a whole month or more than a month to make 3 proposals for GSOC 2025. All of them were for Palisadoes. I made sure to keep reviewing it with my mentors and updating it. I was highly motivated to make it to GSOC 2025. Much-awaited, then came the results, at night. And I was scattered and heartbroken to see that my name was not there in the final list of selected mentees. There was nothing I could do or say. People who made it this year were all my friends, and I was really for them. I was just sad for myself. I realized that there must be more people like me who would be broken after this result. And I started talking to such people on social media, wrote posts for them, and shared my experience. Trying my best to make sure they don’t feel alone at this time. I am overjoyed to say that whoever I talked to during that phase later got an internship soon from the same organization they applied to in GSOC. Now comes the final moment. I was also wondering if there is still a chance I can intern with Palisadoes. And one evening, I found a text from one of the mentors that you have been shortlisted and you have to make a proposal on this topic, and if your proposal is good, you will be selected for an internship with Palisadoes Foundation. This Journey has not come to an end, and I am thinking of writing another blog to share my Internship Journey. So, if you enjoyed reading till now. Stay tuned for the next blog on the Internship Journey at Palisadoes, too.

Vanshika Sabharwal2025-11-01

My Internship at The Palisadoes Foundation

As I told you in my last Sunday Blog, I received a message from one of the mentors. Let me walk you through what happened next. I woke up to the message: “You have been shortlisted for an internship with The Palisadoes Foundation.” I felt amazing! Then I saw that I had to submit a proposal on the topic: “API improvement and backend stability to handle heavy traffic, and fixing the CORS issue permanently on both the admin and API.” The deadline was Saturday, and it was only Monday. But I was so thrilled that I immediately got an adrenaline rush and completed my proposal by Thursday itself. After a week or two, I received another message: “Congratulations, you have been selected as an intern with The Palisadoes Foundation.” I felt a huge sense of relief after all those days of stress — the constant “what if I don’t make it?” thoughts — but in the end, I finally did. Now, let’s talk about the technical side of things. Since I was already familiar with the Talawa codebase, having contributed for about 6–7 months, I knew exactly where to begin. I started by resolving the CORS issue in the local setup of Talawa, then collaborated with the organization admin to fix it on the deployed site as well. Next, I implemented a Port-Check Script to identify available and unavailable ports, helping reduce debugging time and local setup issues. After that, I focused on restoring the Posts page features for both the User and Admin portals. While doing so, I discovered a few bugs in the API and fixed them. Now, the User Portal supports all post-related features — rendering posts, adding, updating, pinning, and deleting them. I also worked on improving the User Interface of the Posts page to enhance the user experience and make it more visually engaging, similar to the posts we usually see on Instagram. I experimented with different layouts — first making pinned posts look like Instagram Stories, and later adjusting their size for a better look. In addition, I fixed several bugs in the GitHub workflows, improved test coverage, and updated the deployment pipeline to follow best practices. I even designed Figma mockups for the Posts pages to visualize the improved UI. As my internship comes to an end, I’m happy to say that I’ve learned so much from this experience — from Frontend, Backend, Testing, and DevOps to UI/UX. This journey has truly helped me grow as a developer and as a problem solver. A big thanks to The Palisadoes Foundation and everyone who guided me along the way. I’m grateful for the opportunity to apply my knowledge to a real-world project.

Vanshika Sabharwal2025-11-01

Learning Deployment Hands-On

During my internship with Palisadoes, I had the incredible opportunity to work closely with the President himself on the Deployment section of their projects. This experience gave me a hands-on understanding of real-world deployment practices and the inner workings of a professional codebase. One of the first things I did was gain access to the Server. The President sent me an SSH key and instructed me to set up a password for myself. Once I completed that, I could access the whole server. As the project was divided into three main components: frontend, backend, and mobile. I primarily worked on the frontend and backend, which allowed me to see how different parts of a system interact and how deployment is managed across multiple services. While going through the code, I noticed a CRON job designed to continuously pull the latest code from the GitHub repository. This was an eye-opening experience, as it demonstrated how automated scripts ensure the codebase stays up-to-date without manual intervention. I also observed an interesting issue we were facing: CORS errors. The problem arose because we were using two different frontend URLs, one for the web and another for mobile. Thankfully, the CORS issue was not there for mobile. The problem was that the backend was allowing all frontend web URLs to make requests. This caused issues when an auth token was sent from the frontend to the backend. I learned that the correct way to resolve this was to explicitly allow only the specific frontend web URL that should access the backend, ensuring secure and smooth communication between services. Through this process, I also gained a deeper understanding of how nightly deployments were handled. The CRON job ran every night to update the codebase, followed by a bash script that deployed the latest version. Additionally, I learned that the deployment was being managed on an Apache server, with a purchased domain name pointing to it, making the project accessible online. This internship taught me not only the technical aspects of deployment but also how automation, proper configuration, best practices, and server management play a crucial role in delivering reliable software. Being involved directly in these processes, especially under the guidance of the President, was a truly enriching learning experience.

Vanshika Sabharwal2025-10-26