How keshavadk/bookstore_app works
Project type and purpose
• This is a simple full-stack dashboard application (“Bookstore Dashboard”)
• Frontend: Streamlit UI (frontend/app.py)
• Backend: FastAPI REST service (backend/main.py)
• Database: SQLite (backend/database.py + insert_dummy_data.py)
File structure
• Top-level:
• backend/ → FastAPI code & DB schema
• frontend/ → Streamlit app
• insert_dummy_data.py → script to seed SQLite
• requirements.txt → Python dependencies
• backend/main.py exposes HTTP endpoints, backend/database.py defines models and DB connection
• frontend/app.py uses Streamlit to call the FastAPI endpoints and render results
README for additional insights
• Confirms the use of nested JSON responses
• Highlights three core technologies: Streamlit (UI), FastAPI (API), SQLite (DB)
• Describes features: Authors, Books, Categories relations
a. Main components
• Streamlit Dashboard (frontend)
• FastAPI Service (backend API)
• SQLite Database (data store)
• Data Initialization Script (insert_dummy_data.py)
b. Relationships and data flows
1. Streamlit UI sends HTTP requests (GET/POST) → FastAPI endpoints
2. FastAPI handler invokes database.py functions → queries SQLite
3. SQLite returns records → FastAPI assembles nested JSON → returns to UI
4. UI parses JSON → displays tables/charts
5. (Offline) insert_dummy_data.py connects directly to SQLite to seed initial data
c. Architectural patterns / design principles
• Separation of concerns: UI layer vs. API layer vs. data layer
• RESTful service design returning nested JSON
• Single-file embedded database (SQLite) for simplicity
d. Key technologies / frameworks
• Streamlit (python streamlit.app)
• FastAPI (uvicorn/asgi)
• SQLite (sqlite3 or SQLAlchemy)
• Python requirements (listed in requirements.txt)