DEV Community

Zaima Sohail
Zaima Sohail

Posted on Originally published at Medium on

Building an AI Resume Analyzer That Matches You to Real Jobs

What I learned building a full-stack AI app with Gemini, live job APIs and Supabase, and why the AI was the easy part.

When I started applying for machine learning roles, I kept asking the same two questions. Is my resume actually good? And which of the hundreds of job postings out there do I really fit?

So I built a tool to answer both. You upload your resume, and the app reviews it, points out concrete problems, and searches live job listings from sites like LinkedIn and Glassdoor. Then it ranks every job by how well it matches you.

The full code is on GitHub. This post isn’t a line-by-line tutorial. It’s the five lessons that surprised me most, because most of them had nothing to do with the AI.

How it works

The app is built in Python with Streamlit, and it has four tabs that follow the user’s journey:

  1. Your Profile. You enter your target job title, experience level, years of experience, top skills (each rated 1 to 5), location and preferred work type.
  2. Upload Resume. The app reads a PDF or Word file, splits it into sections like Experience, Skills and Projects, and extracts your email, phone, LinkedIn and GitHub links.
  3. Analysis. Fixed rules check for common problems, then Google Gemini gives a scored AI review with suggested rewrites.
  4. Jobs. The app searches several job sources, scores every job against your resume and profile, and shows the best matches first.

Users log in with their own account, so their profile, past analyses and saved jobs are there next time.

Lesson 1: Let rules and the LLM do different jobs

My first instinct was to send the whole resume to an LLM and ask “what’s wrong with it?” I ended up splitting the work in two.

Rule checks handle anything that can be checked exactly. Missing sections, missing contact details, resume length, bullet points with no numbers, and weak phrases like “responsible for” or “worked on”. These rules are instant, free, and give the same answer every time. On my own CV, they flagged 20 bullet points with no measurable results, and that my resume had no LinkedIn link. Both were fair.

The LLM handles judgment. Gemini gives an overall score, an ATS score, strengths, problems with fixes, rewritten bullet points, and keywords missing for the target role. I ask for JSON only, validate it into Python dataclasses, and retry once if the reply is malformed.

Two things went wrong along the way, and both taught me something.

The model didn’t know today’s date. On my first real run, Gemini flagged my current job, which started in August 2025, as “employment starting in the future”. Language models have no clock; their sense of “now” comes from their training data. The fix was one line: put today’s date in every prompt and tell the model to judge dates against it.

The model must never invent achievements. A resume tool that writes “improved performance by 40%” when you never measured anything is worse than useless. So the prompt says to keep every fact from the original bullet and use placeholders like [X%] for numbers the resume doesn't contain. I also pass the same weak-phrase list the rule checks use, so the AI's rewrites don't use phrases the app itself would flag.

The model still isn’t perfect. Once it called “Designed custom ERP modules” weak, even though “Designed” is a strong verb. That’s why the rule checks sit alongside the AI rather than being replaced by it.

Lesson 2: You can’t just scrape LinkedIn

I wanted jobs from LinkedIn, Indeed and Glassdoor. It turns out none of them offers a public API for reading job postings, and scraping them breaks their terms of service and gets blocked quickly.

The legal route was to combine several sources:

Every source returns the same Job dataclass, so the rest of the app doesn't care where a job came from. If one source fails, the app shows a warning and carries on with the others.

Two real-world surprises:

  • APIs change without warning. My first JSearch request returned “Endpoint ‘/search’ does not exist”. The provider had retired it in favour of /search-v2, which also changed the response format.
  • Coverage is uneven. Adzuna doesn’t cover Pakistan, so for a search in Lahore the app skips it with a friendly note rather than an error. JSearch, on the other hand, returned 10 Lahore-based ML jobs on the first try.

Because free quotas are tiny, every search is cached for 6 hours. That also keeps the app within Remotive’s request of only a few fetches per day.

Lesson 3: A match score is only good if you tune it on real data

Each job gets a score from 0 to 100, made of four parts:

score = 45 × skills + 20 × title + 20 × experience + 15 × location
Enter fullscreen mode Exit fullscreen mode

Each part is between 0 and 1. Skills are weighted by how the user rated them, and the score is based on their top 5 skills, so listing many skills never lowers a match.

The first version passed all its tests. Then I ran it on my own CV and real Lahore jobs, and the problems were obvious:

After tuning, the top results were the right ones: a “Junior Machine Learning Engineer” role asking for 1+ years ranked first with a score of 82 for a junior with 1 year of experience, and senior roles were labelled “above your level”.

The lesson: tests prove the code does what you designed. Only real data shows whether the design was right.

Lesson 4: Security belongs in the database, not just the code

Before putting the app online, I added user accounts with Supabase. This raised three problems I hadn’t thought about.

One app, many visitors. Streamlit runs a single Python process for everyone. If the logged-in user were stored in a normal module-level variable, the last person to log in would be logged in for everybody. Each visitor gets their own Supabase client and session, stored in Streamlit’s per-browser session_state.

What stops user A reading user B’s data? Every query in the code filters by user ID, but that’s not the real protection. Supabase’s Row Level Security checks every request inside the database, using the signed login token: a user can only read and change rows where auth.uid() = user_id. Even if my Python code had a bug that forgot the filter, the database would still return only the caller's own rows.

Stopping one user from draining the API quotas. Each user gets 5 job searches and 3 AI reviews per day. Users can read their usage counts but can’t change them directly, or they could reset their own limits. The only way to increase a count is a database function that checks the limit and adds one in a single step.

I also made privacy choices on purpose. The app never stores the resume file or its full text, only the analysis results. It tells users that their resume text is sent to Gemini, and they can delete their data or their whole account with one button.

Lesson 5: Measure before you optimize

Once the app was live, it felt slow. I was ready to blame the free server or the distance to the database. Instead, I added timing logs around every major step first.

The measurements pointed somewhere I didn’t expect. Ranking jobs took about 1,050 ms , because the missing-skills check ran about 19,000 regex searches per search. Two-thirds of them asked the same question for every job: is this skill already in the resume?

The fixes were simple once I could see the problem:

  • Work out the user’s skills once per search instead of once per job.
  • Skip a regex entirely when a skill’s letters don’t appear in the text.
  • Reuse compiled patterns.

Ranking dropped to about 170 ms , roughly 6× faster, and I checked that every score and skill list stayed identical.

Two more changes helped. Streamlit reruns the whole script on every click, including the code of hidden tabs, so I moved the job results into a fragment that reruns on its own, and showed 20 jobs at a time with a “Show more” button. I also stopped reloading data from the database after every change, updating the lists on screen directly instead.

If I’d guessed, I would have spent hours moving the database to another region. The real problem was one loop.

Conclusion

The AI review was the part I expected to be hard, and it turned out to be one of the quicker parts to build. The parts that took real work were everything around it: finding legal job sources, tuning a score on real data, keeping users’ data separate, protecting free API quotas, and finding out why the app was slow.

If you’re building an AI project for your portfolio, that’s my main advice: the model call is only the start. Validation, testing on real inputs, security and measurement are what turn a demo into something people can actually use.

The project has 478 automated tests and is built on the free tiers of Streamlit, Supabase, Gemini and the job APIs.

What would you add next? I’m thinking about making the AI quote the exact resume line behind each problem. Let me know in the comments.

Job data includes listings from Remotive.

Top comments (0)