Skip to content

abdimannor/heartlux

Repository files navigation

❀️ Heartlux

Modern dating and social discovery app β€” Where meaningful connections flow.

Status Checks License Built with GitHub

A beautifully designed, fully responsive web application for discovering and connecting with people who share your interests. Built with modern web standards (HTML5, CSS3, vanilla JavaScript) and inspired by contemporary dating app design.

Live Demo: https://abdimannor.github.io/heartlux/

Heartlux app preview


🎯 About This Project

Heartlux demonstrates professional frontend development practices by combining:

  • Original Design Concept – Built upon and modernized from an earlier dating app design
  • Clean Code – No frameworks, no build tools β€” pure, efficient web technologies
  • Modern Standards – Responsive design, semantic HTML, CSS Grid/Flexbox
  • Professional Structure – Well-organized, maintainable, production-ready code

Perfect for: Portfolio projects, learning web development, dating app concepts, or as a starting point for your own social app.


✨ Core Features

πŸ‘€ User Management

  • Account Registration – Create account with email, password, and gender identity
  • Secure Validation – Password strength checking (min 8 characters), email format validation
  • Profile Setup – Configure interests, age range, and connection preferences
  • Data Persistence – All user data saved locally (localStorage)

🎯 Discovery & Preferences

  • Preference Selection – Choose who you'd like to meet (Men, Women, Everyone)
  • Age Range Slider – Dual min–max slider for precise age filtering (18–80 years)
  • Interest Tagging – Multi-select from 6 interest categories
    • ✈️ Travel
    • 🎡 Music
    • πŸ’ͺ Fitness
    • 🍳 Cooking
    • πŸ“š Books
    • 🎨 Art
  • Advanced Matching – Profiles sorted by compatibility score (shared interests)

🎨 Design & UX

  • Responsive Layout – Perfectly optimized for mobile, tablet, and desktop
  • Smooth Animations – Fade transitions, hover effects, micro-interactions
  • Modern Aesthetic – Heart-themed magenta/pink color scheme with romantic design
  • Dark Mode – One-click dark/light theme toggle, persisted across sessions
  • Bilingual – Full Swedish/English interface with instant language switching

⚑ Technical Features

  • Single Page App – No page reloads, instant navigation between sections
  • Vanilla JavaScript – No dependencies, lightweight and fast
  • Form Validation – Client-side validation with user feedback
  • Notification Badges – Real-time unread match counter in the navbar
  • PWA Ready – Installable app metadata and offline shell caching
  • SEO & Sharing – Canonical URL, Open Graph/Twitter cards, structured data, robots, and sitemap
  • Accessibility – Semantic HTML, proper contrast ratios, keyboard navigation

🎨 Design Highlights

Color Palette

Color Hex Usage
Heart Primary #cc328c Buttons, accents, headers
Heart Dark #a91f6a Hover states, shadows
Heart Light #e84b9a Secondary accents
Background #fff9fb Page background
Text Dark #2d1b2e Primary text

Responsive Design

Device Width Layout
Desktop 1200px+ Two-column hero, full features
Tablet 768px-1199px Optimized spacing, medium columns
Mobile <480px Single column, touch-friendly

πŸš€ Quick Start

Prerequisites

βœ“ Modern web browser (Chrome 90+, Firefox 88+, Safari 14+, Edge 90+)
βœ“ No installation or dependencies required

Installation

Option 1: Clone Repository

git clone https://github.com/abdimannor/heartlux.git
cd heartlux

Option 2: Download

Run the App

Direct Open (Simplest)

# Double-click index.html
# Or right-click β†’ Open with β†’ Your browser

Local Server (Recommended)

# Python 3
python -m http.server 8000

# Python 2
python -m SimpleHTTPServer 8000

# Node.js
npm start

# Then visit: http://localhost:8080

Quality Checks

npm run check
npm run check:e2e

This validates JavaScript syntax, key HTML-to-JavaScript wiring, i18n coverage, PWA/SEO wiring, and the main browser flow with Playwright.


πŸ“– Usage Guide

Step 1: Landing Page

  • Read the introduction
  • Click "Start Discovering" (jump to preferences)
  • Click "Create Account" (register first)

Step 2: Create Account

1. Enter unique username
2. Enter email address
3. Create password (min 8 characters)
4. Confirm password
5. Select gender identity (Man, Woman, Other)
6. Click "Skapa Konto" β†’ Success! βœ“

Step 3: Set Preferences

1. Choose who to meet:
   β€’ Men (πŸ‘¨)
   β€’ Women (πŸ‘©)
   β€’ Everyone (🌍)
2. Adjust age range with slider
3. Select interests (minimum 1):
   βœ“ Multi-select checkbox
   βœ“ Visual feedback on select
4. Click "SlutfΓΆr Profilen" β†’ Animated success! βœ“

Step 4: Navigation

  • Use navbar to switch pages
  • Smooth page transitions
  • Data persists across sessions

πŸ—‚οΈ Project Structure

heartlux/
β”œβ”€β”€ index.html              # Main app β€” all pages in one SPA
β”œβ”€β”€ css/
β”‚   └── style.css          # Complete styling β€” responsive + dark mode
β”œβ”€β”€ js/
β”‚   └── main.js            # App logic β€” i18n, matching, chat, notifications
β”œβ”€β”€ server.js              # Minimal Node static-file server (port 8080)
β”œβ”€β”€ manifest.webmanifest   # PWA install metadata
β”œβ”€β”€ sw.js                  # Offline app shell cache
β”œβ”€β”€ robots.txt             # Search crawler policy
β”œβ”€β”€ sitemap.xml            # Public URL sitemap
β”œβ”€β”€ 404.html               # GitHub Pages fallback page
β”œβ”€β”€ playwright.config.js   # Browser test configuration
β”œβ”€β”€ tests/
β”‚   └── app.spec.js        # Playwright end-to-end flow
β”œβ”€β”€ images/
β”‚   └── heartlux-preview.svg # Repository preview image
β”œβ”€β”€ scripts/
β”‚   └── smoke-test.js      # Lightweight project checks
β”œβ”€β”€ package.json           # npm scripts and project metadata
β”œβ”€β”€ .nojekyll              # GitHub Pages passthrough config
β”œβ”€β”€ README.md              # This documentation
β”œβ”€β”€ .gitignore             # Git configuration
└── LICENSE                # MIT License

File Details

index.html

  • Semantic HTML5 structure
  • Five pages: Home, Register/Login, Discover, Matches, Profile
  • Chat modal and match popup overlays
  • Accessible markup with proper hierarchy

css/style.css

  • CSS custom properties (variables) with full dark-mode override
  • Mobile-first responsive design
  • Flexbox and CSS Grid layouts
  • Smooth animations (swipe, popup, badge, card transitions)

js/main.js

  • Page navigation and auth guard system
  • Swedish/English i18n with instant switching
  • Swipe gesture engine (mouse + touch)
  • Compatibility-scored matching algorithm
  • Chat with persistent message history
  • Notification badge and seen-match tracking
  • localStorage integration throughout

πŸ”§ Technical Stack

Technology Purpose Details
HTML5 Structure Semantic markup, form validation
CSS3 Styling Grid, Flexbox, custom properties, responsive
JavaScript (ES6+) Interactivity Vanilla JS, no frameworks
localStorage Storage Client-side data persistence

πŸ’Ύ Data Management

What Gets Stored?

heartlux_user           // { username, email, gender, createdAt }
heartlux_interest       // "male" | "female" | "everyone"
heartlux_preferences    // { interest, minAge, maxAge, interests[], completedAt }
heartlux_likes          // profile ID array
heartlux_passes         // profile ID array
heartlux_matches_list   // matched profile objects array
heartlux_chats          // { [profileId]: [{ from, text, ts }] }
heartlux_seen_matches   // profile IDs opened in chat
heartlux_unread         // unread match count (number)
heartlux_user_avatar    // chosen emoji string
heartlux_user_bio       // profile bio text
heartlux_dark           // "1" | "0" (dark mode preference)
heartlux_lang           // "sv" | "en"

Browser Storage

  • Data saved in localStorage (browser's local storage)
  • Persists across sessions and page refreshes
  • No server communication (client-side only)
  • Limited to ~5-10MB per domain

Privacy

  • βœ“ No data sent to servers
  • βœ“ No external API calls
  • βœ“ No tracking or analytics
  • βœ“ Passwords not stored (demo only)

πŸŽ“ Learning Highlights

Concepts Demonstrated

  • βœ“ Single Page Application (SPA) pattern
  • βœ“ Responsive mobile-first design
  • βœ“ Modern CSS (Grid, Flexbox, custom properties)
  • βœ“ Vanilla JavaScript state management
  • βœ“ Form handling and validation
  • βœ“ localStorage API
  • βœ“ Semantic HTML5
  • βœ“ Event-driven architecture

Code Quality

  • Clean, readable code
  • Minimal comments (self-documenting)
  • Consistent formatting
  • No code duplication
  • Accessibility-first approach

🚦 Development Roadmap

βœ… Phase 1: Foundation (Complete)

  • Landing page with hero section
  • User registration system
  • Preference setup flow
  • Data persistence (localStorage)
  • Responsive design (mobile to desktop)

βœ… Phase 2: Matches & Profiles (Complete)

  • Profile browsing system
  • Match algorithm based on preferences
  • Swipe or click interaction
  • Like/Pass functionality
  • Match history

βœ… Phase 3: Enhanced Features (Complete)

  • User avatars and profile images
  • Direct messaging system
  • Notification system
  • Dark mode toggle
  • Advanced matching algorithm

🎯 Phase 4: Production Ready

  • Backend API integration
  • User authentication (real passwords)
  • Database (Firebase/MongoDB/PostgreSQL)
  • PWA capabilities (offline, installable)
  • Performance optimization
  • Analytics and metrics

🌐 Deployment Options

Option 1: GitHub Pages (Free, Recommended)

# 1. Already pushed? Skip to step 3
git add .
git commit -m "Deploy to GitHub Pages"
git push origin master

# 2. Repository Settings β†’ Pages
# Source: master/main branch β†’ Save

# 3. Live at: https://abdimannor.github.io/heartlux

Option 2: Netlify (Free)

  • Drag & drop the folder
  • Auto-deploys on git push
  • Custom domain support

Option 3: Vercel (Free)

  • Connect GitHub repo
  • Auto-deploys
  • Global CDN

Option 4: Any Static Hosting

  • Firebase Hosting
  • GitHub Pages
  • AWS S3 + CloudFront
  • Custom server

SEO & Deployment Metadata

  • Canonical URL: https://abdimannor.github.io/heartlux/
  • Open Graph and Twitter card metadata for richer sharing
  • Structured data (SoftwareApplication) for search engines
  • robots.txt and sitemap.xml for public indexing

🀝 Contributing

Want to improve Heartlux? Follow these steps:

  1. Fork the repository

    # Click "Fork" on GitHub
  2. Create feature branch

    git checkout -b feature/amazing-feature
  3. Make improvements

    • Follow existing code style
    • Test thoroughly
    • Update documentation
  4. Commit changes

    git commit -m "Add: description of feature"
  5. Push to GitHub

    git push origin feature/amazing-feature
  6. Open Pull Request

    • Describe changes clearly
    • Link any related issues

πŸ“Š Project Statistics

  • Total Lines: ~3,375 (HTML + CSS + JS)
  • Total Size: ~108 KB (all files)
  • CSS: ~36 KB (1,792 lines)
  • JavaScript: ~48 KB (1,117 lines)
  • HTML: ~24 KB (466 lines)
  • Load Time: <100ms (local), <500ms (hosted)
  • Browser Support: 95%+ of users
  • Mobile Responsive: 100%
  • Accessibility: 90+/100

πŸ› Known Limitations

Current Constraints

  • No backend database (localStorage only β€” data is device-specific)
  • No real user accounts or server-side matching
  • No image uploads (emoji avatars as placeholders)
  • localStorage limited to ~5-10MB per domain

Future Solutions (Phase 4)

  • Backend API integration
  • Real database (Firebase / PostgreSQL)
  • Image uploads and hosting
  • Push notifications
  • PWA β€” installable, offline-capable

πŸ” Security Notes

Current (Demo Only)

  • ⚠️ Passwords stored as *** (not real hashing)
  • ⚠️ No authentication server
  • ⚠️ All data stored locally (no encryption)

Production Recommendations

  • βœ“ Use HTTPS
  • βœ“ Hash passwords (bcrypt, Argon2)
  • βœ“ Implement OAuth/JWT authentication
  • βœ“ Encrypt sensitive data
  • βœ“ Add rate limiting
  • βœ“ Validate all inputs server-side

πŸ“š Resources & Learning

Web Development

Design

Responsive Design


πŸ“ License

MIT License – Free for personal, educational, and commercial use

Copyright (c) 2026 Mahad Abdullahi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software...

View Full License


πŸ‘€ Author & Contact


πŸ™ Acknowledgments

  • Original design concept from student web development project
  • Inspired by modern dating app interfaces
  • Built with modern web standards and best practices
  • Thanks to the open-source community

⭐ Show Your Support

If Heartlux helped you or you found it useful:

  • Star the repo ⭐ (on GitHub)
  • Fork and contribute 🍴
  • Share with others πŸ“’
  • Provide feedback πŸ’¬

Built with ❀️ using HTML, CSS, and JavaScript
An evolution of web development β€” from student exercises to production-ready code.

About

Modern dating and social discovery app built with HTML, CSS, and vanilla JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors