Skip to content

Feature/full stack integration#7

Merged
aakashvardhan merged 37 commits into
mainfrom
feature/full-stack-integration
May 6, 2026
Merged

Feature/full stack integration#7
aakashvardhan merged 37 commits into
mainfrom
feature/full-stack-integration

Conversation

@sai-sushma-maddali
Copy link
Copy Markdown
Collaborator

Merge final working code to main

pratikshakau and others added 30 commits April 12, 2026 12:09
- Add CORS middleware (allows frontend on port 5173)
- Fix N+1 query in jobs/savedByMember (add SavedJob.job relationship)
- Fix savedByMember loop to use relationship instead of re-querying DB
- Add Redis client (app/core/redis.py) with graceful fallback
- Cache jobs/get (TTL 300s), jobs/search (TTL 120s), members/get (TTL 300s)
- Invalidate cache on job update, close, save
- Invalidate cache on member update, delete
- Add Redis service to docker-compose.yml
- Add redis==5.0.1 to requirements.txt
- Add get_optional_user dependency for unauthenticated access
- Publish profile.viewed event with correct entity_id (profile owner)
- Time-bucketed idempotency_key to prevent view inflation on refresh
- Increment profile_views count on each unique view
- Load jobs from clean_jobs.csv (Kaggle LinkedIn Job 2023 dataset)
- Load members from Resume.csv (Kaggle Resume dataset)
- Top up to 10K using faker for missing records
- Seed 10K connections, 10K applications, 5K saved jobs
- Add Application model (applications table)
- Add connection pooling (pool_size=10, max_overflow=20, pool_recycle=1800)
- Add compound indexes for analytics queries on job_postings, applications, members, connections, saved_jobs
- Add topup_recruiters.py script to reach 10K recruiters
- Update schema.sql with compound indexes
Made-with: Cursor
- 10K members, 10K recruiters, 10K jobs, 10K connections
- 10K applications, 5K saved jobs, 500 companies
- Load with: mysql -u root -p linkedin_simulation < datasets/linkedin_simulation_seed.sql
- Fix docker-compose to use environment vars instead of .env.example
- Add healthcheck for MySQL so backend waits for DB to be ready
 Backend uses Docker service names (mysql, mongo, redis, kafka)
- Add deploy.replicas config for scaling
- Run 4-config Scenario A benchmark against POST /jobs/search (port 8000, 100 threads, 60s)
  B: 1217ms / 74.9 req/s | B+S: 1119ms / 81.4 req/s
  B+S+K: 1156ms / 78.8 req/s | B+S+K+Other: 1197ms / 76.1 req/s
- Update generate_chart.py with measured values and corrected annotations
- Add scenario_A_read_benchmark.jmx targeting /jobs/search on port 8000
- Fix backend/requirements.txt: add cryptography for MySQL auth
- Add Career Coach slide-over on Jobs with portal-based drawer and recruiter-style polish
- CareerCoachPanel with recruiterTheme, offline/API coaching helpers and tests
- Align Agentic Copilot and charts with LinkedIn blue palette; integration docs and API env notes
- Resume matcher utilities, Profile/Jobs wiring, mock analytics color tweaks

Co-authored-by: Cursor <cursoragent@cursor.com>
- Polyfill DOMMatrix/Path2D in Vitest for pdfjs imports.
- Jobs: sync selected job with filtered list; keyword search data-testid.
- Jobs tests: industry + keyword filter via fireEvent.change; scoped queries.
- package.json: add npm run ci (lint, test:run, build).

Co-authored-by: Cursor <cursoragent@cursor.com>
…ons, analytics)

- Backend: CORS for local Vite on any port, auth/me company_id, registration returns JWT,
  applications and analytics routes, redis_url in settings, health/ready.
- Frontend: API client fix, DB-first MockDataContext, lazy routes + dynamic pdfjs load,
  unwrapSuccessEnvelope for jobs/applications/analytics.
- Docs: root README quick start, docs/INTEGRATION.md, scripts/local-full-stack.sh.
- Gitignore: env files, pycache, venv.

Co-authored-by: Cursor <cursoragent@cursor.com>
- All 4 topics publishing correctly: job.viewed, job.saved, connection.requested, profile.viewed
- consumer.py consuming and storing to MongoDB events collection
- Idempotency working via unique index on idempotency_key
- Added create_kafka_topics.sh for easy topic setup
Integration Complete - M3/M4 Backend + Full-Stack Features + Datasets

MERGED COMPONENTS:
- Core backend fixes: Redis config, MongoDB return True, Kafka yield fix
- All 4 event types: job.viewed, profile.viewed, connection.requested, application.submitted
- Redis caching (12x speedup verified)
- Complete Kafka pipeline (55+ events in MongoDB)
- Full-stack integration features
- Docker healthchecks for reliable startup
- Cryptography dependency added
- Complete datasets: SQL seed + 2000+ resume PDFs
- Performance benchmarks and charts

RESOLVED CONFLICTS:
- docker-compose.yml: Merged healthchecks + M3/M4 services
- requirements.txt: Added cryptography==43.0.3
- router.py: Kept M3/M4 routes active, M5 routes commented
- All route files preserved with Kafka integration
…h Kafka and Redis

- Add application-service, messaging-service, analytics-service with Kafka and Redis
- Per-service docker-compose.yml with include: in root compose
Integration fixes for May 5, 2026 demo:

Infrastructure:
- Add frontend Dockerfile with Node 20 for Vite compatibility
- Add nginx configs for frontend SPA and API gateway routing
- Fix Docker environment configs for container networking

Backend Integration:
- Update backend/.env for Docker container hostnames
- Add idempotent MongoDB index creation to prevent crashes
- Comment out duplicate indexes in analytics-service
- Add resume upload script (1706 PDFs → MongoDB GridFS)

Services Integrated:
✅ MySQL (10K jobs, members with MongoDB resume links)
✅ MongoDB (events, messages, threads, 1706 resumes)
✅ Redis (caching functional)
✅ Kafka (job.viewed, application.submitted events)
✅ api-backend (FastAPI M3/M4)
✅ application-service (M5/M6)
✅ messaging-service (M5/M6)
✅ analytics-service (M5/M6)
✅ api-gateway (NGINX routing)
✅ client (React frontend)

All integration tests passed - ready for demo.
sai-sushma-maddali and others added 7 commits May 4, 2026 19:25
- Add Python script to seed 10K resumes to MongoDB GridFS
- Add script to sync MySQL resume URLs with GridFS file IDs
- All 10,000 members now have PDF resumes in MongoDB
- Resume URLs format: mongodb://resumes/member_XXXXXX
- Cycles through 1,706 source PDFs to populate all members

Database Status:
✅ MySQL: 10,000 members with GridFS URLs
✅ MongoDB: 10,000 resume files + 10,000 chunks
✅ Full cross-reference working
- Introduced a comprehensive integration test script for the LinkedIn simulation, covering end-to-end functionality across microservices.
- Added .flake8 configuration for Python code style enforcement.
- Created a new .gitignore file to manage ignored files.
- Updated docker-compose.yml to include a new environment variable for demo seeding.
- Added TEAM_SETUP_GUIDE.md for streamlined team onboarding and setup instructions.
- Included merge.md for branch comparison documentation.
- Removed outdated seed_data.py and linked SQL seed files to streamline data seeding process.
Copilot AI review requested due to automatic review settings May 6, 2026 01:15
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 300 files, and this pull request has 1948

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@aakashvardhan aakashvardhan merged commit 15ddcb0 into main May 6, 2026
4 checks passed
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.

8 participants