# πŸ“ Tilbudgivern - Mappestruktur ## πŸ—‚οΈ Hoveddele ``` tilbudgivern/ β”œβ”€β”€ backend/ # Backend API (Node.js/Express) β”œβ”€β”€ frontend/ # Frontend (React) β”œβ”€β”€ react-app/ # React components β”œβ”€β”€ database/ # Database scripts og migrations β”œβ”€β”€ migrations/ # Database migrations β”œβ”€β”€ docs/ # Dokumentation β”œβ”€β”€ archive/ # Arkiverede filer β”œβ”€β”€ src/ # Source kode β”œβ”€β”€ tests/ # Test filer β”œβ”€β”€ logs/ # Log filer β”œβ”€β”€ installation_data/ # Installation manual data └── manuals/ # PDF manualer ``` ## πŸ“š Dokumentation (docs/) ### Features - Custom installation tasks - Bygma import - Installation manuals - Smart packages - Material editing - Markup sliders ### API - Bygma automation - Customer search - Ordrestyring integration - Case analytics - API endpoints oversigt ### Deployment - Deployment pipeline - DNS migration - PM2 guide ### Guides - Komplet opgave database - Ordrestyring system - Tilbudsberegning - Manual scraper - Lego pakker - TΓΈmmer quick reference ### Archived - Gamle bug fixes - Implementering noter - Debug logs - Deprecation notices ## πŸ—ƒοΈ Arkiv (archive/) ### sql/ SQL scripts, queries, og database setup filer. ### scrapers/ Python web scrapers til Bygma, prisbog import, etc. ### scripts/ Shell scripts til deployment, migration, backup, etc. ### logs/ Gamle log filer og import logs. ### test-files/ Test scripts og test data. ### analysis/ Analyse scripts, debug tools, og data exploration. ### docs/ Gamle dokumenter og implementation notes. ### temp-files/ Temporary filer, PDFs, JSON dumps, backups. ### old-backups/ Database backups og SQL dumps. ## πŸš€ Vigtige Filer i Root - **README.md** - Projekt oversigt - **FEATURE_ROADMAP.md** - Feature plan - **package.json** - Node.js dependencies - **docker-compose.yml** - Docker setup - **.env** - Environment variabler (ikke i git) - **ecosystem.config.json** - PM2 konfiguration - **unified-server.js** - Unified backend server ## πŸ”§ Core Directories ### backend/ Backend API service med routes, services, og controllers. ``` backend/ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ routes/ # API routes β”‚ β”œβ”€β”€ services/ # Business logic β”‚ β”œβ”€β”€ controllers/ # Request handlers β”‚ └── utils/ # Utility functions └── server.js # Server entry point ``` ### frontend/ React frontend applikation. ``` frontend/ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ components/ # React components β”‚ β”œβ”€β”€ pages/ # Page components β”‚ β”œβ”€β”€ hooks/ # Custom hooks β”‚ └── utils/ # Utilities └── public/ # Static assets ``` ### database/ Database konfiguration og seeds. ### migrations/ Database migration scripts. ## πŸ“Š Data Flow ``` 1. Frontend (React) β†’ API Requests 2. Backend (Express) β†’ Process & Validate 3. Database (MariaDB) β†’ Store & Retrieve 4. Ordrestyring API β†’ External Integration 5. Bygma Scraper β†’ Import Materials ``` ## πŸ› οΈ Development ### Start Backend ```bash cd backend npm install npm start ``` ### Start Frontend ```bash cd frontend npm install npm start ``` ### Database Migration ```bash mysql -u user -p database < migrations/latest.sql ``` ## πŸ“¦ Archive Organization Alle gamle, midlertidige, og ikke-aktive filer er organiseret i `archive/`: - **FΓΈr:** 200+ filer i root - **Efter:** ~30 filer i root (kun aktive) - **Arkiveret:** 170+ filer organiseret i kategorier ## πŸ” Find Filer ### SQL Scripts ```bash ls archive/sql/ ``` ### Python Scrapers ```bash ls archive/scrapers/ ``` ### Test Scripts ```bash ls archive/test-files/ ``` ### Gamle Dokumenter ```bash ls archive/docs/ ``` ## πŸ“ Dokumentation Navigation ### For Features ```bash ls docs/features/ ``` ### For API ```bash ls docs/api/ ``` ### For Deployment ```bash ls docs/deployment/ ``` ### For Guides ```bash ls docs/guides/ ``` ## 🎯 Quick Commands ```bash # Find alle SQL filer find . -name "*.sql" -type f # Find alle Python scrapers find archive/scrapers -name "*.py" # Find alle dokumenter om feature X grep -r "feature_name" docs/ # Se alle logs ls -lh archive/logs/ # Liste alle test filer ls archive/test-files/ ``` ## ✨ Oprydning Completed βœ… SQL filer arkiveret βœ… Python scrapers organiseret βœ… Test filer samlet βœ… Logs arkiveret βœ… Dokumentation struktureret βœ… Gamle scripts arkiveret βœ… Temp filer ryddet op βœ… Backups organiseret **Status:** πŸ“ Veltorganiseret og klar til udvikling! --- **Sidst opdateret:** 2025-10-30 **Organiseret af:** Cleanup automation