Inspiration
Despite substantial progress in gender equality, the gender pay gap remains an ongoing challenge worldwide, with women often earning less than men for comparable work. This issue is even more pronounced for women of diverse backgrounds and those navigating challenging career transitions. As developers and advocates for equity, our team has witnessed firsthand the barriers women face in negotiating for fair pay, confidence-building, and career advancement.
With these challenges in mind, we were inspired to create Prospera: an AI-powered salary negotiation assistant aimed at helping women approach salary discussions with confidence, transparency, and knowledge. Our goal is to equip women with insights and resources to negotiate fairer salaries and close the gender pay gap.
What it does
Prospera is an all-in-one salary negotiation and benchmarking assistant tailored to women seeking greater confidence and fairness in their career journey. It offers several key features:
- Salary Benchmarking: Prospera provides personalized salary insights based on job title, experience, location, and industry to give users an idea of what’s fair for their role.
- Negotiation Script Coach: The app creates tailored negotiation scripts that guide users on how to structure their requests, address counteroffers, and express their value to employers.
- Confidence-Building Tips: Users can practice negotiations with our AI-powered coach, receiving feedback on their approach, language, and negotiation tactics.
How We Built It
Prospera was developed as a full-stack web application using a Go backend, a React frontend, and Google’s Gemini AI for advanced natural language processing. Here’s an in-depth look at how we constructed each component, the technologies we used, and some sample code that illustrates key aspects of the application.
Overall Architecture
The Prospera architecture consists of a frontend and backend, with a dedicated WebSocket connection for real-time negotiation simulations. Here’s an overview:
- Frontend: Built with React, the frontend provides a user-friendly interface for inputting data, viewing salary insights, and interacting with the AI coach.
- Backend: Written in Go, the backend handles all data processing, manages WebSocket connections, and interacts with the Gemini AI model for generating personalized negotiation advice.
- Database: Currently a local map storing input information
- WebSocket Server: Manages real-time negotiation practice sessions, enabling live communication between the user and the AI coach.
Below is a diagram of Prospera’s architecture:
+----------------------------------+
| Prospera Frontend |
| (React & WebSocket) |
+----------------------------------+
|
|
[HTTP REST & WebSocket]
|
|
+----------------------------------+
| Prospera Backend |
| (Go) |
+----------------------------------+
| | | | |
| | | | |
REST | WebSocket | Gemini AI Database
| | | API (Go SDK) (Local)
+----------------------------------+
Frontend
The frontend is designed with React, providing an intuitive UI for inputting user information, initiating WebSocket connections, and rendering real-time responses from the AI. Users can easily view salary benchmarks, receive negotiation script suggestions, and practice negotiations interactively.
- WebSocket Connection: The frontend connects to the backend via WebSocket for real-time conversation during the negotiation practice sessions.
Sample code snippet for establishing a WebSocket connection in the frontend:
javascript
Copier le code
import React, { useState, useEffect } from "react";
const NegotiationChat = () => {
const [messages, setMessages] = useState([]);
const [input, setInput] = useState("");
useEffect(() => {
const socket = new WebSocket("ws://localhost:8080/ws/negotiation");
socket.onopen = () => {
console.log("Connected to WebSocket");
};
socket.onmessage = (event) => {
setMessages((prev) => [...prev, { sender: "AI", text: event.data }]);
};
return () => socket.close();
}, []);
const sendMessage = () => {
// Code to send message to backend WebSocket server
};
return (
<div>{/* Render chat interface here */}</div>
);
};
export default NegotiationChat;
Backend (Go)
The backend is implemented in Go and handles several critical functionalities, including managing WebSocket connections, processing user inputs, and integrating with Google’s Gemini AI model.
WebSocket for Real-Time Chat: The WebSocket server in Go allows real-time communication between the frontend and the backend. Each user interaction is sent to the Gemini AI model via API calls, and the AI-generated responses are sent back to the frontend over WebSocket.
Sample WebSocket handler in Go:
import ( "net/http" "github.com/gin-gonic/gin" "github.com/gorilla/websocket" ) var upgrader = websocket.Upgrader{ CheckOrigin: func(r *http.Request) bool { return true }, } func WebSocketHandler(c *gin.Context) { conn, err := upgrader.Upgrade(c.Writer, c.Request, nil) if err != nil { http.Error(c.Writer, "Failed to open WebSocket", http.StatusBadRequest) return } defer conn.Close() for { _, msg, err := conn.ReadMessage() if err != nil { return } // Use Gemini AI to process the message response := processWithGemini(string(msg)) conn.WriteMessage(websocket.TextMessage, []byte(response)) } }Google Gemini AI Integration: Using Google’s Go SDK for Gemini, we interact with the AI model to generate personalized negotiation scripts. This code handles the prompt setup, API request, and response parsing.
Sample code snippet to call Gemini API:
import ( "context" "log" "os" "cloud.google.com/go/ai/genai" "google.golang.org/api/option" ) func generateAIAdvice(prompt string) (string, error) { client, err := genai.NewClient(ctx, option.WithAPIKey(os.Getenv(googleApiKeyEnv))) if err != nil { return "", err } defer client.Close() model := client.GenerativeModel(generativeModel) cs := model.StartChat() // Update history with user message cs.History = append( cs.History, &genai.Content{Parts: []genai.Part{genai.Text(msg)}, Role: roleUser}, ) // Send message to Gemini response, err := cs.SendMessage(ctx, genai.Text(msg)) if err != nil { return "", err } return response.Candidates[0].Text, nil }
Prompt Engineering with Templating
The effectiveness of Gemini AI in providing relevant responses hinges on prompt engineering. By constructing a well-designed prompt template based on Vertex AI best practices with user-specific details, we ensure that the AI generates responses tailored to each individual’s context and relevant to negotiation contexts.
Prompt Template example: buildPrompt
The buildPrompt function dynamically generates a prompt based on user attributes. It integrates specific user information—such as job title, industry, experience, salary expectations, and skills—to create a comprehensive prompt that guides the AI’s response.
func buildPrompt(user user.SalaryInfo) string {
promptStr := ""
promptStr += fmt.Sprintf("I am a %s with %d years of experience in the field of %s.\n", user.JobTitle, user.YearsExperience, user.Industry)
promptStr += fmt.Sprintf("I am currently looking for new opportunities in %s.\n", user.Location)
promptStr += fmt.Sprintf("I am currently paid %d.\n", user.CurrentSalary)
promptStr += fmt.Sprintf("I am aiming to earn more with a target of a next salary of %d.\n", user.DesiredSalary)
promptStr += fmt.Sprintf("I have the following skills: %s.\n", user.Skills)
promptStr += fmt.Sprintf("I have a major in %s.\n", user.Major)
promptStr += fmt.Sprintf("I am graduated in %s.\n", user.Diploma)
endingNote := `
I would like to know what is the salary range I could expect.
Can you give me a salary range using the following format?
- Minimum salary range :
- Maximum salary range:
Add some information about what I could negotiate (holidays, etc) in a format list of 3 bullets:
1. xxx
2. xxx
3. xxx
Add a nice note to end wishing you luck and encourage me to learn how to negotiate using the negotiation coach my tool will provide:
---
NB: xxx`
return promptStr + endingNote
}
Prompt Details:
- User Context: By embedding user attributes like job title, industry, experience, and salary, we provide Gemini with detailed context, making the AI’s advice more relevant and specific.
- Formatting and Instruction: Specific instructions on response format (e.g., minimum/maximum salary range, bullet-pointed tips) guide the AI to deliver organized and actionable output.
- Encouragement Section: The prompt concludes with a request for a positive, encouraging note, creating an empowering user experience that aligns with Prospera’s mission.
Websocket Session Management
The WebSocket server in Go maintains the user’s session, preserving context across messages to provide coherent, contextually aware responses during negotiations.
Deployment
- Containerization with Docker: Both frontend and backend are containerized with Docker to facilitate easy deployment and scalability. This setup enables consistent testing and deployment in different environments.
- Environment Variables: Sensitive data, such as API keys and configurations, are stored securely in environment variables, ensuring that sensitive information remains secure across environments.
This setup allows Prospera to provide dynamic, responsive feedback during salary negotiations, enhancing user experience through real-time AI coaching. The combination of React, Go, WebSockets, and Google’s Gemini model enables Prospera to deliver sophisticated negotiation support in a way that is accessible, efficient, and secure.
Challenges we ran into
- Integrating AI for Real-Time Guidance: It was challenging to create AI prompts that consistently generated effective negotiation language, especially when accounting for varied roles, experience levels, and industries. After testing multiple prompt structures, we refined the process to deliver more accurate, practical responses.
- Handling Dynamic User Interactions: Designing the WebSocket system to allow smooth, uninterrupted user interactions was complex, particularly when managing real-time responses from the AI. We implemented a stateful approach in the backend to preserve conversation context, ensuring responses were coherent and relevant.
- User Experience and Accessibility: Ensuring that Prospera’s features were accessible, intuitive, and easy to use was a priority. We refined the UI through multiple iterations, focusing on making the platform approachable for users with minimal tech experience.
Accomplishments that we're proud of
We’re proud of creating a tool that empowers women in their professional journeys, making salary negotiation less intimidating and more effective. Key accomplishments include:
- AI-Driven, Personalized Assistance: Prospera's negotiation advice is tailored to the individual, with responses that consider job specifics, market data, and user goals. This level of personalization ensures that users receive relevant, actionable advice.
- User-Centric Design: Through feedback from beta testers, we refined Prospera’s UI to make it visually appealing, functional, and accessible, balancing technology with ease of use.
- Scalable, Reliable System Architecture: By using Docker for containerization, we streamlined the development and testing processes, making Prospera highly scalable and suitable for broader deployment in future versions.
What we learned
Building Prospera offered our team invaluable insights into AI application in career and financial empowerment tools. Key takeaways include:
- Prompt Engineering for NLP Models: We learned the intricacies of prompt engineering to get consistent, valuable output from AI, which is essential when using AI to generate complex, context-sensitive text.
- WebSocket Implementation for Real-Time Applications: Implementing real-time user interactions was a technical challenge that taught us about efficient WebSocket management and stateful conversation handling.
- Cross-Functional Development: Working with both frontend and backend technologies, as well as Google’s AI services, expanded our understanding of full-stack development and strengthened our technical collaboration skills.
What’s next for Prospera
As we look to the future, we envision several areas of functional and technical growth for Prospera, aiming to make it a more comprehensive, secure, and personalized tool for empowering women in their career negotiations.
Functional Enhancements
- Expansion of Negotiable Aspects: We plan to broaden the categories of benefits beyond salary that users can negotiate. Future updates will include support for negotiating stock options, wellness programs, flexible work arrangements, and professional development budgets. This will provide users with a holistic view of potential career benefits.
- Adaptive Coaching through Machine Learning: We’re exploring machine learning techniques to make Prospera’s coaching increasingly adaptive. By analyzing user interactions, Prospera could learn to better tailor its coaching based on individual preferences, negotiation styles, and career goals, providing a truly personalized experience that grows with each user.
- Increased Accessibility and Global Localization: To reach a broader audience, we plan to expand language support and add cultural localization features. This will make Prospera accessible to users worldwide, adapting to the negotiation practices and norms of different regions while ensuring inclusivity for women from diverse backgrounds.
- Comprehensive Negotiation Summaries and Insights: We aim to provide users with detailed summaries and analytics for each negotiation session. This feature will offer insights into their progress over time, identify strengths and areas for improvement, and provide statistical benchmarks to guide future negotiations.
Technical Enhancements
- Implementation of a Secure Login System: A priority for the next phase is to build a secure, scalable login system to ensure that each user’s data is protected and accessible only to them. This will establish a robust foundation for user privacy and security, critical given the sensitive nature of salary data.
- Integration of a Scalable Database: We plan to migrate to a dedicated database system to securely store user profiles, chat history, and negotiation logs. This will allow for more complex data storage and retrieval, enabling features like user-specific data insights, historical data tracking, and enhanced personalization.
- Chat History and Persistent Logs: Prospera will introduce a chat history feature, allowing users to revisit past negotiation sessions and review conversation logs. This will also involve storing summaries and detailed statistics for each negotiation, helping users reflect on their performance and monitor their progress.
- Logging and Analytics for Enhanced Performance: We plan to implement logging and monitoring tools that will track application performance and user interactions. This will not only help us improve the system’s reliability and responsiveness but will also provide valuable data to optimize AI coaching and feedback.
In Summary
Prospera is more than a negotiation assistant; it’s a powerful tool for career empowerment and financial equality. By focusing on both functional features and technical infrastructure, we aim to create a platform that is secure, personalized, and effective in helping women achieve the compensation they deserve. As we continue to innovate and expand, our commitment remains to support women globally in navigating their careers with confidence and control.
Built With
- axios
- docker
- docker-compose
- gemini
- go
- html5
- http
- javascript
- makefile
- node.js
- react
- restful
- websockets




Log in or sign up for Devpost to join the conversation.