localist/frontend
2026-06-21 16:51:07 -04:00
..
src created frontend of a form to create events 2026-06-21 16:51:07 -04:00
package.json created frontend of a form to create events 2026-06-21 16:51:07 -04:00
README.md created frontend of a form to create events 2026-06-21 16:51:07 -04:00

Localist Frontend (React + Vite)

This directory contains the frontend application for Localist built with React + Vite.

It provides an event creation form with an embedded Leaflet map and a search bar (leaflet-geosearch). The form uses react-hook-form with a Zod schema to validate and transform outgoing payloads (the schema nests flat latitude/longitude into a location object before sending).

Quick links

  • Source: src/
    • Main component: src/components/eventForm.jsx
    • Validation/transform schema: src/schemas/eventPostSchema.js
    • API client: src/services/eventService.js
  • Vite config: vite.config.js

Prerequisites

  • Node.js (16+ recommended)
  • npm or yarn
  • Django backend running locally at http://127.0.0.1:8000 if you want the API to respond (the Vite config proxies /api to that address by default)

Install dependencies

cd localist/frontend
npm install
# or
yarn