How budgetbuddyde/budgetbuddyde works
Main Components
• Frontend Applications:
• Webapp (apps/webapp): This is the main ReactJS-based application responsible for the core user interface. It contains routes, components (e.g., charts, forms, tables), state management for features like stock tracking, budgeting, and subscriptions.
• Website (apps/website): This is the public-facing website providing information such as privacy policies, terms of service, and general repository info.
• Documentation (apps/documentation): This uses VitePress and Docker – it aggregates project documentation and guides.
• Backend Services (Microservices):
• Auth Service (services/auth-service): Manages user authentication and related middleware.
• Mail Service (services/mail-service): Handles email functionality including sending newsletters and report emails.
• PocketBase (services/pocketbase): Acts as a core backend service, likely providing a lightweight database and API endpoints.
• Stock Service (services/stock-service): Manages stock-related functionalities such as tracking, caching, and reporting on investments.
• Shared Packages:
• Types (packages/types): Contains type definitions and interfaces used across the entire project.
• Utils (packages/utils): Provides reusable utilities (e.g., logger and helper functions) that are shared between apps and services.
• CI/CD and Configuration:
• CI Folder (ci/): Contains pipelines and scripts (e.g., Concourse pipelines and GitHub Actions) for automating builds, tests, and deployments.
• Config Files (in projects at root and under config/ folders): Docker configuration, environment variables, and compose files that support local and deployment environments.
Relationships and Interactions
• The frontend applications (webapp and website) interact with the backend services via HTTP/REST API calls. They most likely use standardized API endpoints defined by shared interfaces (from the types package).
• The auth-service, mail-service, pocketbase, and stock-service each run as independent services (potentially in containers) and communicate with the frontends directly or through an API gateway.
• Shared packages (types and utils) ensure consistency between the frontend and backend components.
• CI pipelines and configuration files facilitate continuous integration and orchestrated deployments (using Docker and docker-compose).
Architectural Patterns & Design Principles
• Microservices Architecture: The backend is split into distinct services (auth, mail, stock, etc.), enabling independent development, scalability, and deployment.
• Separation of Concerns: Frontend UI, backend business logic, and shared utilities are organized into separate directories and packages.
• Reusability and Modularity: Utilizing shared types and utilities promotes consistency across services and applications.
• Containerization: Dockerfiles in multiple folders (e.g., in apps/documentation, apps/webapp, services/*) indicate containerized deployment.
• CI/CD: Dedicated CI pipelines (in the ci directory) illustrate automated build/test/deploy processes.
Technologies & Frameworks
• ReactJS, Next.js, and VitePress for frontend applications.
• Node.js/TypeScript for many of the backend services (especially auth-service and mail-service).
• Go (for PocketBase and possibly parts of the stock-service) as indicated by files like main.go in the pocketbase service.
• Docker for containerization and deployment.
• CI/CD tools integrated via GitHub Actions and Concourse pipelines.