How incubyte/goalcraft works
Project Type and Purpose
• The project is clearly a full-stack application with two major parts:
• A client-side application (under the “okr-client” folder) built with React, Vite, and Tailwind CSS. This part is responsible for the user interface and experience.
• A server-side application (under the “okr-nest” folder) built using NestJS. It manages APIs, business logic, and communication with the database through Prisma.
• The README reinforces that the goal is to “empower you in setting, tracking, and achieving your goals” and provides separate instructions to start the client and server.
File Structure
• For the client (“okr-client”):
• Contains typical frontend assets: components (display, form, modals, UI elements), hooks, context providers, and configuration files.
• The “src” directory is organized into subdirectories for components (with further subfolders for display, form, etc.) and context, suggesting a modular structure.
• For the server (“okr-nest”):
• Uses NestJS’s modular approach. There are dedicated modules for “objectives”, “key-results”, and “rag” (which might be a red-amber-green status module).
• There is a "prisma" folder with schema and migration files – indicating the use of Prisma ORM for database management.
• Test directories (including E2E tests) indicate a focus on service reliability.
a. Main Components:
• User Interface (Frontend): Represented by the React-based okr-client. Illustrate subcomponents like display, form, and modal components alongside context management (e.g., okr-data and okr-form providers).
• API/Backend Service: Represented by the NestJS okr-nest application. Divide it into its core modules:
• Objectives Module (including controllers, services, and DTOs)
• Key Results Module
• Rag Module
• Database Layer: Represented by Prisma-driven database access, as indicated in the “okr-nest/prisma” folder and migration scripts.
• External Services and Tooling: Optionally show how CI/CD (as seen from .github workflows) and testing (E2E and unit tests) integrate into the overall process.
b. Relationships and Interactions:
• The Frontend sends API requests (HTTP REST calls) to the Backend.
• The Backend handles these requests using dedicated controllers and services for objectives, key results, and rag management.
• Interactions flow from the Backend to the Database via Prisma.
• Optionally, include CI/CD pipelines (GitHub workflows) that manage deployment and testing, though these are ancillary to the core user flow.
c. Architectural Patterns and Design Principles:
• Separation of concerns: distinct client and server domains.
• Modularity within both client (with isolated components and context providers) and server (using NestJS modules).
• The server uses dependency injection, a common NestJS pattern, and a clear layered structure (controllers → services → database access). The client uses composable React components accompanied by hooks and context for state management.
d. Technologies and Frameworks:
• Client: React, Vite, Tailwind CSS, with state management built using context and custom hooks.
• Server: NestJS, Prisma for DB interactions, and a modular structure (using controllers, services, etc.).
• Testing frameworks for unit, integration, and E2E tests are also integrated into the project.