CivicLens — a frontend-focused civic issues & reviews app (React + Vite).
This repository contains the frontend of the project. The original template included backend and Netlify serverless functions; this workspace has been adapted to frontend-only usage.
- Framework: React (SWC) + Vite
- Styling: Tailwind CSS
- Structure: Single-page app living in
client/with shared types/utilities inshared/and static assets inpublic/.
index.html— main HTML entryclient/— React app sourceApp.tsx,main.tsx— app bootstrapcomponents/— UI components and page componentspages/— route pages (HomeFeed, CreatePost, Admin, etc.)hooks/,contexts/,locales/,lib/— helpers and utilities
shared/— types and small shared helpers used across client/server originallypublic/— static assets (images, robots.txt, etc.)vite.config.ts— Vite configuration (server.fs.allow adjusted to allow project root)script.sh— helper script that stages and commits files individually with descriptive messages
Note: The
server/andnetlify/folders were removed from this workspace to make the repository frontend-only. If you need server-side routes again, restore them in a separate backend repository or reintroduce aserver/folder.
- Install dependencies:
# using npm
npm install
# or using pnpm
pnpm install- Run development server:
npm run dev
# or pnpm devThe app is served by Vite. If you get a 403 about serving index.html, ensure vite.config.ts contains server.fs.allow that includes . (project root) — this repo already includes that change.
npm run build
# or pnpm buildBuilt files are output to dist/spa by default (see vite.config.ts).
This project is frontend-only. Deploy to any static-hosting service that supports Vite builds (Netlify, Vercel, GitHub Pages, etc.). Example Netlify / Vercel steps:
- Build the project (
npm run build) and point the deployment to thedist/spafolder.
If you prefer to reintroduce serverless functions, add a netlify/ or server/ folder back and configure the hosting provider accordingly.
- Replace demo/sample content in
client/pages/andclient/components/with your own content and branding. - Update metadata in
package.json,components.json, and any config files.
- The
script.shwas tuned to be macOS/Bash-compatible and avoid non-portable builtin usage. - If you want me to run the helper script, add a remote, or push to GitHub, tell me the remote URL or allow me to run it locally.
If you want the README to include additional details (API spec, component map, or design tokens), tell me which sections to expand and I will update the file.