Skip to content

Commit d2172e4

Browse files
committed
Add church submission form and Cloudflare Worker API
Frontend: - SubmitChurchPage with form, Nominatim geocoding, draggable map marker - React Hook Form + Zod for validation - Three action types: add, edit, delete - Added to routing and header nav Worker (farese-api): - POST /api/submit-church endpoint - Validates submission data - Creates GitHub branch and PR with changes to data.json - Deployed to farese-api.pig.workers.dev Dependencies added: react-hook-form, zod, @hookform/resolvers
1 parent 0ed8146 commit d2172e4

File tree

10 files changed

+2326
-2
lines changed

10 files changed

+2326
-2
lines changed

package-lock.json

Lines changed: 43 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020
},
2121
"homepage": "https://farese.com",
2222
"dependencies": {
23+
"@hookform/resolvers": "^5.2.2",
2324
"@maplibre/maplibre-gl-geocoder": "^1.7.0",
2425
"class-variance-authority": "^0.7.1",
2526
"clsx": "^2.1.1",
2627
"maplibre-gl": "^4.7.1",
2728
"react": "^19.2.3",
2829
"react-dom": "^19.2.3",
30+
"react-hook-form": "^7.71.1",
2931
"react-map-gl": "^7.1.7",
30-
"tailwind-merge": "^2.6.0"
32+
"tailwind-merge": "^2.6.0",
33+
"zod": "^4.3.5"
3134
},
3235
"devDependencies": {
3336
"@biomejs/biome": "^1.9.4",

src/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import HomePage from './pages/HomePage';
55
import MapPage from './pages/MapPage';
66
import ListPage from './pages/ListPage';
77
import AboutPage from './pages/AboutPage';
8+
import SubmitChurchPage from './pages/SubmitChurchPage';
89

910
function App() {
1011
const [currentPath, setCurrentPath] = useState(window.location.pathname);
@@ -32,6 +33,8 @@ function App() {
3233
return <ListPage />;
3334
case '/about':
3435
return <AboutPage />;
36+
case '/submit':
37+
return <SubmitChurchPage />;
3538
default:
3639
return <HomePage />;
3740
}

src/components/layout/Header.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ export default function Header() {
7171
Legacy
7272
</a>
7373
</li>
74+
<li>
75+
<a href="/submit" className="px-3 py-1 bg-white/20 rounded hover:bg-white/30 transition-colors">
76+
Submit
77+
</a>
78+
</li>
7479
</ul>
7580
</div>
7681

@@ -102,6 +107,11 @@ export default function Header() {
102107
Legacy
103108
</a>
104109
</li>
110+
<li>
111+
<a href="/submit" className="block py-2 hover:text-gray-200">
112+
Submit Update
113+
</a>
114+
</li>
105115
</ul>
106116
)}
107117
</div>

0 commit comments

Comments
 (0)