Lin / docs /architecture /8-source-tree.md
Zelyanoth's picture
feat: Add comprehensive architecture, product requirements, and sprint documentation, alongside initial frontend pages and components.
0f62534

8. Source Tree

8.1 Existing Project Structure

Lin/
β”œβ”€β”€ .env.hf
β”œβ”€β”€ .gitattributes
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .kilocodemodes
β”œβ”€β”€ app.py
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ nginx.conf
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ SETUP_GUIDE.md
β”œβ”€β”€ simple_timezone_test.py
β”œβ”€β”€ start_app.py
β”œβ”€β”€ start_celery.py
β”œβ”€β”€ start-dev.js
β”œβ”€β”€ starty.py
β”œβ”€β”€ test_apscheduler.py
β”œβ”€β”€ test_imports.py
β”œβ”€β”€ test_scheduler_integration.py
β”œβ”€β”€ test_scheduler_visibility.py
β”œβ”€β”€ test_timezone_functionality.py
β”œβ”€β”€ .qwen/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ config.py
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ test_database_connection.py
β”‚   β”œβ”€β”€ test_oauth_callback.py
β”‚   β”œβ”€β”€ test_oauth_flow.py
β”‚   β”œβ”€β”€ TESTING_GUIDE.md
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ accounts.py
β”‚   β”‚   β”œβ”€β”€ auth.py
β”‚   β”‚   β”œβ”€β”€ posts.py
β”‚   β”‚   β”œβ”€β”€ schedules.py
β”‚   β”‚   └── sources.py
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ schedule.py
β”‚   β”‚   └── user.py
β”‚   β”œβ”€β”€ scheduler/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   └── apscheduler_service.py
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ auth_service.py
β”‚   β”‚   β”œβ”€β”€ content_service.py
β”‚   β”‚   β”œβ”€β”€ linkedin_service.py
β”‚   β”‚   └── schedule_service.py
β”‚   β”œβ”€β”€ tests/
β”‚   β”‚   β”œβ”€β”€ test_frontend_integration.py
β”‚   β”‚   └── test_scheduler_image_integration.py
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ cookies.py
β”‚   β”‚   β”œβ”€β”€ database.py
β”‚   β”‚   β”œβ”€β”€ image_utils.py
β”‚   β”‚   └── timezone_utils.py
β”‚   └── .gitignore
β”œβ”€β”€ docu_code/
β”‚   β”œβ”€β”€ My_data_base_schema_.txt
β”‚   └── supabase.txt
β”œβ”€β”€ fav/
β”‚   └── Capture d'Γ©cran 2025-08-16 223532.png
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ .env.development
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ .env.production
β”‚   β”œβ”€β”€ .eslintrc.cjs
β”‚   β”œβ”€β”€ DESIGN_SYSTEM.md
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ package-lock.json
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ postcss.config.js
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ RESPONSIVE_DESIGN_VALIDATION.md
β”‚   β”œβ”€β”€ tailwind.config.js
β”‚   β”œβ”€β”€ test-auth-fix.js
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   β”œβ”€β”€ tsconfig.node.json
β”‚   β”œβ”€β”€ vite.config.js
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”‚   β”œβ”€β”€ favicon.png
β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚   └── manifest.json
β”‚   β”œβ”€β”€ scripts/
β”‚   β”‚   └── build-env.js
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.css
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ index.css
β”‚   β”‚   β”œβ”€β”€ index.jsx
β”‚   β”‚   β”œβ”€β”€ layout-test.js
β”‚   β”‚   β”œβ”€β”€ responsive-design-test.js
β”‚   β”‚   β”œβ”€β”€ responsive.css
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ FeatureCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ TestimonialCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Header/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Header.css
β”‚   β”‚   β”‚   β”‚   └── Header.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LinkedInAccount/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ LinkedInAccountCard.jsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ LinkedInAccountsManager.jsx
β”‚   β”‚   β”‚   β”‚   └── LinkedInCallbackHandler.jsx
β”‚   β”‚   β”‚   └── Sidebar/
β”‚   β”‚   β”‚       └── Sidebar.jsx
β”‚   β”‚   β”œβ”€β”€ css/
β”‚   β”‚   β”‚   β”œβ”€β”€ base.css
β”‚   β”‚   β”‚   β”œβ”€β”€ components.css.bak
β”‚   β”‚   β”‚   β”œβ”€β”€ main.css
β”‚   β”‚   β”‚   β”œβ”€β”€ responsive.css
β”‚   β”‚   β”‚   β”œβ”€β”€ typography.css
β”‚   β”‚   β”‚   β”œβ”€β”€ variables.css
β”‚   β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ buttons.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ cards.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ forms.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ grid.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ header.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ linkedin.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ modal.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ navigation.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ sidebar.css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ table.css
β”‚   β”‚   β”‚   β”‚   └── utilities.css
β”‚   β”‚   β”‚   └── responsive/
β”‚   β”‚   β”‚       β”œβ”€β”€ accessibility.css
β”‚   β”‚   β”‚       β”œβ”€β”€ base.css
β”‚   β”‚   β”‚       β”œβ”€β”€ mobile-nav.css
β”‚   β”‚   β”‚       β”œβ”€β”€ performance.css
β”‚   β”‚   β”‚       └── performance/
β”‚   β”‚   β”‚           β”œβ”€β”€ lazy-loading.css
β”‚   β”‚   β”‚           └── mobile-optimization.css
β”‚   β”‚   β”œβ”€β”€ debug/
β”‚   β”‚   β”‚   β”œβ”€β”€ testApi.js
β”‚   β”‚   β”‚   └── testApiIntegration.js
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ Accounts.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ForgotPassword.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Home.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Posts.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Register.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ResetPassword.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Schedule.jsx
β”‚   β”‚   β”‚   └── Sources.jsx
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   β”œβ”€β”€ accountService.js
β”‚   β”‚   β”‚   β”œβ”€β”€ api.js
β”‚   β”‚   β”‚   β”œβ”€β”€ apiClient.js
β”‚   β”‚   β”‚   β”œβ”€β”€ authService.js
β”‚   β”‚   β”‚   β”œβ”€β”€ cacheService.js
β”‚   β”‚   β”‚   β”œβ”€β”€ cookieService.js
β”‚   β”‚   β”‚   β”œβ”€β”€ linkedinAuthService.js
β”‚   β”‚   β”‚   β”œβ”€β”€ postService.js
β”‚   β”‚   β”‚   β”œβ”€β”€ scheduleService.js
β”‚   β”‚   β”‚   β”œβ”€β”€ securityService.js
β”‚   β”‚   β”‚   β”œβ”€β”€ sourceService.js
β”‚   β”‚   β”‚   └── supabaseClient.js
β”‚   β”‚   β”œβ”€β”€ store/
β”‚   β”‚   β”‚   β”œβ”€β”€ index.js
β”‚   β”‚   β”‚   └── reducers/
β”‚   β”‚   β”‚       β”œβ”€β”€ accountsSlice.js
β”‚   β”‚   β”‚       β”œβ”€β”€ authSlice.js
β”‚   β”‚   β”‚       β”œβ”€β”€ linkedinAccountsSlice.js
β”‚   β”‚   β”‚       β”œβ”€β”€ postsSlice.js
β”‚   β”‚   β”‚       β”œβ”€β”€ schedulesSlice.js
β”‚   β”‚   β”‚       └── sourcesSlice.js
β”‚   β”‚   └── utils/
β”‚   β”‚       └── timezoneUtils.js
β”‚   └── .gitignore
β”œβ”€β”€ Linkedin_poster_dev/
β”‚   β”œβ”€β”€ .gitattributes
β”‚   β”œβ”€β”€ ai_agent.py
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ README.md
β”‚   └── requirements.txt
└── docs/
    └── architecture.md

8.2 New File Organization

Lin/
β”œβ”€β”€ frontend/
β”‚   └── src/
β”‚       β”œβ”€β”€ components/
β”‚       β”‚   └── KeywordAnalysis/     # New keyword analysis components
β”‚       β”‚       β”œβ”€β”€ KeywordAnalysisPanel.jsx
β”‚       β”‚       └── index.js
β”‚       └── services/
β”‚           └── keywordAnalysisService.js
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ keyword_analysis_service.py # New service
β”‚   β”‚   └── content_service.py           # Updated with FLUX.1-dev
β”‚   └── api/
β”‚       └── posts.py                     # Extended with new endpoints
└── Linkedin_poster_dev/
    └── ai_agent.py                      # Updated with FLUX.1-dev

8.3 Integration Guidelines

  • File Naming: Follow existing snake_case for Python and camelCase for JavaScript
  • Folder Organization: Place new components in appropriate existing directories
  • Import/Export Patterns: Maintain existing patterns in the codebase