Bernard Ngandu d3338e8901 Merge pull request #6 from bernard-ng/codex/remove-userlocation-from-responses
Introduce global location store and stop exposing user coordinates
2025-10-10 15:31:54 +02:00

Points of Interest

This repository hosts a proof-of-concept "points of interest" application composed of a Symfony API and a React client. Users can submit nearby signals and explore aggregated heatmaps that visualise recent activity.

Project structure

  • server/ Symfony 7 API that stores and broadcasts signal submissions.
  • client/ React (Vite) front-end that renders the map interface and live statistics.

Prerequisites

  • Node.js 20+
  • npm 10+
  • PHP 8.2+
  • Composer 2+
  • A running database supported by Doctrine (SQLite is used by default for local development)

Running the API server

cd server
composer install

# Create the database schema (SQLite by default)
php bin/console doctrine:database:create --if-not-exists
php bin/console doctrine:migrations:migrate --no-interaction

# Start the Symfony development server
symfony server:start

The API listens on http://127.0.0.1:8000 by default. Adjust the Mercure hub and other environment variables in .env as needed.

Running the client

cd client
npm install
npm run dev

The client starts on http://localhost:5173. Set the VITE_API_BASE, VITE_MERCURE_HUB, and VITE_MERCURE_TOPIC environment variables (see client/.env.example if available) to point to the API and Mercure hub instances.

Testing

  • API: cd server && ./vendor/bin/phpunit
  • Client: cd client && npm run build (ensures the TypeScript build succeeds)

Additional notes

  • The API uses Mercure for real-time updates. Ensure a Mercure hub is running and reachable by the client when testing streaming features.
  • Review the individual README.md files inside client/ and server/ for more detailed configuration guidance.
S
Description
Points of Interest: collaborative hotspot mapping through anonymous crowdsourcing
Readme 3.9 MiB
Languages
TypeScript 69.2%
PHP 25.5%
CSS 3.4%
JavaScript 1.6%
HTML 0.3%