How mehmetali10/task-planner works
Console Application (backend/cmd/console)
• Responsible for fetching external tasks using a CLI built on Cobra.
• Utilizes worker pools and Go concurrency primitives (goroutines, channels) to handle multiple providers.
• Designed for extensibility so new task providers can be integrated easily.
Task Service (backend/cmd/task)
• Acts as the core backend service for managing tasks and developers.
• Implements an optimized scheduling algorithm, backed by PostgreSQL for persistent storage.
• Exposes REST APIs (documented via Swagger) and handles task distribution concurrently using Go channels.
Frontend Application (frontend)
• A React-based web interface that provides a dynamic UI for viewing task schedules, developers, and task details.
• Communicates with the task service backend via API calls to present scheduling results and other task data.
• A separate block for the Database (PostgreSQL) indicating where data (tasks, developers, etc.) is stored.
• Optionally, include an “External Providers” component to show where task data originates, which the Console App interacts with.
b. Relationships and interactions:
• From "External Providers" to the "Console Application" (showing fetching and input of tasks).
• From "Console Application" to "Database" (storing fetched tasks).
• From "Task Service" to "Database": both reading and writing task/developer data, as well as scheduling logic.
• From "Frontend Application" to "Task Service": REST API calls to display and manage tasks.
• Concurrent operations in the console and task service (e.g., annotate “Worker Pool” and “Go Channels”).
c. Architectural patterns/design principles:
• Use of the Worker Pool pattern in the Console App and go concurrency (goroutines, channels) in both the Console App and Task Service for efficient parallel processing.
• Microservice-like separation between the backend services and the frontend UI while also noting containerization (Docker files for each component) as part of deployment.
• A dedicated section for API documentation and monitoring (Swagger, Prometheus) if desired.
d. Relevant technologies and frameworks:
• Backend (Go, Cobra CLI, Go channels, worker pool, PostgreSQL, Testcontainers for testing, Swagger for API docs).
• Frontend (React with related libraries from package.json).
• Deployment components (Docker, Docker Compose, Kubernetes in deployment folder).
• For a full-stack application:
• Clearly separate the frontend (React UI) from the backend services.
• API layer within the Task Service that bridges the frontend with the core scheduling functionalities.
• For highlighting core functionality:
• Scheduling algorithm and task distribution logic, along with the worker pool in the Console App, are distinctly visualized.
• Clear, labeled blocks for each component with names (e.g., "Console Application: Task Fetcher", "Task Service: Scheduler & API", "Frontend UI: React App", "Database: PostgreSQL").
• Technological specifics inside or beside each block (e.g., "Goroutines & Worker Pools" in the Console App, "Swagger, Go Channels" in Task Service, "React" in Frontend).
• Every major module in the project, from the CLI-based Console Application and detailed Task Service to the interactive Frontend Application.
• All integration points including the database, API interactions, external providers, and the deployment architecture (Docker, Docker Compose).
• Specific patterns and technologies to clearly communicate how tasks are fetched, processed, scheduled, and displayed to end-users.