Skip to content

Repository files navigation

CivicLens

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.

Summary

  • Framework: React (SWC) + Vite
  • Styling: Tailwind CSS
  • Structure: Single-page app living in client/ with shared types/utilities in shared/ and static assets in public/.

Project structure

  • index.html — main HTML entry
  • client/ — React app source
    • App.tsx, main.tsx — app bootstrap
    • components/ — UI components and page components
    • pages/ — route pages (HomeFeed, CreatePost, Admin, etc.)
    • hooks/, contexts/, locales/, lib/ — helpers and utilities
  • shared/ — types and small shared helpers used across client/server originally
  • public/ — 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/ and netlify/ 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 a server/ folder.

Local development

  1. Install dependencies:
# using npm
npm install
# or using pnpm
pnpm install
  1. Run development server:
npm run dev
# or pnpm dev

The 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.

Build

npm run build
# or pnpm build

Built files are output to dist/spa by default (see vite.config.ts).

Deployment

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 the dist/spa folder.

If you prefer to reintroduce serverless functions, add a netlify/ or server/ folder back and configure the hosting provider accordingly.

Contributing

  • Replace demo/sample content in client/pages/ and client/components/ with your own content and branding.
  • Update metadata in package.json, components.json, and any config files.

Notes

  • The script.sh was 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.

About

Empowering citizens with verified voices and transparent action.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages