Skip to content

ayodaniel6/careerQuiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎯 Career Quiz with Google Gemini + Netlify

An interactive career quiz built with HTML, TailwindCSS, and JavaScript on the frontend, powered by Google Gemini API for career suggestions, and deployed seamlessly on Netlify using serverless functions.


✨ Features

  • πŸ“ Simple career quiz form (built with TailwindCSS)
  • ⚑ Real-time responses from Gemini 1.5 Flash
  • 🌍 Serverless backend with Netlify Functions
  • πŸ”‘ Secure environment variables (no API key exposed in frontend)
  • πŸš€ Continuous deployment with GitHub β†’ Netlify integration

πŸ› οΈ Tech Stack

  • Frontend: HTML, TailwindCSS, JavaScript (Vanilla)
  • Backend: Netlify Functions (Node.js)
  • AI API: Google Gemini (gemini-1.5-flash)
  • Deployment: Netlify (linked with GitHub)

πŸ“‚ Project Structure

career-quiz/ β”‚ β”œβ”€β”€ netlify/ β”‚ └── functions/ β”‚ └── quiz.js # Serverless function calling Gemini API β”‚ β”œβ”€β”€ public/ β”‚ β”œβ”€β”€ index.html # Main quiz page β”‚ └── quiz.js # Handles quiz form + fetch request β”‚ β”œβ”€β”€ .gitignore # Prevents .env and node_modules from being pushed β”œβ”€β”€ netlify.toml # Netlify build + functions config └── README.md # Documentation


πŸš€ Getting Started

1. Clone the repository

git clone [https://github.com/your-username/career-quiz.git](https://github.com/ayodaniel6/careerQuiz.git)

cd career-quiz

### 2. Install dependences
npm install

### 3. Create a .env file in the project root
GEMINI_API_KEY=your_real_api_key_here

### 4. Run locally with Netlify Dev
netlify dev
Visit πŸ‘‰ http://localhost:8888

### 5. Deploy
Push to your GitHub repo β€” Netlify will auto-deploy ✨


##πŸ§ͺ Testing API locally

To check if your Gemini API works:
curl \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{
      "parts":[{"text": "Hello Gemini!"}]
    }]
  }' \
  "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key=YOUR_API_KEY"

## πŸ“Έ Demo Screenshot

<img width="703" height="911" alt="Screenshot 2025-09-12 124448" src="https://github.com/user-attachments/assets/2bb7c78e-efc5-4079-a228-9bd54d30accb" />

## πŸ”’ Security Notes

Never commit your .env file or API keys.
Always store API keys as environment variables in Netlify.

πŸ§‘β€πŸ’» Author

Built with ❀️ by Ayodeji

About

✨ Career Quiz is a playful yet smart web app that helps you discover career paths based on your answers to simple questions. Powered by Google Gemini, it doesn’t just give generic advice β€” it crafts tailored suggestions and next steps, all wrapped in a clean, minimal interface. Think of it as a career coach, but cooler. πŸš€

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors