# Project export: resumebuilder.ai

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 10.0
- Tagline: Our resume builder creates the perfect match between the projects you've shed blood and tears on with your dream job.
- Devpost: https://devpost.com/software/resumebuilder-ai
- GitHub: https://github.com/ronaldarifin/calhacks-10.git
- Team: 1 GitHub contributor(s) — Michael Wiradharma (1 commits)

## Devpost submission (written by the team)

### Inspiration

Our team is fighting night and day during this recruitment season to internships. As with many others, we have varied interests in the fields that we specialize in, and we spend a lot of time tailoring our Résumes to the specific position we are looking at. We believe that an automatic Résume will immensely simplify this process.

### What it does

The program takes two inputs: (1) our CV, a full list of all the projects we've done and (2) The job description of the job posting. The program will then output a new compiled resume that contains rewritten information that is most relevant to the position.

### How we built it

We designed this project to utilize the most recent AI technologies. We made use of word2vec to create word embeddings, which we store in a Convex database. Then, using Convex's built-in vector search, we compare the job postings with your list of projects and experiences, and output the 5 most relevant ones. Finally, as a last measure, we run the projects through an LLM to shape them to be a good fit for the job description.

### Challenges we ran into

We had a lot of challenges making in handling the difference cases of resumes and parsing the differences in it.

### What we learned

We learned all sorts of things from this project. Firstly, the power of vector embeddings and their various use cases with all sorts of media. We also learned a lot regarding the space of ML models out there that we can make use of. Lastly, we learned how to quickly run through documentations of relevant technologies and shape them to our needs.

### What's next

We managed to get the nearest work summaries that is associated with the job. Next, we plan to rebuild the resume such that we get pdfs formated nicely using latex

## README (from the GitHub repository)

# calhacks-10
we don't know what we're doing


## Detected evidence (automated analysis)

Indexed codebase: 18 recognized source files, 27 KB.
- JavaScript (language) — detected in the code
- Python (language) — detected in the code
- TypeScript (language) — detected in the code
- OpenAI (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (26 of 26)

```
.DS_Store
.gitignore
.idea/.gitignore
.idea/calhacks.iml
.idea/inspectionProfiles/profiles_settings.xml
.idea/misc.xml
.idea/modules.xml
.idea/vcs.xml
my-app/.env.local
my-app/convex/_generated/api.d.ts
my-app/convex/_generated/api.js
my-app/convex/_generated/dataModel.d.ts
my-app/convex/_generated/server.d.ts
my-app/convex/_generated/server.js
my-app/convex/mutate.js
my-app/convex/queries.js
my-app/convex/README.md
my-app/convex/tasks.js
my-app/convex/tsconfig.json
my-app/data.jsonl
my-app/embeddings.py
my-app/frontend/App.py
my-app/json_generator.py
my-app/main.py
my-app/package.json
README.md
```

### Dependencies

- my-app/package.json: convex@^1.5.1

### Recent commits (newest first)

- frontend
- Merge branch 'main' of https://github.com/ronaldarifin/calhacks-10
- open ai prompts
- update
- Merge branch 'main' of https://github.com/ronaldarifin/calhacks-10
- updatez
- add .gitignore
- Create README.md
- resolve remote
- Resolved merge conflicts
- added main.py
- initial commit

## Key source files (fetched from GitHub, selected and truncated for size)

### my-app/package.json

```
{
  "name": "my-app",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "convex": "^1.5.1"
  }
}

```

### my-app/main.py

```python
import os

from dotenv import load_dotenv

from convex import ConvexClient

load_dotenv(".env.local")
load_dotenv()

client = ConvexClient(os.getenv("CONVEX_URL"))
print(client.query("queries:get_resume", {"user_id" : "1"}))
```

### my-app/frontend/App.py

```python
import gradio as gr

def process_text(cv_content, job_description):
    latex_code = f"\\text{{Text 1: {cv_content}}}\\text{{Text 2: {job_description}}}"
    return latex_code

iface = gr.Interface(
    fn=process_text, 
    inputs=[gr.Textbox(lines=5, placeholder="Enter your CV content here...", label="CV Content"), 
            gr.Textbox(lines=5, placeholder="Enter job description here...", label="Job Description")], 
    outputs=gr.Textbox(lines=10, label="Customized Resume"),  
    live=True,
)


iface.launch(inline=False, inbrowser=True)
```

### my-app/convex/_generated/server.js

```javascript
/* eslint-disable */
/**
 * Generated utilities for implementing server-side Convex query and mutation functions.
 *
 * THIS CODE IS AUTOMATICALLY GENERATED.
 *
 * Generated by convex@1.5.1.
 * To regenerate, run `npx convex dev`.
 * @module
 */

import {
  actionGeneric,
  httpActionGeneric,
  queryGeneric,
  mutationGeneric,
  internalActionGeneric,
  internalMutationGeneric,
  internalQueryGeneric,
} from "convex/server";

/**
 * Define a query in this Convex app's public API.
 *
 * This function will be allowed to read your Convex database and will be accessible from the client.
 *
 * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
 * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
 */
export const query = queryGeneric;

/**
 * Define a query that is only accessible from other Convex functions (but not from the client).
 *
 * This function will be allowed to read from your Convex database. It will not be accessible from the client.
 *
 * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
 * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
 */
export const internalQuery = internalQueryGeneric;

/**
 * Define a mutation in this Convex app's public API.
 *
 * This function will be allowed to modify your Convex database and will be accessible from the client.
 *
 * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
 * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
 */
export const mutation = mutationGeneric;

/**
 * Define a mutation that is only accessible from other Convex functions (but not from the client).
 *
 * This function will be allowed to modify your Convex database. It will not be accessible from the client.
 *
 * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
 * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
 */
export const internalMutation = internalMutationGeneric;

/**
 * Define an action in this Convex app's public API.
 *
 * An action is a function which can execute any JavaScript code, including non-deterministic
 * code and code with side-effects, like calling third-party services.
 * They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
 * They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
 *
 * @param func - The action. It receives an {@link ActionCtx} as its first argument.
 * @returns The wrapped action. Include this as an `export` to name it and make it accessible.
 */
export const action = actionGeneric;

/**
 * Define an action that is only accessible from other Convex functions (but not from the client).
 *
 * @param func - The function. It receives an {@link ActionCtx} as its first argument.
 * @returns The wrapped function. Include this as an `export` to name it and make it accessible.
 */
export const internalAction = internalActionGeneric;

/**
 * Define a Convex HTTP action.
 *
 * @param func - The function. It receives an {@link ActionCtx} as its first argument, and a `Request` object
 * as its second.
 * @returns The wrapped endpoint function. Route a URL path to this function in `convex/http.js`.
 */
export const httpAction = httpActionGeneric;

```

### .idea/vcs.xml

```xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="" vcs="Git" />
  </component>
</project>
```

### .idea/modules.xml

```xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/calhacks.iml" filepath="$PROJECT_DIR$/.idea/calhacks.iml" />
    </modules>
  </component>
</project>
```

### .idea/misc.xml

```xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Black">
    <option name="sdkName" value="Python 3.10 (calhacks)" />
  </component>
  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (calhacks)" project-jdk-type="Python SDK" />
</project>
```

### my-app/embeddings.py

```python
import json

result = """
{
    "name": "Matthew Kao",
    "location": "Berkeley, CA",
    "email": "matthewkao@berkeley.edu",
    "phone": "(925)-435-9524",
    "links": {
        "GitHub": "https://github.com/Matthew-Kao",
        "LinkedIn": "www.linkedin.com/in/mattkao"
    },
    "education": {
        "university": "University of California, Berkeley",
        "degree": "B.A. Computer Science",
        "graduationDate": "May 2023",
        "GPA": "3.7"
    },
    "skills": {
        "languages": [
            "Python",
            "C++",
            "C",
            "Java",
            "Javascript",
            "Ruby",
            "Dart"
        ],
        "front-end": [
            "HTML5",
            "CSS3",
            "Javascript",
            "React.js",
            "React Native",
            "Flutter"
        ]
    },
    "work experience": [
        {
            "employer": "Tokenized",
            "position": "Senior Javascript Developer",
            "location": "Melbourne",
            "summary": "Tokenized is a Bitcoin wallet for issuing, managing and trading digital tokens. I built out the front end which was packaged as an electron app. It was a difficult frontend to build because we store the users keys locally and used them to sign transactions and contracts.",
            "website": "https://tokenized.com/",
            "startDate": "2020-05-05",
            "highlights": ["React", "Redux", "SCSS", "Product"]
        },
        {
            "employer": "ACME Corp",
            "position": "Software Engineer",
            "location": "San Francisco",
            "summary": "ACME Corp is a small start-up working on a new product. I was the only engineer on the team and was responsible for the full stack development of the product.",
            "website": "https://www.acmecorp.com/",
            "startDate": "2019-04-01",
            "endDate": "2020-03-31",
            "highlights": ["Python", "Django", "Postgres", "AWS"]
        }
    ],
    "projects": [
        {
            "name": "Action Map",
            "techStack": [
                "Ruby",
                "Model-View-Controller (MVC)",
                "CSS",
                "JavaScript",
                "Rspec Tests",
                "Cucumber Scenarios"
            ],
            "startDate": "2023-01-01",
            "endDate": "2023-05-31",
            "description": "Action Map is a web application that displays the US Map where the states and counties are clickable. When clicked, it will show the political candidates for that area. The purpose of this project was to allow users to visualize the political environment within all levels of government."
        },
        {
            "name": "Pacman",
            "techStack": [
                "Python",
                "BFS",
                "DFS",
                "A*",
                "Monte Carlo Tree Search",
                "Reinforcement Learning"
            ],
            "startDate": "2022-08-01",
            "endDate": "2022-12-31",
            "description": "Pacman is a classic video game where the goal is to collect as many points as possible while avoiding ghosts. The purpose of this project was to develop an AI agent that can play the game optimally and collect the most points."
        }
    ]
}
"""


def print_neatly(json_string):
    data = json.loads(json_string)
    pretty_data = json.dumps(data, indent=6)
    print(pretty_data)

print_neatly(result)

```

### my-app/json_generator.py

```python
import openai

# Replace 'YOUR_API_KEY' with your actual API key
api_key = ''


def executeChatGptCall(inputToGpt, token):
    response = openai.Completion.create(
        engine="text-davinci-002",
        prompt=inputToGpt,
        max_tokens=token,  # Adjust the number of tokens as needed
        api_key=api_key
    )
    return response.choices[0].text.strip()

def cvToJson(userCV, jsonFormat):
    inputToGpt = f"This is my CV: {userCV} Now, I want you return me a json object about my CV. I only want the json object representation like this {jsonFormat}. Nothing else just the json string."
    return executeChatGptCall(inputToGpt, 1500)



jobDescription = """Key Qualifications
You may meet or have interest in any one of the following qualifications:
Strong object-oriented design skills, coupled with a deep knowledge of data structures and algorithms
Proficiency in one or more of the following developer skills: Java, C/C++, PHP, Python, Ruby, Unix, MySQL, Clojure, Scala, Java Script, CSS, HTML5
Experience in sophisticated methodologies such as Data Modeling, Validation, Processing, Hadoop, MapReduce, Mongo, Pig
Experience with web frameworks such as AngularJS, NodeJS, SproutCore
Proven experience in application development in Objective-C for macOS or iOS a plus
Client-Server protocol & API design Skills
Able to craft multi-functional requirements and translate them into practical engineering tasks
A fundamental knowledge of embedded processors, with in-depth knowledge of real time operating system concepts.
Excellent debugging and critical thinking skills
Excellent analytical and problem-solving skills
Ability to work in a fast paced, team-based environment"""


userCV = """Matthew Kao
Berkeley, CA | matthewkao@berkeley.edu | (925)-435-9524 |https://github.com/Matthew-Kao |www.linkedin.com/mattkao EDUCATION University of California, Berkeley | B.A. Computer Science May 2023 | GPA: 3.7
SKILLS
Languages: Python, C++, C, Java, Javascript, Ruby, Dart
Front-end: HTML5, CSS3, Javascript, React.js, React Native, Flutter
WORK EXPERIENCE DBRIEF.AI
Lead App Developer
Tools: Figma, Github, Firebase, AWS, MongoDB Back-end: Node.js, Next.js, Express, SQL, MongoDB, Rust
Berkeley, CA
May 2022 – December 2022
● LedthecreationoftheDbrief.AImobileappfromscratchusingDartandFlutter
● ConstructedandDesignedtheUserInterfaceusingFigma,employingbestpracticesinUXdesignandincorporatinguserfeedbackto
enhance usability and boost user satisfaction
● ArchitectedthesynchronizationbetweentheApplicationandBackendAPI,enablingdynamiccontentupdatesbasedonthelatest news, driving a 15% growth in daily active users
● LeveragedFirebase’sreal-timedatabasecapabilitiestoenabledynamicdataupdates,enhancingtheapplication’sresponsiveness and providing users with up-to-date information
● Engineered and deployed innovative ‘Tinder-style’ swiping features, granting users the capability to showcase political viewpoints through left/right swipes resulting in a 20% increase in time spent on the app per user
● Guided and Mentored a team of 4 through iterative development cycles, by implementing agile methodologies, leading daily stand-ups, and facilitating cross-functional collaboration to deliver the Application on time
Cryptok Berkeley, CA
Founder Aug 2022 – May 2023
● Collaborating within a team of four, Co-Founded and launched an MVP of a web3 based Video Platform that tokenizes everything on the service based on User Engagement (Likes/Dislikes, Comments, Shares)
● Optimized User Experience and performance by leveraging Flutter for Front-End development, resulting in a 10% decrease in app crashes
● ImplementedSolidityforBack-EndSmartContractsonBlockchainPlatforms,enablingseamlessandtamper-prooftransactions, leading to a 15% reduction in transaction processing time
● TestedtheMVPwith200+studentsandreceivedpositivefeedback(morethan70%willingtoswitchplatforms) \
HIGHLIGHTED PROJECTS
Action Map
Tech Stack: Ruby, Model-View-Controller (MVC), CSS, JavaScript, Rspec Tests, Cucumber Scenarios
Jan 2023 – May 2023
● Responsibleforfixing/debugginganApplicationthatDisplaystheUSMapwheretheStateandCountiesareclickable,whichwill then show the Political Candidates – Allowing users to visualize the Political environment within all levels of government
● Establishedtheinterconnectivitybetweenthevariouscontrollers,models,andviewsthatallowtheapptosearchtheGoogleCivic Information API to look up Political Candidates in specific states
● RefactoredlegacycodeofanoldApplicationbywritingCharacterizationTestsandthenfollowingRed-Green-Refactorprinciples
● ImprovedTestCoverageofeveryFileinthedirectorytomorethan90%byusingRspecandCucumbertests
Pacman Aug 2022 – Dec 2022 Tech Stack: Python, BFS, DFS, A*, Monte Carlo Tree Search, Reinforcement Learning
● Developed a Pacman AI project focused on optimizing point collection and decision-making within the game environment
● Programmed the AI algorithms in Python, leveraging data structures and algorithms to enhance game-solving capabilities
● Executed and compared various search algorithms, including Breadth-First Search, A* Search, Depth-First Search, and Monte Carlo Tree Search to enable Pacman to navigate the maze efficiently while maximizing point acquisition
● Employed Reinforcement Learning techniques, specifically Q-learning, to train the Pacman agent in making intelligent decisions by learning from interactions with the game environment
Scheme Interpreter Jan 2022 – May 2022 Tech Stack: Scheme, Python(Tree-Recursion), Turtle Graphics
● Architected a highly efficient and functional code interpreter for the Scheme language, revolutionizing the development process and enabling seamless execution of complex programs
● Implemented Turtle Graphics to create a Tree-Recursive Program using Python that can Read User Input in Scheme, Evaluate and Display the Accurate output in Scheme Language"""


jsonFormat = """
    {... include name, location, email, phone, links, education, and skills
    "work experience": [
      
[truncated — 880 more characters]
```

### my-app/convex/tasks.js

```javascript
import { query } from "./_generated/server";

export const get = query({
  handler: async ({ db }) => {
    return await db.query("tasks").collect();
  },
});
```

[7 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]