How pdbjork/astroapp works
Project type and purpose
• AstroApp is a small full-stack (frontend + backend) web application that delivers astrological insights.
• The frontend is a static HTML page (index/index.html). The backend is a Python service (astroapp.py) that uses astrology.py for business logic and may call external astrology APIs (API keys hinted in the README).
File structure
• Top level
• astroapp.py – main Python entry point, likely starts an HTTP server or exposes CLI endpoints.
• astrology.py – core library of astrology functions, calculations and data models.
• requirements.txt – external Python libraries (e.g., Flask, requests).
• index/index.html – static HTML user interface.
• DevOps
• .github/workflows/python-app.yml – CI pipeline for linting, testing, or deploying the Python app.
Reinforce insights from the README
• The app runs via “python astroapp.py” and may use a .env file for API keys.
• There are no separate “frontend” or “backend” folders, but the intent is a light web app with static UI and dynamic backend logic.
Main components
a. Client (Browser)
b. Static Frontend (index.html)
c. Backend Service (astroapp.py)
d. Business Logic Library (astrology.py)
e. External Dependencies
– Python runtime & pip packages (requirements.txt)
– Third-party Astrology API (protected by API key)
f. CI/CD Pipeline (GitHub Actions)
Relationships and interactions
• Browser → HTTP GET index.html (serving static file)
• Browser → HTTP POST/GET requests to backend endpoints in astroapp.py
• astroapp.py → invokes astrology.py functions for calculations
• astroapp.py → sends HTTP requests to external astrology API if needed
• astroapp.py → returns JSON or HTML response back to Browser
Architectural patterns and design principles
• Separation of concerns:
• Static assets (UI) are separated from dynamic logic.
• astroapp.py as thin controller, astrology.py as domain service.
• Dependency injection via configuration (.env or inline) for API keys.
• CI pipeline enforces code quality and may run tests against astrology.py.