Skip to content

About

Find on-duty pharmacies near you, anytime, anywhere in Greece ⚕️

Resources

Stars

15 stars

Watchers

2 watching

Forks

Repository files navigation

🏥 PharmaFinder Greece

PharmaFinder Banner

Find on-duty pharmacies near you, anytime, anywhere in Greece.

PharmaFinder is a modern, high-performance web application designed to help users locate on-duty pharmacies (εφημερεύοντα φαρμακεία) across Greece. Built with the latest web technologies, it offers a seamless experience with an interactive map, real-time filtering, and a mobile-first design.

License TypeScript Next.js Tailwind CSS Jest React Doctor

✨ Key Features

  • 🗺️ Interactive Map: Powered by MapLibre GL, featuring high-performance clustering, custom markers, and smooth transitions.
  • 📍 Geolocation: Automatically detects user location on page load. Falls back to IP-based geolocation if browser permission is denied.
  • ❤️ Favorites: Save your preferred pharmacies to localStorage; favorites appear on the map with a red indicator and are always visible regardless of radius.
  • 🌓 Dark/Light Mode: Fully supported system-aware theme switching.
  • 🔍 Smart Filtering: Filter by city, time, and radius.
  • 🔗 Deep Linking: URL-based state management using Nuqs, allowing users to share exact search results and map views.
  • 📱 Mobile First: Responsive design optimized for all device sizes.
  • ⚡ High Performance: Utilizing TanStack Query for efficient data fetching and caching.

📸 Screenshots

Desktop

Desktop View

Mobile

Mobile View

🛠️ Tech Stack

This project is engineered with a focus on scalability, maintainability, and performance.

Core

  • Next.js 16 - The React Framework for the Web (App Router).
  • React 19 - The library for web and native user interfaces.
  • TypeScript - Strongly typed programming language.

UI & Styling

State & Data

  • Zustand - Small, fast and scalable bearbones state-management solution.
  • TanStack Query - Powerful asynchronous state management.
  • Nuqs - Type-safe search params state manager for Next.js.

🏗️ Architecture

The project follows the Feature-Sliced Design (FSD) methodology, ensuring a loosely coupled and highly cohesive codebase.

src/
├── app/          # App Router entry points (pages, layouts)
├── widgets/      # Compositional layers (complex UI blocks)
├── features/     # User scenarios (search, filter, locate)
├── entities/     # Business entities (pharmacy, city)
├── shared/       # Reusable infrastructure code (UI kit, api, libs)
└── ...

This structure allows for better scalability and easier refactoring as the application grows.

🧪 Quality & Testing

The project implements Test-Driven Development (TDD) principles using a modern testing stack:

  • Jest: Robust JavaScript testing framework.
  • React Testing Library: Standard for testing React components.
  • Automated Verification:
    • Unit Tests: Coverage for complex business logic (e.g., pharmacy status calculations).
    • Server Component Tests: Integration tests for Next.js Server Components, verifying data fetching, metadata generation, and routing logic.
    • Mocking Strategy: Isolated testing of business logic from external APIs and Next.js internal modules.

🚀 Getting Started

Prerequisites

  • Node.js (v20+ recommended)
  • Bun (preferred) or npm/yarn

Installation

  1. Clone the repository:

    git clone https://github.com/eliac7/pharmafinder-greece.git
    cd pharmafinder-greece
  2. Install dependencies:

    bun install
    # or
    npm install
  3. Set up environment variables: Create a .env.local file in the root directory (use .env.example as a reference):

    # App
    NEXT_PUBLIC_APP_URL=http://localhost:3000
    
    # Backend API
    API_BASE_URL=http://localhost:8000
    API_SECRET_KEY=your_api_secret_key
    
    # Security
    ENCRYPTION_SECRET=your_encryption_secret
    ENCRYPTION_SALT=your_encryption_salt
    
    # Services
    NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_key_here
    NEXT_PUBLIC_TURNSTILE_SITE_KEY=your_site_key
    NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX
  4. Run the development server:

    bun dev
    # or
    npm run dev
  5. Open http://localhost:3000 with your browser to see the result.

📜 Scripts

  • bun dev: Starts the development server.
  • bun build: Builds the application for production.
  • bun test: Runs the Jest test suite.
  • bun start: Starts the production server.
  • bun lint: Runs ESLint to check for code quality issues.

📄 License

© 2026 Ilias Nikolaos Thalassochoritis. All Rights Reserved.

This repository and its contents are proprietary. The source code is provided publicly strictly for portfolio demonstration and educational viewing purposes only.

You are NOT permitted to use, copy, modify, merge, publish, distribute, sublicense, or sell copies of this software, for commercial or non-commercial purposes, without explicit prior written consent from the author. See the LICENSE file for full details.

👨‍💻 Author

Ilias Nikolaos Thalassochoritis

About

Find on-duty pharmacies near you, anytime, anywhere in Greece ⚕️

Resources

Stars

15 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages