Garden Almanac (Client) β a React + MUI app for planning and tracking seasonal garden work: plants, events, and notes across years. Includes:
- Email/password auth + protected routes
- Plants / Categories / Events CRUD
- Image cards via Unsplash (proxied through server)
- Optional geolocation β climate zone lookup
- (Planned) Year/Month/Day views, RRULE recurrence, reminders, weather integrations
- React 18 (Vite)
- React Router 6
- MUI 6 (with date-fns for pickers)
- Framer Motion
- Axios (with auth helpers)
- Toastify
- (Planned) React Query for cached data fetching
# from repo root
npm install
cp .env.example .env
npm run dev- Node 18+ (LTS recommended)
- The server running at
http://localhost:8000
Create .env in the client root:
# API base (server)
VITE_API=http://localhost:8000/api
# Unsplash proxy (no key needed on client; key is stored on server)
VITE_UNSPLASH_PROXY=/api/unsplash/photosπ Important: Do not put your Unsplash access key in the client. The server handles it securely.
Access these in code via import.meta.env.VITE_API.
npm run dev # dev server on http://localhost:5173
npm run build # production build
npm run preview # preview production build locallysrc/
components/
contexts/
pages/
utils/
axiosClient.js
helpers.js
unsplash.js # client helper that calls server /api/unsplash
dateHelpers.js
data/
- On sign-in, we store:
tokenin cookieuserin localStorage
- API calls should not hard-bind a token at module load. Prefer:
- Add an Axios request interceptor that reads the cookie each request, or
- Pass the token explicitly when calling
(Planned migration: central Axios instance with interceptors + React Query cache.)
See Branching & Deploy Playbook and CONTRIBUTING.text
Use GitHub issues with labels:
good first issue,help wanted,bug,enhancement,design,docs- Link issues in PR descriptions.
- Add React Query provider + convert Categories to queries/mutations
- Year view (compact grid) + improved Month/Day
- RRULE presets in Event form (weekly/fortnightly/monthly/yearly)
- Weather panel calling
/api/weather - Event βNotes by Yearβ section
- Export
.icsfor events/series - Accessibility passes; keyboard focus & alt text everywhere
This repo also contains community and contribution resources:
-
ISSUE_TEMPLATE/
bug_report.mdβ Standardized template for reporting bugsfeature_request.mdβ Template for suggesting new featuresconfig.ymlβ Configures how issue templates appear in GitHubβs New Issue screen
-
pull_request_template.md Guides contributors when opening a PR (checklist, summary, related issues)
-
CONTRIBUTING.md Explains how to contribute (branching model, commit messages, coding style)
-
FUNDING.md Optional funding links (GitHub Sponsors, Patreon, Ko-fi)
- These files are duplicated in both
almanac-clientandalmanac-serverfor consistency. - If you change one, update the other to keep them in sync.
- In the future, we may consolidate into a monorepo where this folder will be shared.
-
Build tool: Migrated from Create React App to Vite
- Faster dev server, modern build pipeline.
- Commands:
npm run dev,npm run build,npm run preview.
-
Environment variables:
- CRA used
process.env.REACT_APP_*. - Vite uses
import.meta.env.VITE_*. - Updated
.env.exampleaccordingly.
- CRA used
-
File extensions:
- All React files renamed from
.jsβ.jsx.
- All React files renamed from
-
MUI upgrade:
- Migrated from MUI v5 to MUI v6.
renderInputprops for DatePicker replaced byslotProps={{ textField: { ... }}}.- Date adapters now use
AdapterDateFns(withdate-fns).
-
Helper utilities:
- Added
dateHelpers.jswithtoDateOrNull()andtoIsoDateStringOrNull().
- Added
-
Dev server port:
- CRA ran on
http://localhost:3000. - Vite runs on
http://localhost:5173.
- CRA ran on
MIT Β© Daiden Sacha
