A zodiac compatibility app is a perfect beginner project because it combines real logic with instant visual payoff. The user picks two zodiac signs, and the app scores how well they match — with a short explanation for each pairing. You will practice arrays, objects, conditional logic, and DOM updates, and you will end up with something people actually enjoy playing with.
The core idea is a compatibility table. Each sign has an element — fire, earth, air, or water — and signs of the same element match well, while fire and air (or earth and water) match even better. That single rule already produces sensible results, and you can refine it with a few special pairings.
const signs = [
{ name: 'Aries', element: 'fire' },
{ name: 'Taurus', element: 'earth' },
{ name: 'Gemini', element: 'air' },
{ name: 'Cancer', element: 'water' },
{ name: 'Leo', element: 'fire' },
{ name: 'Virgo', element: 'earth' },
{ name: 'Libra', element: 'air' },
{ name: 'Scorpio', element: 'water' },
{ name: 'Sagittarius', element: 'fire' },
{ name: 'Capricorn', element: 'earth' },
{ name: 'Aquarius', element: 'air' },
{ name: 'Pisces', element: 'water' },
]
function compatibility(a, b) {
if (a.name === b.name) return { score: 90, note: 'Same sign — you get each other instantly.' }
if (a.element === b.element) return { score: 85, note: 'Same element — natural understanding.' }
const good = { fire: 'air', air: 'fire', earth: 'water', water: 'earth' }
if (good[a.element] === b.element) return { score: 80, note: 'Complementary elements — sparks and balance.' }
return { score: 55, note: 'Different elements — it takes effort, but opposites can grow together.' }
}
Build the interface with two dropdowns, a button, and a result card that shows the score as a progress bar and the note underneath. Add a small detail panel that shows each sign's dates and traits — a zodiac signs guide is a handy reference for getting the 12 rashis, their dates, and their traits right.
This project teaches you to model real-world data as objects, to write a pure function that turns two inputs into one result, and to update the page without reloading it. Once the basic version works, add a share button, a history of recent checks saved to localStorage, or a daily compatibility tip.
The limits are honest ones. Zodiac compatibility is entertainment, not science — say so in the app, and do not present the score as a prediction about a real relationship. Keep the copy playful and the expectations clear.
Ship it this weekend: two dropdowns, one function, one result card. It is a small project with a big payoff — the kind of thing that makes a portfolio feel alive.
Top comments (0)