How tfikler/home-assignment-datawave works
Main Components Identification
The system consists of these primary components:
A. Frontend Layer (React Application)
• Client-side routing and views
• State management (Redux)
• UI Components
• API integration
B. Backend Layer (NestJS Application)
• REST API endpoints
• Business logic
• Database interaction
C. Database Layer (MySQL)
• Data persistence
• Country records storage
[Client Layer] → [Server Layer] → [Database Layer]
Detailed Component Breakdown
A. Client Layer (Frontend) Components:
• Sub-components:
• Pages (Countries, WorldMap)
• Redux Store (countries-slice)
• Shared Components (CustomTable, EditDialog, Filter, SearchBar, Sidebar)
• API Service Layer
B. Server Layer (Backend) Components:
• Sub-components:
• Controllers (CountriesController)
• Services (CountriesService)
• Models (CountriesModel)
• Configuration (Sequelize Config)
C. Database Layer:
• Countries table schema
Connection and Data Flow Representation
• Frontend → Backend: HTTP requests (GET, PUT, DELETE)
• Backend → Database: Sequelize ORM operations
• Backend → Frontend: HTTP responses with country data
Specific Implementation Details
Frontend Section:
React Frontend (Blue)
• Redux Store
• Countries Slice
• Components
• CustomTable
• EditDialog
• Filter
• SearchBar
• Sidebar
• Pages
• Countries
• WorldMap
Backend Section:
NestJS Backend (Green)
• Countries Module
• Controller (API Endpoints)
• Service (Business Logic)
• Model (Data Structure)
• Configuration
• Sequelize Config
Additional Elements
• API Endpoints listing:
• GET /countries
• GET /countries?page=-1
• /countries/:id
• DELETE /countries/:id
• Data flow indicators:
• User interactions
• API calls
• Database operations
Technical Stack Callouts
• Frontend: React, TypeScript, Redux Toolkit, Material-UI
• Backend: NestJS, TypeScript
• Database: MySQL
• Communication: REST API