Here is a thorough report of the codebase at /data/agent/choucisan.
1. Root-Level Files and Directories
The root contains approximately 85+ subdirectories and 200+ individual files. It is a mixed-language monorepo -- not a single coherent application but rather a collection of standalone modules, utilities, algorithms, API wrappers, proxies, and research projects.
Key root-level files include:
- Build/dependency files:
Cargo.toml (Rust), go.mod (Go 1.21), pyproject.toml (Python, labeled as "jira-client"), Dockerfile.go, Dockerfile.flask, docker-compose.yml
- Infrastructure:
nginx-springboot.conf, servers.conf, actix-app.service, fastapi-app.service, deploy.sh, setup-dev.sh, setup-dev-rollback.sh
- Data/config:
sample.yaml, sample_schema.json, batch_operations_sample.json, backup_db.conf.example
- Many standalone Python/Go/JS/Rust algorithm and utility files at the root (e.g.,
bloom_filter.py, bloom_filter.go, bloom_filter.js, ttl_cache.py, circuit_breaker.py, connection_pool.py, cache_with_ttl.py, cache_with_ttl.go, cache_with_ttl.js)
Key subdirectories (85+):
- API projects:
analytics-graphql-api/, blog-graphql-api/, blog-rest-api/, blog-ws-api/, chat-graphql-api/, ecommerce-api/, task-ws-api/
- Proxy modules:
airtable-proxy/, google-sheets-proxy/, jira-proxy/, sendgrid-proxy/
- API client wrappers:
airtable/, airtable_client/, github_api_client/, github_rest_client/, jira_client/, notion/, notion_client/, s3_rest_client/, s3_ws_client/, slack_api/, stripe_wrapper/, twilio_client/, twilio-graphql/, twilio-ws-client/, google-sheets-wrapper/
- Middleware:
rate_limit_middleware/, request_logging_middleware/, graphql-auth-middleware/, ws_api_key_middleware/, ws_validation_middleware/
- Infrastructure:
controllers/, routers/, services/, models/, deploy/, structured-logging/, threadpool/, loganalyzer/
- ML/Research:
CamReasoner/, Dog100K/, UAVideo/, UAVideo-Bench/, cam_motion/, gpt1/, motion-mllm/, motion-mllms/, motion-mllmss/, motion-mllm-v1/, uavdown/, uav-train-lora/, videoRL/, t2v_metrics/, trainingfree/, flash-attention-2.7.4/, fdagent/
- Tools/codegen:
api_codegen/, json_schema_validator/, xml_data_validator/
- Tracing/benchmarks:
mimo-claude-code-traces/
- Data:
data/, cam_motion/ (JSON data files)
Proxy Code (4 proxy modules exist)
/data/agent/choucisan/airtable-proxy/ -- FastAPI-based reverse proxy to Airtable. Uses httpx.AsyncClient, CORS middleware, hop-by-hop header stripping, timed requests, and structured error responses (504 timeout, 502 connect error). File: proxy.py, config.py, logging_config.py.
/data/agent/choucisan/jira-proxy/ -- Flask-based reverse proxy to Jira. Same pattern as airtable-proxy but synchronous (httpx.Client), supports Basic and Bearer auth. File: proxy.py, config.py, logging_config.py.
/data/agent/choucisan/google-sheets-proxy/ -- Proxy config and logging only (config.py, logging_config.py). No proxy.py implementation file yet.
/data/agent/choucisan/sendgrid-proxy/ -- Has api_keys.py, config.py, validators.py but no proxy routing file.
Server Code
blog-rest-api/ -- REST API with app/ directory (FastAPI-style structure)
blog-graphql-api/, analytics-graphql-api/, chat-graphql-api/ -- GraphQL APIs with src/ and tests/ directories
blog-ws-api/ -- WebSocket API with server.py, handlers.py, protocol.py, storage.py, models.py, validators.py, errors.py
ecommerce-api/ -- Has models/, routers/, schemas/, tests/ structure (all empty directories)
task-ws-api/ -- WebSocket task API
controllers/, routers/, services/, models/ at root -- FastAPI-style layered architecture with user/post/comment entities
/data/agent/choucisan/stripe_wrapper/ -- A typed Python wrapper for the Stripe API. Package name: stripe-wrapper. Uses Python 3.11+, httpx, pydantic. Contains:
_http.py -- Both sync (_HttpClient) and async (_AsyncHttpClient) HTTP clients that talk to https://api.stripe.com/v1. Supports GET/POST/DELETE, idempotency keys, context managers.
exceptions.py -- Full Stripe error hierarchy: StripeError base, APIError, AuthenticationError, InvalidRequestError, RateLimitError, CardError (with decline_code). Maps HTTP status codes (401, 402, 429, 400) to exception classes.
models/ directory -- exists but is empty
tests/ directory -- exists but is empty
pyproject.toml -- build config with hatch, ruff, pytest-asyncio
The stripe_wrapper is not a proxy; it is a direct API client library. There is no Stripe proxy module analogous to the airtable-proxy or jira-proxy.
3. Languages and Frameworks
This is a polyglot codebase spanning at least 5 languages:
- Python (dominant) -- Used for most modules. Frameworks: FastAPI (airtable-proxy, routers/controllers/services, graphql APIs), Flask (jira-proxy). Libraries: httpx, pydantic, pytest.
- Go (Go 1.21) --
go.mod at root, loganalyzer/, email-module/, threadpool/, code/lru_cache/, plus standalone files like bloom_filter.go, cache_with_ttl.go, task_scheduler.go. Has Dockerfile.go (multi-stage build, golang:1.21-alpine).
- Rust --
Cargo.toml at root (edition 2024, dependencies: hmac, image, jsonwebtoken, serde, sha2, thiserror). src/ directory contains ~20 .rs files implementing algorithms and utilities (JWT auth, retry with backoff, throttle, URL shortener, structured logger, etc.).
- JavaScript/Node.js -- Standalone
.js files at root (bloom_filter.js, cache_with_ttl.js, circular_buffer.js, debounce.js, etc.). The fdagent/frontend/ directory has a full Node.js frontend with node_modules/.
- Java --
structured-logging/ contains a pom.xml (Maven) with Java source under src/.
Key dependency files at root level:
/data/agent/choucisan/pyproject.toml -- declares jira-client package (httpx)
/data/agent/choucisan/go.mod -- module choucisan, Go 1.21
/data/agent/choucisan/Cargo.toml -- Rust package choucisan, edition 2024
4. Existing Caching Infrastructure and Configuration
Dedicated Caching Modules
/data/agent/choucisan/ttl_cache.py -- A TTLCache class implementing a context manager + decorator pattern for caching function results. Features: configurable TTL (seconds), maxsize with LRU eviction, thread-safe (uses threading.Lock), hit/miss statistics. Uses OrderedDict internally.
/data/agent/choucisan/cache_with_ttl.py -- Despite the name, this is actually an infix-to-postfix expression converter (Shunting Yard algorithm). The function name cache_with_ttl is misleading; it does not implement caching.
/data/agent/choucisan/cache_with_ttl.go -- A proper TTL-based cache in Go for infix-to-postfix conversion. Implements PostfixCache with sync.RWMutex, periodic cleanup goroutine, Get/Set with expiry. This one does use the cache correctly.
/data/agent/choucisan/cache_with_ttl.js -- A JavaScript TTL cache for math expression evaluation. Features: configurable ttlMs and maxCacheSize, Map-based storage, eviction on TTL expiry and size limit.
Bloom Filters (probabilistic caching/dedup structure)
/data/agent/choucisan/bloom_filter.py (8KB), bloom_filter.go (3KB), bloom_filter.js (3KB) -- Implementations in three languages.
Redis in docker-compose.yml
/data/agent/choucisan/docker-compose.yml defines a Redis 7 Alpine service (cache on port 6379) with health checks and persistent volume. The backend service references REDIS_URL: redis://cache:6379/0. This is the only Redis configuration found.
Rate Limiter Storage (in-memory with TTL)
/data/agent/choucisan/rate_limit_middleware/storage.py -- MemoryStorage class implementing BaseStorage ABC with TTL-based cleanup. Designed as a pluggable backend for the rate limiter (a Redis backend could be swapped in).
No Redis Client Code
There is no actual Redis client implementation, no redis-py imports, no aioredis usage anywhere in the codebase. The Redis service is defined in docker-compose but not wired into any application code.
5. Overall Project Structure Summary
This is a large multi-project workspace (monorepo-style) containing:
API Proxy Layer -- FastAPI and Flask reverse proxies for Airtable, Jira, Google Sheets, and SendGrid. These share a common pattern: config loading, logging setup, httpx HTTP client, CORS handling, hop-by-hop header filtering, and structured error responses (502/504).
API Client Wrappers -- Typed Python/Go client libraries for external services: Stripe, Airtable, GitHub (REST), Jira, Notion, S3, Slack, Twilio, Google Sheets.
Middleware Components -- Rate limiting (token bucket with pluggable storage), request logging, GraphQL auth, WebSocket API key validation, WebSocket message validation.
Application APIs -- Blog (REST, GraphQL, WebSocket), Analytics (GraphQL), Chat (GraphQL), E-commerce (REST scaffold), Task management (WebSocket).
Infrastructure -- Nginx config (reverse proxy to Spring Boot with WebSocket, gzip, security headers, actuator restriction), Docker files (Flask multi-stage, Go multi-stage), docker-compose (frontend/backend/PostgreSQL/Redis), deployment scripts.
Algorithm/Data Structure Implementations -- 100+ standalone files implementing algorithms in Python, Go, JS, and Rust (graphs, trees, sorting, caching, rate limiting, bloom filters, segment trees, tries, etc.).
ML/Research Projects -- Multiple UAV video and motion analysis projects (CamReasoner, Dog100K, UAVideo, motion-mllm variants), flash-attention, fdagent.
No CLAUDE.md file exists