Spaces:
Sleeping
Sleeping
Commit History
15 days ago
-
fix(security): close auth takeover, harden RLS, repair adoption and NGO flows
Auth - Never sign in or refresh on a shared Supabase client; use a throwaway client per call so the server cannot hold another user's session - reset-password now requires the recovery token and changes only that user's password; logout revokes only the caller's session - Add POST /api/auth/refresh; frontend refreshes once on 401 Database - Migration 15: block users changing their own role, ban state or NGO approval; hide private profile columns from anon/authenticated; make counter RPCs service-role only - getProfile returns public columns only Adoption and NGO onboarding - Cross-user writes (plant status, adopter garden row) go through the service role and their errors are checked; approval cannot double-adopt - NGO applicants can reach onboarding and their status while still adopters; approved NGOs editing details stay approved Smaller fixes - Like, bookmark and comment counters cannot drift - Credentials bypass the HTML sanitiser - Care tips use a current Gemini mode…55ffa7e
-
Merge branch 'main' into feat/209-plants-near-me
Shardul Chogale9c964a9 -
Merge branch 'main' into fix/204-map-bbox-pagination
Shardul Chogale2901169 -
feat(#209): add dedicated plants-near-me flow with radius slider
ankita012098eedd8d -
fix(#204): bbox-scoped map queries with result cap
ankita01209c3e1e0e -
Merge branch 'main' into feat/ngo-plant-register
Shardul Chogale36a2e92 -
feat(ngo): make the plant register a survival view
The register listed name, species and a photo, and nothing about whether the trees were alive. Knowing which trees are surviving is the NGO's job, and the page said nothing about it. Each row now carries its guardian, the age of the last growth report and the reported health, and the page opens on "Needs attention": trees whose guardians have gone quiet past the monthly rhythm they agreed to, and trees reported critical or dead. A banner counts the quiet ones, because silence is what losing a tree looks like in the data. Adds GET /api/ngo/plants for this, which returns the NGO's plants with their guardian and latest report in three queries no matter how many plants there are. The alternative in the client was one report request per plant. Two inventions removed, the same class as #275: the stock Unsplash photograph that stood in when the NGO had uploaded none, and "Common species" printed where the species was simply unknown. They now read "No photo" and "Species not recorded". Rem…04189d6 -
fix(db): renumber the geo migration to 14, and stop posts writing location
12 is reserved for the storage buckets in #189's set and 13 for the clustering RPC in #205, both of which are in flight; taking 12 here would have collided with #189 when it lands. The README says which numbers are spoken for and why. post.controller still wrote a raw POINT(lng lat) string into location, which is the drift this migration removes for plants. The trigger overwrites it on every insert anyway, so the line was misleading rather than harmful.dd39145
-
fix: sync location from latitude and longitude
ankita01209dff8169
-
chore: add .env.example for frontend and flora-genius-consultant; update backend (#197)
ankita01209e822cea
-
Merge branch 'main' of https://github.com/shard-c6/GreenGuard into feat/190-drop-embeddings-to-1536
rahulbansode_1911a9d7d79 -
fix(rag): address PR #262 review requested changes
rahulbansode_1911- Add vector extension to supabase/migrations/01_extensions.sql - Add metadata jsonb column and RLS policies to 10_plant_knowledge.sql - Move backend/supabase/hybrid_search_migration.sql to legacy directory306821c
-
Merge branch 'main' into feat/190-drop-embeddings-to-1536
Shardul Chogalea7d924e -
fix: pin to Node 24 LTS — Vercel rejects Node 26
Shardul Chogale +2: Mukta Varak, Claude Opus 5The production deploy failed on Vercel: Found invalid or discontinued Node.js Version: "26.4.0". Please set "engines": { "node": "24.x" } in your `package.json` Vercel's build platform does not offer Node 26 at all, and names 24.x as the supported target. Since frontend/package.json declares the engine Vercel reads, 26.4.0 broke every frontend production deploy. GitHub Actions did not catch this: Vercel builds the frontend through its own GitHub integration rather than through ci.yml, so a green "Frontend — lint & build" on a Node 26 runner says nothing about whether Vercel can build the same tree. Changes: - engines.node "26.4.0" -> "24.x" in all three package.json files - .nvmrc 26.4.0 -> 24 - Dockerfiles node:26.4.0-slim -> node:24-slim Range form rather than an exact patch, which was raised in review: an exact pin rejects 24.5.1 and every later security patch. It is also the form Vercel asked for. Node 24 is LTS, so the Dockerfile comment is now accurate as well — it clai…f0601a1 -
Merge branch 'main' into chore/issue-198-pin-node-version
Shardul Chogaled5161ba -
fix(ci): make the backend gate real and repair broken keep-alive alerting
Shardul Chogale +1: Claude Opus 5Two defects found while auditing CI, both of which made a green build mean less than it looked. Backend lint was a decorative required check - `continue-on-error: true` meant the "Backend — lint" job passed whatever eslint reported, while the branch ruleset lists it as a REQUIRED status check. A required check that cannot fail protects nothing. - Cleared the two real errors so the gate can be switched on: the quotes error in scripts/cleanup-db.js via --fix, and the no-useless-assignment report on src/config/redis.js. - The redis one is a false positive and is annotated rather than "fixed": `let redisClient = null` is the defensive default for the catch path, so callers see null instead of undefined when `new Redis()` throws. The rule only sees the reassignment. This also corrects a guess in #236 that the warning might mean Redis was not wired up — it is wired up correctly. - `npm test --if-present` stays advisory: backend declares a test script but ships no tests, an…c9f39fe
-
chore: pin Node version to 26.4.0 across all services (fixes #198)
Mukta Varak0701703 -
feat(rag): drop embedding dimensions from 3072 to 1536 and add HNSW index (#190)
rahulbansode_1911d729f43
-
fix: Add WebSocket polyfill for Supabase in Node 20
114d9ee -
security: resolve CodeQL scanning and Dependabot alerts
Mukta0170a0a13
-
fix: migrate embedding model to gemini-embedding-001 and align query vector dimensions
Shardul Chogale50afd88
-
fix(linter): resolve security bracket-notation warning in seed.js and format markdown tables/lists to clear linter warnings
Shardul Chogale7862493 -
chore: update default admin email address in seed script
Shardul Chogaleac2662d -
fix(frontend): consume request body as ArrayBuffer to support proxy in Vercel serverless functions
Shardul Chogale070e68d -
chore(config): update admin and test adopter emails to shard.chogale1983@gmail.com and test_adopter@gmail.com, keep passwords same
Shardul Chogale603b587
-
feat(redis): implement distributed Redis rate limiting and multi-layer AI cache with offline fallbacks
Shardul Chogale0c56067
-
feat(edge): implement edge middleware geolocation routing, dynamic leaflet map fly-to, and CDN edge caching headers for plants/posts map endpoints
Shardul Chogale38dccff
-
security: secure Supabase functions, prevent Docker secrets leakage, and harden error handler (fixes #59)
Shardul Chogaleb63bc10 -
feat: enhance security with password validation, XSS middleware, role-based access restrictions, and updated environment configurations.
Shardul Chogale13c80ac
-
security: resolve key exposure, backend RLS bypasses, and script path traversals
Shardul Chogale- Untracked backend/env copy and flora-genius node_modules from git index - Added local and global gitignores and .dockerignores to prevent configuration leakage - Implemented per-request Supabase client context in backend using AsyncLocalStorage and dynamic Proxy to enforce RLS - Updated explicit administrative controllers to bypass RLS via supabaseServiceRole - Resolved 7 SecureCoder static scanner findings (path traversal & systemInstruction parameters)7e85d34
-
Replace sensitive keys with placeholders
Shardul ChogaleUpdated environment variables with placeholder values.76b40ee -
feat: My Garden saved plants dashboard - closes #25
rahulcodes-java16d525a
-
feat: proactive AI notifications (Smart Alerts) - closes #37
rahulcodes-java6808cac
-
refactor: convert double quotes to single quotes throughout seed scripts
Shardul Chogalea4d7990 -
chore: re-initialize professional ESLint configuration for backend
Shardul Chogale8ce949c
-
feat: implement advanced RAG hybrid search and kickoff mobile transition
Shardul Chogale6f22751
-
fix: trust proxy configuration and root route
Shardul Chogalebf32e82
-
fix: use valid Hugging Face colors in metadata
Shardul Chogale0261b84 -
chore: prepare subdirectories for Hugging Face migration
Shardul Chogalebac0d95 -
chore: add deployment configs for Zeabur and Hugging Face
Shardul Chogale5f15d38
-
chore: remove personal identifiers and test accounts
Shardul Chogalea70b6e9
-
Merge pull request #5 from shard-c6/min
Shardul Chogaledocs: comprehensive README update and documentation sync7907530 -
docs: comprehensive README update and documentation sync
Shardul Chogalef227dad -
Merge branch 'main' of https://github.com/shard-c6/greeguard_complete
Shardul Chogale13f192a
-
Conclude merge from origin/main
Mukta Varakf2b33a8 -
reverted the changes of favicon
Shardul Chogale7d36d60 -
pull the repo
Mukta Varakfe75b47 -
chore: merged remote main, prioritizing remote changes
Shardul Chogale2657e0a -
fix: resolve map 400 error, add NGO darpan_id/questions, and polish auth UI
Shardul Chogale825c78a -
fix: update CORS to use environment variable for production deployment
Shardul Chogale0027a3a