How maksim-volosh/found-core-app works
FoundCore is a FastAPI backend for a Telegram mini app. The clearest documented workflow is Telegram init-data authentication: the API delegates to an authentication use case, which validates the Telegram payload, finds or creates a user, commits, issues a JWT, and returns user profiles. The tree and composition container also identify profile-management and taxonomy capabilities. Those branches are represented, but their router and use-case interactions are not asserted because their source was not excerpted. Evidence is limited to the provided excerpts and SOURCE INDEX.
Main entry points: container.py Dependency container · use_cases/auth.py Telegram authentication · main.py FastAPI app · routers/auth.py Telegram auth route
Components 24
API surface
- FastAPI app
app/main.py - API v1 router
app/api/v1/__init__.py - Telegram auth route
app/api/v1/routers/auth.py - Profile routes
app/api/v1/routers/profiles.py - Taxonomy routes
app/api/v1/routers/taxonomy.py - Auth response mapper
app/api/v1/mappers/auth.py
Application workflows
- Telegram authentication
app/application/use_cases/auth.py - Profile workflows
app/application/use_cases/profile.py - Taxonomy workflows
app/application/use_cases/taxonomy.py - JWT service
app/application/services/jwt_service.py - Init-data validator
app/application/services/telegram_init_data.py - Profile content validator
app/application/services/profile_content_validator.py - Timezone catalog
app/application/services/timezone_catalog.py
Persistence and runtime
- Dependency container
app/core/composition/container.py - Application settings
app/core/config.py - User repository
app/infrastructure/repositories/user.py - Profile repository
app/infrastructure/repositories/sqlalchemy_profile.py - Taxonomy repository
app/infrastructure/repositories/sqlalchemy_taxonomy.py - Taxonomy cache
app/infrastructure/repositories/redis_taxonomy_cache.py - Unit of work
app/infrastructure/unit_of_work.py - SQL database
app/infrastructure/helpers/db_helper.py - Redis
app/infrastructure/helpers/redis_helper.py
Other components
- Mini app client
- Telegram
Connections 26
- Mini app client → FastAPI app: sends requests
- Telegram → Telegram auth route: provides init data
- FastAPI app → API v1 router: mounts routes
app/main.py - API v1 router → Telegram auth route: registers
app/api/v1/__init__.py - Telegram auth route → Telegram authentication: executes
app/api/v1/routers/auth.py - Telegram authentication → Init-data validator: validates
app/application/use_cases/auth.py - Telegram authentication → JWT service: issues token
app/application/use_cases/auth.py - Telegram authentication → User repository: reads and updates
app/application/use_cases/auth.py - Telegram authentication → Profile repository: lists profiles
app/application/use_cases/auth.py - Telegram authentication → Unit of work: commits
app/application/use_cases/auth.py - Telegram auth route → Auth response mapper: maps result
app/api/v1/routers/auth.py - Dependency container → Telegram authentication: constructs
app/core/composition/container.py - Dependency container → Profile workflows: constructs
app/core/composition/container.py - Dependency container → Taxonomy workflows: constructs
app/core/composition/container.py - Dependency container → JWT service: configures
app/core/composition/container.py - Dependency container → Profile content validator: constructs
app/core/composition/container.py - Dependency container → Timezone catalog: constructs
app/core/composition/container.py - Dependency container → User repository: constructs
app/core/composition/container.py - Dependency container → Profile repository: constructs
app/core/composition/container.py - Dependency container → Taxonomy repository: constructs
app/core/composition/container.py - Dependency container → Taxonomy cache: constructs
app/core/composition/container.py - FastAPI app → SQL database: disposes on shutdown
app/main.py - FastAPI app → Redis: disposes on shutdown
app/main.py - FastAPI app → Application settings: reads settings
app/main.py - Profile routes → Profile workflows: dispatches
- Taxonomy routes → Taxonomy workflows: dispatches