906 B
906 B
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
- Main component:
- 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
/apito that address by default)
Install dependencies
cd localist/frontend
npm install
# or
yarn