# dlquake/aplikacja_internetowa_czasopisma_naukowego architecture

> Architecture diagram of the GitHub repository dlquake/aplikacja_internetowa_czasopisma_naukowego, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dlquake/aplikacja_internetowa_czasopisma_naukowego
- Repository: https://github.com/dlquake/aplikacja_internetowa_czasopisma_naukowego

## Overview

##### Main Components

a) Client-Side (Frontend):
- React.js Application Layer
- Public-facing components (Homepage, About, Contact)
- Authentication components (Login, Register)
- User Dashboard
- Publication Management Interface
- Admin Interface

b) Server-Side (Backend):
- Express.js Server
- Authentication Service
- Publication Management Service
- User Management Service
- MySQL Database

##### Component Relationships

- Frontend components communicating with backend via REST API
- Authentication flow between client, server, and database
- Publication workflow showing the review and editing process
- User role-based access control

##### Specific Implementation Details

- Frontend Routes (/src/pages)
- Redux Store (features/authSlice.js)
- Backend Controllers (Auth.js, Publications.js, Users.js)
- Database Models (UserModel.js, PublicationModel.js)
- Middleware (AuthUser.js)

##### Workflow Representation

Specific flows for:
- Author submission process
- Reviewer evaluation process
- Editor management process
- Publication lifecycle

**[Client Layer (React.js)]**
- ↕
**[API Layer (Express.js)]**
- ↕
**[Database Layer (MySQL)]**

##### Important Elements to Highlight

- User roles (Author, Reviewer, Editor, User, Publisher)
- Publication states (Submitted, Under Review, Editing, Published)
- Security middleware
- Data flow directions

##### Technical Stack Indicators

Specific technologies:
- React.js for frontend
- Express.js for backend
- MySQL for database
- Redux for state management

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef database fill:#f1c40f,stroke:#f39c12,color:black
    classDef auth fill:#e74c3c,stroke:#c0392b,color:white
    classDef api fill:#9b59b6,stroke:#8e44ad,color:white

    %% Frontend Layer
    subgraph Frontend
        App["App.js"]
        Redux["Redux Store"]
        
        subgraph PublicPages
            Home["Homepage"]
            About["About"]
            Contact["Contact"]
        end
        
        subgraph AuthPages
            Login["Login"]
            Register["Register"]
        end
        
        subgraph UserInterface
            Dashboard["User Dashboard"]
            PubManage["Publication Management"]
            UserManage["User Management"]
        end
    end

    %% Backend Layer
    subgraph Backend
        Express["Express Server"]
        
        subgraph Services
            AuthService["Authentication Service"]
            PubService["Publication Service"]
            UserService["User Service"]
        end
        
        subgraph Middleware
            AuthMiddleware["Auth Middleware"]
        end
        
        subgraph Models
            UserModel["User Model"]
            PubModel["Publication Model"]
        end
    end

    %% Database Layer
    DB[(MySQL Database)]

    %% Relationships
    App --> Redux
    Redux --> AuthService
    PublicPages --> Express
    AuthPages --> AuthService
    UserInterface --> Express
    Express --> Services
    Services --> Middleware
    Middleware --> Models
    Models --> DB

    %% Click Events
    click App "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/frontend/src/App.js"
    click Redux "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/frontend/src/features/authSlice.js"
    click Home "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/frontend/src/pages/HomePage.jsx"
    click About "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/frontend/src/pages/ONas.jsx"
    click Contact "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/frontend/src/pages/Kontakt.jsx"
    click Login "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/frontend/src/components/Login.jsx"
    click Register "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/frontend/src/components/Register.jsx"
    click Dashboard "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/frontend/src/pages/Dashboard.jsx"
    click PubManage "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/frontend/src/components/PubliakcjeList.jsx"
    click UserManage "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/frontend/src/components/Userlist.jsx"
    click AuthService "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/backend/controllers/Auth.js"
    click PubService "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/backend/controllers/Publications.js"
    click UserService "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/backend/controllers/Users.js"
    click AuthMiddleware "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/backend/middleware/AuthUser.js"
    click UserModel "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/backend/models/UserModel.js"
    click PubModel "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/backend/models/PublicationModel.js"
    click DB "https://github.com/DLQuake/Aplikacja_internetowa_czasopisma_naukowego/blob/main/backend/config/Database.js"

    %% Style Applications
    class App,Redux,Home,About,Contact,Login,Register,Dashboard,PubManage,UserManage frontend
    class Express,AuthService,PubService,UserService,AuthMiddleware backend
    class DB database
    class AuthMiddleware,AuthService auth
    class Express api

    %% Legend
    subgraph Legend
        Frontend_L["Frontend Component"]:::frontend
        Backend_L["Backend Component"]:::backend
        Database_L["Database"]:::database
        Auth_L["Auth Component"]:::auth
        API_L["API Component"]:::api
    end
```
