How yashhhyb/weekly-planerz works
1. Weekly Planerz is split into a TypeScript Angular frontend and an ASP.NET Core 8 backend, with architecture intentionally kept in separate repository folders. The backend uses Clean Architecture / CQRS-style layering; the frontend is a feature-based SPA with route modules, services, and NgRx-like state slices.
2. The backend request path starts in WeeklyPlanner.API controllers: Backlog, Planning, Team, and Admin. These controllers expose the REST API and wrap responses in a consistent ApiResponse shape, while GlobalExceptionMiddleware centralizes error handling before responses leave the API boundary.
3. The application layer (WeeklyPlanner.Application) is the orchestration boundary. It contains commands, queries, DTOs, validators, and a MediatR validation behavior. This is where request intent is translated into use-case operations and where FluentValidation checks are applied before handlers run.
4. The domain layer (WeeklyPlanner.Domain) holds the core business model: BacklogItem, PlanningWeek, TeamMember, WeekMember, and MemberTask, plus domain enums. This layer is where the planning rules live conceptually, including lifecycle constraints and workload limits described in the README.
5. Persistence and infrastructure are isolated in WeeklyPlanner.Infrastructure. It contains EF Core ApplicationDbContext, migrations, generic repository and unit-of-work abstractions, and command/query handlers. The data store is SQLite-backed in production according to the README, with migrations indicating the schema is managed in code.
6. The system’s main data flow is: Angular feature page -> feature service/store -> HTTP interceptor -> backend controller -> MediatR command/query -> handler -> repository/DbContext -> database. Reads and writes are separated at the use-case level, and the frontend consumes typed models that mirror backend DTOs.
7. The frontend is organized by product area rather than technical layer. Feature folders exist for backlog, planning, team, and home, each with route files and page components. Shared cross-cutting concerns are handled by core services such as API access, theme, toast notifications, user context, and data management.
8. State management on the frontend is centralized under src/app/store with separate slices for backlog, planning, and team. Each slice has actions, reducers, effects, and selectors, so page components stay thin and derive data from store state rather than calling the API directly.
9. The planning domain is the center of the product. The backlog module manages work items, the team module manages members, and the planning module orchestrates weekly planning lifecycle views like lead dashboard, member board, review/freeze, progress updates, and historical weeks. These modules together model the rule-driven workflow described in the README.
10. Cross-cutting quality controls are built into the repo. Backend tests include domain unit tests and integration test scaffolding; frontend has component/service/store specs. GitHub Actions workflows separate backend CI, frontend CI, quality gating, and deployment, with production hosting split between Vercel for the frontend and Railway for the API.
11. Operationally, the repository includes deployment-specific configs for both runtimes: Dockerfile for the backend, vercel.json and static web app config for the frontend, plus environment files for Angular. Documentation under docs/ captures architecture, business rules, planning rules, and runbooks, which suggests the repo is designed for maintainability and reviewability as much as for execution.
Main entry points: features Feature pages · WeeklyPlanner.Domain Domain model · WeeklyPlanner.Application Application layer · WeeklyPlanner.Infrastructure Infrastructure
Components 20
Frontend SPA
Angular app organized by product feature, shared services, and centralized state.
- App routes · Root and feature route definitions for the SPA.
frontend/src/app/app.routes.ts - Feature pages · Backlog, planning, team, and home pages that form the main user-facing screens.
frontend/src/app/features - Core services · API-facing and cross-cutting services such as theme, toast, user context, and data management.
frontend/src/app/core/services - HTTP interceptor · Adds shared request/response behavior around backend calls.
frontend/src/app/core/interceptors/api.interceptor.ts - State slices · Backlog, planning, and team actions, reducers, effects, and selectors.
frontend/src/app/store - Client models · Frontend data shapes that mirror backend DTOs and API payloads.
frontend/src/app/models
Backend API
ASP.NET Core application split into API, application, domain, and infrastructure layers.
- API layer · Backlog, planning, team, and admin controllers plus response shaping and exception middleware.
backend/WeeklyPlanner.API - Application layer · Commands, queries, DTOs, validators, and validation behavior that coordinate use cases.
backend/WeeklyPlanner.Application - Domain model · Core entities and enums for backlog, planning weeks, team members, and tasks.
backend/WeeklyPlanner.Domain - Infrastructure · EF Core context, repositories, unit of work, migrations, and MediatR handlers.
backend/WeeklyPlanner.Infrastructure - Database schema · Code-first persisted schema managed through EF Core migrations.
backend/WeeklyPlanner.Infrastructure/Migrations
Ops & Delivery
Automation, deployment, and environment configuration.
- Backend CI · Backend validation and quality gate automation.
.github/workflows/backend-ci.yml - Frontend CI · Frontend validation and quality gate automation.
.github/workflows/frontend-ci.yml - Quality gate · Repository-wide checks that enforce standards before merge.
.github/workflows/quality-gate.yml - Deploy flow · Deployment automation for frontend and API targets.
.github/workflows/deploy.yml - API Dockerfile · Backend containerization for deployment.
backend/Dockerfile - Frontend deploy · Frontend deployment configuration for static hosting.
frontend/vercel.json
Docs & Tests
Repository documentation and quality gates.
- Backend tests · Domain tests and integration test scaffolding for the backend.
backend/WeeklyPlanner.Tests - Frontend specs · Angular component, service, reducer, selector, and effect specs.
frontend/src/app - Architecture docs · System design, business rules, planning rules, API contract, and runbooks.
docs
Connections 25
- App routes → Feature pages: routes to · Route definitions load feature areas.
- Feature pages → Core services: uses · Pages call shared services for API access and cross-cutting concerns.
- Feature pages → State slices: reads state · Feature pages subscribe to centralized store slices.
- State slices → HTTP interceptor: dispatches via · Effects and services rely on the shared HTTP pipeline.
- HTTP interceptor → API layer: calls · Client requests cross the HTTP boundary into the API.
- Core services → Client models: uses · Services operate on typed client models.
- Client models → Application layer: mirrors DTOs · Frontend models align with backend contract types.
- API layer → Application layer: delegates to · Controllers forward requests into application use cases.
- API layer → Domain model: protects · API boundary exposes domain-backed business operations.
- Application layer → Domain model: uses · Application logic is built around domain entities and rules.
- Application layer → Infrastructure: orchestrates · Commands and queries are executed through infrastructure handlers.
- Infrastructure → Database schema: persists to · EF Core migrations and context manage the database schema.
- Infrastructure → Domain model: maps · Persistence handlers work against domain entities.
- Backend tests → Domain model: verifies · Unit tests exercise core business rules.
- Backend tests → Infrastructure: scaffolds · Integration tests cover backend wiring.
- Frontend specs → State slices: verifies · Specs validate reducers, effects, and selectors.
- Frontend specs → Feature pages: verifies · Component specs cover feature pages.
- Architecture docs → Domain model: describes · Docs capture business rules and planning constraints.
- Architecture docs → Feature pages: describes · Docs explain product flows and UI behavior.
- Backend CI → Backend tests: runs · Backend CI executes backend validation.
- Frontend CI → Frontend specs: runs · Frontend CI executes Angular specs and checks.
- Quality gate → Backend CI: includes · Repository quality gates include backend checks.
- Quality gate → Frontend CI: includes · Repository quality gates include frontend checks.
- Deploy flow → API Dockerfile: packages · Deployment flow builds the API container.
- Deploy flow → Frontend deploy: publishes · Deployment flow configures the frontend host.