Skip to content

Add DB/bcrypt deps; fix import path#34

Open
saad2134 wants to merge 6 commits into
mainfrom
saad-dev
Open

Add DB/bcrypt deps; fix import path#34
saad2134 wants to merge 6 commits into
mainfrom
saad-dev

Conversation

@saad2134

Copy link
Copy Markdown
Owner

Add psycopg2-binary and bcrypt to backend/requirements-local.txt to support Postgres and bcrypt hashing in the local environment. Fix a broken relative import in web/src/app/demo/argument-mapper/page.tsx by changing the path to ../../app/argument-mapper/argument-mapper-client to match the project layout and prevent module resolution errors.

Add psycopg2-binary and bcrypt to backend/requirements-local.txt to support Postgres and bcrypt hashing in the local environment. Fix a broken relative import in web/src/app/demo/argument-mapper/page.tsx by changing the path to ../../app/argument-mapper/argument-mapper-client to match the project layout and prevent module resolution errors.
@vercel

vercel Bot commented Apr 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
logic-shield Error Error Jun 23, 2026 7:13am
logic-shield-backend Ready Ready Preview, Comment Jun 23, 2026 7:13am

saad2134 added 3 commits June 2, 2026 11:26
Introduce a communication risk scanner and expand analytics/achievement logic across backend and frontend.

Key changes:
- Add /analyze/risk endpoint, RiskScanRequest/Response schemas, and AnalysisService.scan_communication_risk with demo and full-ML flows (including demo rewrite helper).
- Improve analyze flow: unified final_result handling, fallback keyword detection, richer suggestions, sanitization and defaults.
- Enhance user stats and achievements: compute wins, win_rate, current streak, skill metrics (coherence, evidence, extremity, reputation) and multiple achievement conditions; support X-User-ID header fallback for auth-sensitive endpoints.
- Update LLM generator: stronger persona/stance prompts and new generate_rewrite method for polished rewrites.
- Smart debate: ensure AI stance is opposite the user when selecting topic counters.
- Frontend additions: new Risk Scanner page/client; argument mapper: fullscreen, export (PNG/SVG) support, pan/zoom improvements, node color/icon enhancements; wrap Analysis page client with Suspense for loading UI.
- Configuration/docs: enriched backend .env.template (core settings, CORS, demo mode), README/docs update to use `python -m uvicorn ...`, and add .ruff_cache to .gitignore.
- Database file updated (binary diff).

These changes add a publish-safety feature for communication, improve analytics/UX, and provide better demo fallbacks when ML models are unavailable.
Implements the Learning subsystem: adds a FastAPI learning API (progress, complete-lesson, assessment, spaced-repetition, reset-assessment) and wires it into backend/main.py. Adds a full client-side course player and academy pages (course-player-client, academy client pages, learning-path client/pages), a courses config, and updates the frontend API client and layout to support locked/unlocked sidebar behavior and progress flow. Updates USP_PLAN.md to mark the courses and learning path as implemented and document features/flows. Also includes DB update and small UI/style adjustments (globals.css, profile client).
Introduce new demo pages and navigation for the Academy and Risk Scanner features. Adds pages: demo/academy (AcademyClient), demo/academy/[courseId] (CoursePlayerClient), demo/learning-path (LearningPathClient), and demo/risk-scanner (RiskScannerClient with Suspense fallback). Update demo layout to add an Academy section, include Risk Scanner in Tools, improve sidebar active-route logic to treat /demo/academy/* as active, and expand descriptive helper text for academy, learning-path, and risk-scanner. Also includes a binary update to backend/logicshield.db.
Introduce end-to-end support for audio transcription and richer argument node analysis. Changes include:

- backend: add services/speech_transcriber.py (local Whisper pipeline with fallback) and new POST /debate/transcribe API in backend/api/main.py to accept uploaded audio and return transcribed text.
- Argument analysis: extend ArgumentNode schema (text_full, suggestions, improved_text); enhance ArgumentVisualizer to detect more issues, refine strength scoring by node type, and generate suggestions + improved_text (optionally refined via LLM).
- LLM: add refine_argument_node in llm_generator to request concise suggestions/improvements from HF and switch default model string.
- Analysis sanitization: normalize issues structure and confidence values in backend/services/analysis.py.
- Requirements: pin bcrypt to <5.0.0 for compatibility in requirements files.
- Docs & config: update USP_PLAN.md (status/ordering and future enhancements), update .gitignore, add generated PDF summary.

These changes enable voice debate workflows, improve robustness of analysis data, and provide automatic suggestions/rewrites for weak argument nodes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant