# Static Website Routing

**Date:** 2026-07-22  
**Developer:** Jeetendra Maharjan (mail.nepa@gmail.com)  
**Status:** In Progress

---

## Summary
Serve the public marketing site from Laravel Blade views at clean URLs (`/` → homepage, `/about` → about page, etc.) while keeping the Laravel admin under `/systemadmin`. Assets/images load from `public/fe`.

---

## Changes Made

### 1 — Static site clean URL routing
- **File(s) affected:** `app/Http/Controllers/Frontend/StaticPageController.php`, `routes/web.php`, `public/static/assets/js/main.js`
- **What was done:** Wired `/` and page slugs (`/about`, `/children`, etc.) to HTML files under `public/static`, rewriting asset and page links for clean URLs; updated nav active-state JS for clean paths. Admin remains under `/systemadmin`.
- **Why:** Serve the uploaded demo static website as the public site with pretty URLs.

### 2 — Per-page Blade views and controllers
- **File(s) affected:** `app/Http/Controllers/Frontend/{Home,About,Children,Sponsor,Impact,Events,Gallery,Contact,Donate}/*Controller.php`, `resources/views/frontend/*.blade.php`, `routes/web.php`; removed `StaticPageController.php`
- **What was done:** Copied each static HTML page into a Blade view with `route()` / asset links; added one Frontend controller per page that returns its view.
- **Why:** Stop serving raw HTML so pages can be made dynamic later.

### 3 — Point assets/images to `public/fe`
- **File(s) affected:** `resources/views/frontend/*.blade.php`
- **What was done:** Changed `asset('static/...')` to `asset('fe/...')` for CSS, JS, and images.
- **Why:** Assets and images now live under `public/fe`.

---

## Decisions & Notes
- Frontend media uses `asset('fe/assets/...')` and `asset('fe/images/...')`.
- Emails and social `@` handles are Blade-escaped as `@@`.
- Controllers currently only return views; services can be added when content becomes dynamic.
- Admin login/dashboard stays at `/systemadmin` (unchanged).

---

## Pending / Follow-up
- [ ] Confirm clean URLs and assets load correctly in browser
- [ ] Later: extract shared layout (nav/footer) and wire dynamic content
