How abhi7b/dcp_capstone works
Project Type & Purpose
• This is a full-stack application where the backend provides a FastAPI service that supports a Streamlit frontend (note: there’s no Next.js). Its purpose is to collect, process, and expose investment-related data (especially focusing on Duke-affiliated companies/founders) enriched through SERP, Nitter, NLP, and LLM processing.
Main Components to Represent (all within one rectangle)
• Frontend Component:
• Backend API Service:
○ Data Collection Service: Showing integrations with SERP APIs and Nitter scraping.
○ Data Processing Pipeline: Highlight OpenAI-powered entity extraction, Duke affiliation verification, scoring, and enrichment.
○ Background Task Manager: Note the Celery integration for running scheduled tasks.
• Database and Caching:
• “PostgreSQL Database” as a component for structured storage.
• “Redis Cache” as the caching layer (used for rate limiting and fast data retrieval).
Relationships & Interactions
○ From the Streamlit Frontend to the FastAPI Backend (REST API calls).
○ From Processing pipeline to both Database (for processed data) and to background tasks (representing scheduled data updates).
Architectural Patterns & Design Principles
• Separation of Concerns: Clearly separate the frontend (Streamlit UI) from the backend service (REST API, processing, and data collection).
• Modular Services: Break down the backend into discrete modules (routes, services, tasks, utilities) – you may list these as annotations inside the “FastAPI Backend” block.
• Data Pipeline: Emphasize the two-stage pipeline—data collection followed by processing—that uses external data sources (SERP, Nitter) with enrichment via NLP.
• Use of External Technologies: Be sure to mark the usage of FastAPI, PostgreSQL, Redis, Celery (for tasks), and Streamlit.