Frontend for a CRUD app that manages college campuses and the students enrolled at them. Pairs with the server repo.
- Browse, add, edit, and delete campuses
- Browse, add, edit, and delete students
- Enroll a student at a campus, or un-enroll them (a student can also just have no campus)
- Deleting a campus doesn't delete its students — they become unenrolled
- Search/filter students by name or email
- Dark mode toggle
- Form validation (required fields, email format, GPA between 0.0 and 4.0)
- Loading and error states on every page that fetches data
- React 19 + TypeScript, built with Vite
- React Router for routing (NavLink for active nav state, 404 page for unmatched routes)
- TanStack Query for all server data — fetching, caching, and invalidating on mutations
- Zustand for client-only state (dark mode, student search filter)
- Tailwind CSS for styling
- Clone this repository and move into the client folder:
cd campuses-client- Install dependencies:
npm install- Create an environment file from the example:
cp .env.example .env- Set the API URL in
.env:
VITE_API_BASE_URL=https://final-project-server-csci395.onrender.com- Start the dev server:
npm run devThen open the local URL shown by Vite (usually http://localhost:5173).