How ujin-heo/kuci-automation works
Project Type and Purpose
• This is a full-stack web application (“전공소식 공유 메이커 v3.0”) that scrapes announcements from the 고려대학교 정보대학 website, converts them into text files, and presents them via a React frontend and a FastAPI backend.
• Frontend: React
• Backend: FastAPI with SQLAlchemy, BeautifulSoup4, and Google GenAI
File-Structure Analysis
• Top-level directories:
• backend/ – FastAPI service with modules, routes, and an SQLite database
• frontend/ – React application (Vite) with components, assets, and environment configs
• backend/src/modules contains specialized functionality:
• ai_summarizer.py – calls Google GenAI
• scraper.py – scrapes HTML via BeautifulSoup4
• board_infos.py & writer.py – data transformation, text file generation
• backend/src/routes maps HTTP paths to module logic (announcement, board, summarize, update_boards)
• frontend/src contains React components (BoardList, CreateResultsForm, UpdateBoardsForm) and App.jsx as entry point
README Insights
• Confirms tech stack and high-level flow:
User → React UI → FastAPI endpoints → modules (scraper, summarizer) → database and external AI service → results
a. Main Components
• Client (Browser) with React UI
• FastAPI Backend (four route handlers)
• SQLite Database (database.db)
• External Web Source (KU 정보대학 게시판)
• External AI Service (Google GenAI)
b. Relationships & Data Flow
1. User actions in React trigger HTTP requests to FastAPI.
3. FastAPI routes invoke:
– scraper module (HTTP GET to the university site)
– ai_summarizer module (API call to Google GenAI)
– writer & board_infos modules for text creation
4. Modules read/write to the SQLite database.
5. Processed data returned to React, then rendered in the browser.
c. Architectural Patterns & Principles
• Layered monolith for backend: separation between route layer, business-logic modules, and persistence layer
• Single-page application (SPA) on frontend
• Clear separation of concerns: scraping, summarization, data modeling
d. Key Technologies
• React + Vite (frontend)
• FastAPI (backend HTTP layer)
• SQLAlchemy (ORM)
• BeautifulSoup4 (HTML parsing)
• google-genai (AI summarization)
• SQLite (database)