DEV Community

Pratyush Dutta
Pratyush Dutta

Posted on

This is a submission for the [GitHub Finish-Up-A-Thon Challenge]

GitHub “Finish-Up-A-Thon” Challenge Submission

What I Built:
The Context-Preserving Assistant is a modern, full-stack application designed to showcase how to maintain user context (like preferences, location, or customized settings) securely across a distributed system.

Often, personal assistants need to communicate with various third-party services (like weather, news, or calendar APIs) on behalf of the user. Doing this securely means the frontend should never hold sensitive third-party API keys. Instead, the frontend authenticates the user via Auth0 and receives a secure JWT (JSON Web Token). This token is then passed to our Express Backend, which acts as a secure proxy. The backend validates the user's identity, extracts any custom context (such as a preferred city injected into the token via Auth0 Actions), and securely communicates with third-party APIs using server-side secrets.

This architecture ensures that user context is preserved seamlessly while maintaining enterprise-grade security for API credentials.

This is a starter/mentorship scaffold — follow the steps below to configure Auth0 and run the demo.

It started in MLH GHW: GenAI conducted in the month of May.

Demo:

Github repo- https://github.com/pratyush06-aec/Context-Preserving-Assistant

The Comeback Story:
The project began as a basic starter scaffold with Auth0 authentication and a simple frontend-backend connection, but it lacked a complete workflow to demonstrate secure context preservation across services.

The main challenge was ensuring that user-specific context could travel securely from authentication to API consumption without exposing sensitive credentials. To solve this, we implemented Auth0 Universal Login, enriched JWTs with user preferences through Auth0 Actions, and built an Express backend that securely validates tokens and acts as a proxy for third-party services.

We then integrated the OpenWeather API, allowing the assistant to personalize responses using authenticated user context while keeping API keys protected on the server. Finally, we resolved deployment and configuration challenges across Auth0, Render, and Vercel, including audience validation, environment management, CORS, and production routing.

The end result is a production-style Context-Preserving Assistant that authenticates users once, securely preserves their preferences throughout the session, and performs personalized actions through third-party APIs while maintaining enterprise-grade security and identity propagation.

My Experience with GitHub Copilot:
This project demonstrates how GitHub Copilot accelerated the development of a secure, full-stack Context-Preserving Assistant powered by Auth0, React, Node.js, and OpenWeatherMap.

Throughout the development process, GitHub Copilot assisted in scaffolding the application architecture, generating frontend and backend starter code, creating protected API routes, and implementing Auth0 authentication flows. It helped establish a React frontend integrated with Auth0 Universal Login and an Express backend secured through JWT validation using Auth0-issued access tokens.

Copilot also streamlined the implementation of key features, including user profile retrieval, context preservation through custom Auth0 claims, and secure integration with the OpenWeatherMap API. By suggesting boilerplate code, middleware configurations, API handlers, and environment variable structures, it significantly reduced development time while maintaining best practices.

Beyond code generation, Copilot played an important role in debugging and refinement. It assisted in diagnosing backend startup issues, validating authentication flows, troubleshooting token verification, and ensuring seamless communication between the frontend, backend, Auth0, and third-party services.

Security improvements were another major contribution. Copilot helped identify an exposed API key, guided secret remediation, supported Git history cleanup, and reinforced secure credential management by ensuring that third-party API keys remained protected on the server side.

The final outcome is a production-style demonstration of secure identity propagation and context preservation. Users authenticate through Auth0, access protected backend resources, retrieve personalized context, and perform weather lookups through a third-party API—all while maintaining secure authentication and authorization practices. The project showcases how GitHub Copilot can act as an effective AI development partner, accelerating implementation, debugging, security hardening, and documentation throughout the software development lifecycle.

Top comments (0)