Anjoe/frontend - #6
Open
Mikael1206 wants to merge 2 commits into
Open
Conversation
* test (#1) * feat: added index.html file (#2) * Delete frontend/src/index.html * chore: stop tracking next build artifacts and update code * Completed backend - NextAuth.js, Supabase, Prisma (#4) * Add scholarship seed and scripts * Completed backend - NextAuth.js, SupaBase, Prisma * Implemented RAG AI Chatbot via LangChain (#3) * Implemented RAG AI Chatbot via LangChain * migrated the chatbot logic from frontend to backend directory * chore: update backend dependencies to include LangChain and Prisma packages --------- Co-authored-by: An-joe Mikael T. Albano <albanomikaelanjoe@gmail.com> * .gitignore: .agents directory * .gitignore: .agents directory * .agents/ * sets the whole project to be deployable via vercel and render * fix: move render.yaml to project root with rootDir: backend for Render Blueprint monorepo support * fix: add prisma CLI as devDependency for Vercel build (prisma: command not found) * fix: strip trailing slash from FRONTEND_URL for CORS + add DB seed workflow * fix: regenerate package-lock.json to sync with package.json * feat: auto-seed database on Render deploy via start.sh (fixes IPv6 issue) * fix: prefer DATABASE_URL (pooler port 6543) over DIRECT_URL for IPv4 compatibility on Render * fix: correct PrismaPg adapter instantiation, add pg dependency, and fix seed script types - prismaClient.ts: PrismaPg now receives a Pool instance from the pg package instead of { connectionString } object (caused silent DB failures) - package.json: added pg and @types/pg as explicit dependencies - seed.ts: removed 'as any' casts, added ScholarshipSeed interface - start.sh: seeding failures are now fatal (exit 1) instead of silently swallowed * fix: add scholarships to useMemo dependency array in ScholarshipBrowser The filteredScholarships useMemo was missing 'scholarships' in its dependency array, causing the filtered list to stay empty on initial page load after API data arrived. Clicking any filter button would trigger a recompute, making scholarships appear only after interaction. * refactor: replace vector store with database-backed RAG for chatbot knowledge - scholarshipSearchService.ts (NEW): queries Postgres via Prisma using contains + mode: insensitive (ILIKE) across name, provider, benefits, requirements. Falls back to all scholarships if no matches. - chatService.ts: replaced HuggingFace embeddings + MemoryVectorStore loading with DB search. Same LangChain RAG pipeline (prompt, memory, anti-hallucination directives) is preserved. - Removed: scholarshipService.ts (mock data), ingest scripts (no longer needed), vector_store.json - Removed unused deps: @langchain/classic, @langchain/community, @langchain/textsplitters from backend/package.json * perf: cache scholarships, show loading skeleton, optimize backend query - sessionStorage cache (5-min TTL): scholarships persist across page navigations, eliminating repeated cold starts within a tab session - Loading skeleton: 4 animated placeholder cards shown during the 30-60s Render cold start (was previously just empty 'No Matching Aid Found') - Error state: now displays error message with Retry button (was previously set but never rendered — hidden bug) - Backend: removed unnecessary + count query (no pagination UI), fixed incomeBracket type (String → Number) * feat: upgrade MetaBuff to DeepSeek V4 Pro + rewrite knowledge.md for TANGLAW * feat: add Google Gemini 3.1 Flash-Lite as primary model for Owel chatbot - Both frontend and backend: Gemini (GOOGLE_API_KEY, free) primary, OpenRouter fallback - Backend: 6-model OpenRouter cascade (owl-alpha → nemotron → gpt-oss → llama-3 → qwen-2.5 → gemma-2) - Frontend: models.ts uses Gemini → OpenRouter owl-alpha fallback - Removed Groq dependency from frontend - Added @langchain/google-genai to backend deps - Updated knowledge.md and known-issues.md * fix: wire Owel chatbot to AI backend for non-preloaded questions Previously the chatbot only matched 4 hardcoded preloaded prompts. Any other question returned a static generic fallback, ignoring the full RAG pipeline (Gemini + OpenRouter + scholarship search). Changes: - backend: add POST /api/chat endpoint wrapping generateChatResponse - frontend: add sendChatMessage() to backend.ts API client - Owe chatbot: call AI backend when no preloaded match, with generic fallback as last resort * chore: remove unused LangChain packages, add @langchain/google-genai * fix: add Philippine GWA-to-percentage conversion table to Owel system prompt * fix: remove dead frontend chat route and orphaned LangChain deps; fix Owel 'incoming' year level wording * feat: add resizable panel to Owel chatbot with drag handle * chore: cleanup deprecated files and sync frontend/backend refactors - Remove deprecated FAISS/HNSW vector store index files (replaced by DB-backed RAG) - Delete old scholarship model stub (backend/src/models/scholarship.ts) - Remove unused frontend supabase client and placeholder files - Remove stale DEPLOY.md.save backup - Refactor backend controllers, middleware, and chat service - Update frontend components: Owel chatbot, scholarship browser, readiness form, theme changer, site header, layout, auth provider - Update frontend pages: dashboard, contact, scholarships, reviewer - Update globals.css and backend.ts for consistency - Sync knowledge.md with latest codebase structure * fix: make all UI text and backgrounds theme-aware for dark mode - Replace hardcoded bg-white with theme-aware surfaces in Owel chatbot panel - Fix contact form input backgrounds and text colors for dark mode - Add active page highlighting to Home/About/Contact nav links - Make Dashboard link conditional like other nav links - Replace all hardcoded text-zinc-*/bg-zinc-* with theme CSS variables across readiness-form, scholarship-browser, reviewer page, site-header - Fix scholarship skeleton loading placeholders for dark mode - Fix disabled button states to use opacity instead of hardcoded colors * feat: add mobile hamburger menu with animated dropdown, backdrop overlay, and auth-aware links to public site-header and dashboard layout * Update .gitignore to include .env.example Exclude .env.example from being ignored to serve as a reference. * added .env.example to be able to run locally * Delete LOCAL_DEVELOPMENT.md * Ignore LOCAL_DEVELOPMENT.md in .gitignore Add LOCAL_DEVELOPMENT.md to .gitignore to prevent pushing local env vars. * Finalized frontend with all UI elements and code fully tracked --------- Co-authored-by: Jimuelle Patron <patronjimuelle26@gmail.com> Co-authored-by: Charles Joseph Faustino <charles.joseph.faustino50226@gmail.com> Co-authored-by: Bennett Payoyo <75754746+Yahiro025@users.noreply.github.com> Co-authored-by: Yahiro025 <bennettpayoyo3.14@gmail.com> Co-authored-by: Yahiro025 <yahiro025@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.