Merge backend scripts and services into Next.js repo#71
Conversation
Consolidate the empreinte_backend repository into the around_us Next.js app to: - Eliminate code duplication - Share services and utilities between frontend and scripts - Enable direct access to enrichment services from Next.js Server Actions ## Changes ### New Structure - `scripts/` - 20 database enrichment and management scripts - `services/` - Consolidated services from both repos (moved from lib/) - `db/` - Database access layer (Supabase queries) - `data/` - Static data files (OSM, Overture, departments) - Additional utils merged into existing `utils/` ### Key Additions - **Services**: AI, Reddit, Wikipedia analysis, photo/rating fetching, scoring - **Scripts**: Data fetching (OSM, Overture, parks), batch analysis, verification - **Database layer**: Centralized Supabase queries for places, photos, Wikipedia ### Configuration Updates - Added script commands to package.json (fetch-*, analyze-*, etc.) - Added dependencies: cheerio, dotenv, proj4, sitemap, tsx - Updated .env.example with Reddit API vars and script-specific Supabase vars - Enhanced CLAUDE.md with data enrichment system documentation ### Import Updates - All imports updated to use @/ aliases - lib/ → services/ across the codebase - Created db/supabase.ts for script/service database access ### Conflict Resolution - ai.service.ts → ai-backend.service.ts (backend version preserved) - google-places.service.ts → google-places-backend.service.ts (backend version preserved) - Frontend versions kept for manual merge later ## Not Included - Express API layer (index.ts, controllers, middleware, swagger) - Backend-specific supabase.service.ts (replaced by utils/supabase pattern) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Claude finished @alexphiev's task —— View job PR Review: Backend Scripts and Services Merge
|

Summary
Consolidates the
empreinte_backendrepository into thearound_usNext.js app to eliminate code duplication and enable direct access to data enrichment services from the frontend.Changes
New Structure
lib/)utils/Key Additions
Services (18 new):
Scripts (20 total):
Database Layer:
Configuration Updates
@/aliasesRemoved (Not Needed)
Conflict Resolution
Two services had conflicts and were preserved with
-backendsuffix for manual review:services/ai-backend.service.ts (1062 lines) vs ai.service.ts (47 lines)
services/google-places-backend.service.ts (465 lines) vs google-places.service.ts (150 lines)
Testing
Next Steps
pnpm fetch-photos.env.localFiles Changed
See MERGE_SUMMARY.md for complete details.
🤖 Generated with Claude Code