Yappa Knowledge Hub - Project Structure
Last Updated: 2026-03-31
Directory Structure
text
yappa-knowledge-hub/
├── backend/ # Symfony API (PHP 8.x)
│ ├── bin/ # CLI entry points (console)
│ ├── config/ # Symfony configuration (bundles, routes, packages)
│ ├── migrations/ # Database migrations (PostgreSQL)
│ ├── public/ # Web root (index.php)
│ ├── reports/ # Backend-specific analysis and quality reports
│ ├── src/ # Application source code (see detailed breakdown below)
│ ├── tests/ # PHPUnit & integration tests
│ └── composer.json # PHP dependencies
├── slack/ # Slack Bot (TypeScript / Bolt.js)
│ ├── src/ # Bot source code (detailed breakdown below)
│ ├── package.json # Node.js dependencies
│ └── tsconfig.json # TypeScript configuration
├── docs/ # VitePress Documentation Hub
│ ├── backend/ # Backend technical documentation & architecture
│ ├── weekly/ # Weekly internship and progress reports
│ ├── project/ # Planning, backlog, and strategy
│ ├── mvp-presentation/ # MVP feature guides and demonstrations
│ └── ArchitectureLayered.md # System architecture overview
├── e2e-tests/ # Playwright E2E Test Suite
│ ├── tests/ # Test scenarios (auth, knowledge, digest, etc.)
│ ├── playwright.config.ts # Playwright configuration
│ └── package.json # E2E dependencies
├── scripts/ # Utility and automation scripts
├── reports/ # Global verification and investigation reports
├── test-results/ # E2E and unit test artifacts/logs
├── var/ # Runtime files, logs, and cache
├── package.json # Monorepo root and documentation scripts
├── pnpm-workspace.yaml # pnpm workspace definition
├── wrangler.toml # Cloudflare Pages configuration
└── readme.md # Project overview and quick startDetailed Source Breakdown
Backend API (backend/src/) - Symfony PHP
| Directory | Purpose |
|---|---|
Command/ | CLI commands for background tasks, sync, and data loading |
Constants/ | Centralized constants, error messages, and system settings |
Controller/ | REST API endpoints (Knowledge, Digest, Subscription, Health) |
DTO/ | Data Transfer Objects for validated request/response shapes |
Entity/ | Doctrine ORM entities mapped to PostgreSQL |
Enum/ | PHP 8.1+ Enums for domain state (Status, Type, Provider) |
EventSubscriber/ | Listeners for system events and lifecycle hooks |
Exception/ | Domain-specific custom exceptions |
Mapper/ | Multi-layer entity-DTO and DTO-to-entity mappers |
Repository/ | Doctrine repository classes for database access |
Security/ | Authentication, authorization, and permission logic |
Service/ | Business logic (AI summaries, Notion sync, Digest generation) |
Util/ | Shared helper classes and string manipulation utilities |
Validator/ | Custom validation constraints and business rule validators |
ValueObject/ | Immutable domain value objects |
Slack Bot (slack/src/) - Node.js TypeScript
| Directory | Purpose |
|---|---|
api/ | Express API routes for internal communication / webhooks |
config/ | Environment and application setup |
constants/ | Centralized IDs, message strings, and Block Kit templates |
handlers/ | Event listeners, slash commands, actions, and shortcuts |
i18n/ | Internationalization dictionary (NL/EN support) |
middleware/ | Auth, logging, and error handling middleware |
services/ | Business logic orchestrators (Knowledge CRUD, AI, Digest) |
types/ | Global TypeScript interfaces and external API typings |
utils/ | Shared helper functions (parsing, formatting) |
views/ | Modular Block Kit UI components (Home tab, Modals) |
E2E Tests (e2e-tests/tests/) - Playwright TS
| Path | Purpose |
|---|---|
authentication/ | Login and session management tests |
digest/ | Digest generation and distribution flows |
knowledge/ | Knowledge creation, sync, and management (Notion/Local) |
smoke/ | Critical path health checks and availability tests |
subscription/ | User preference and target group subscription tests |
test-utils.ts | Shared Playwright fixtures and helper methods |
File Purposes (Key Files)
| File | Purpose |
|---|---|
readme.md | Entry point for developers, tech stack, and setup |
docs/index.md | Table of contents for the documentation site |
slack/app.ts | Bot entry point, initializes Slack app and listeners |
backend/public/index.php | API gateway for all HTTP requests |
wrangler.toml | Deployment configuration for Cloudflare documentation |
How to Keep Updated
To keep the "Directory Structure" section accurate, you can run the following command from the project root:
bash
# Using find (available everywhere)
find . -maxdepth 2 -not -path '*/.*' -not -path './node_modules*' -not -path './vendor*' -not -path './var*'
# Or using the auto-generator script (if available)
./scripts/generate-tree.shTIP
Always update this file after significant architectural changes or when adding new top-level components to ensure team-wide alignment on the codebase structure.