Skip to content

About

KnowledgePedia - Full-Stack Documentation Platform | React 19 + Typescript + Vite + Redux Toolkit + Redux Router + Redux 9 + MDX + CSS3 + Node.js + Express.js + MySQL + Sequelize ORM + JWT

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

KnowledgePedia - Full-Stack Documentation Platform

A modern, responsive documentation platform built with React (frontend) and Express.js (backend), inspired by Fumadocs. Features MDX support, integrated search, navigation, MySQL database authentication, and a clean, professional interface for creating and managing technical documentation.

πŸ—οΈ Architecture Overview

This project consists of two main components:

  • Frontend (knowledgepedia-docs/): React application with TypeScript, Redux, and MDX support
  • Backend (backend/): Express.js API with MySQL database and JWT authentication

πŸš€ Quick Start

Prerequisites

  • Node.js (v18+)
  • MySQL Server (v8.0+)
  • npm or yarn

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/knowledgepedia.git
    cd knowledgepedia
  2. Set up the backend:

    cd backend
    npm install
    # Create .env file with database configuration
    npm run build
    npm run dev
  3. Set up the frontend (in a new terminal):

    cd ../knowledgepedia-docs
    npm install
    npm run dev
  4. Set up the database:

    • Create MySQL database named knowledgepedia
    • Run mysql -u root -p < backend/database-setup.sql
    • Default user: admin@example.com / password123
  5. Access the application:

πŸ“‹ Features

Frontend Features

  • MDX Support: Write documentation using Markdown with React components
  • Responsive Design: Optimized for desktop, tablet, and mobile devices
  • Search Functionality: Built-in search capabilities across articles by title
  • Authentication System: User login with JWT tokens and private routes
  • Category Management: Full CRUD operations for documentation categories
  • Article Management: Complete MDX article editor with category association
  • Navigation: Sidebar navigation with categorized articles and user management
  • Routing: Client-side routing with React Router and protected routes
  • State Management: Redux Toolkit for global state handling (auth, categories, articles, search)

Backend Features

  • RESTful API: Complete REST endpoints for authentication, categories, and articles
  • Sequelize ORM: TypeScript-first ORM for MySQL with model definitions and associations
  • MySQL Integration: Connection pooling and secure database operations
  • JWT Authentication: Secure token-based authentication with expiration
  • HTTPS Support: Optional SSL/TLS encryption with OpenSSL certificates
  • Password Hashing: bcrypt for secure password storage
  • Categories API: Full CRUD operations for managing documentation categories
  • Articles API: Full CRUD operations with MDX content support and category relations
  • Search API: Backend-powered search with category filtering
  • TypeScript Support: Full type safety and better developer experience

πŸ“ Project Structure

knowledgepedia/
β”œβ”€β”€ knowledgepedia-docs/           # Frontend React Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/            # UI Components
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleEditor.tsx   # MDX article editor
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleItem.tsx     # Article list item
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleList.tsx     # Articles list with filtering
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleView.tsx     # Article display with MDX rendering
β”‚   β”‚   β”‚   β”œβ”€β”€ CategoryForm.tsx    # Category creation form
β”‚   β”‚   β”‚   β”œβ”€β”€ CategoryItem.tsx    # Category management item
β”‚   β”‚   β”‚   β”œβ”€β”€ CategoryList.tsx    # Categories list
β”‚   β”‚   β”‚   β”œβ”€β”€ Layout.tsx          # Main layout with sidebar
β”‚   β”‚   β”‚   β”œβ”€β”€ LoginForm.tsx       # Authentication form
β”‚   β”‚   β”‚   β”œβ”€β”€ MainContent.tsx     # Content wrapper
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.tsx          # Navigation bar with logout
β”‚   β”‚   β”‚   β”œβ”€β”€ PrivateRoute.tsx    # Route protection
β”‚   β”‚   β”‚   β”œβ”€β”€ Sidebar.tsx         # Navigation sidebar
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ pages/                  # Page Components
β”‚   β”‚   β”‚   β”œβ”€β”€ Article.tsx         # Individual article page
β”‚   β”‚   β”‚   β”œβ”€β”€ ArticleEdit.tsx     # Article editing page
β”‚   β”‚   β”‚   β”œβ”€β”€ Articles.tsx        # Articles list page
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx       # User dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ Home.tsx            # Home page (redirects to login)
β”‚   β”‚   β”‚   └── Login.tsx           # Login page
β”‚   β”‚   β”œβ”€β”€ store/                  # Redux Store
β”‚   β”‚   β”‚   β”œβ”€β”€ slices/             # Redux slices
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ articleSlice.ts # Article state management
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ authSlice.ts    # Authentication state
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ categorySlice.ts # Category state management
β”‚   β”‚   β”‚   β”‚   └── searchSlice.ts  # Search functionality
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   └── utils/                  # Utility functions
β”‚   β”‚       └── api.ts              # API client with JWT handling
β”‚   β”œβ”€β”€ package.json
β”‚   └── README.md
β”‚
β”œβ”€β”€ backend/                       # Backend Express.js API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/                 # Database Configuration
β”‚   β”‚   β”‚   └── database.ts         # Sequelize database setup
β”‚   β”‚   β”œβ”€β”€ models/                 # Sequelize Models
β”‚   β”‚   β”‚   β”œβ”€β”€ Article.ts          # Article model with MDX content
β”‚   β”‚   β”‚   β”œβ”€β”€ Category.ts         # Category model
β”‚   β”‚   β”‚   └── User.ts             # User authentication model
β”‚   β”‚   β”œβ”€β”€ routes/                 # API Routes
β”‚   β”‚   β”‚   β”œβ”€β”€ articles.ts         # Article CRUD endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.ts             # Authentication endpoints
β”‚   β”‚   β”‚   └── categories.ts       # Category CRUD endpoints
β”‚   β”‚   └── index.ts                # Main Server File with HTTPS
β”‚   β”œβ”€β”€ certs/                      # SSL Certificates
β”‚   β”‚   β”œβ”€β”€ cert.pem                # SSL Certificate
β”‚   β”‚   └── key.pem                 # Private Key
β”‚   β”œβ”€β”€ database-setup.sql          # Database Schema with all tables
β”‚   β”œβ”€β”€ package.json
β”‚   └── README.md
β”‚
└── README.md                      # This file

πŸ› οΈ Technologies Used

Frontend Technologies

Core Framework & Language

  • React 19.1.1 - Najnowsza wersja biblioteki React z ulepszonymi funkcjami i wydajnoΕ›ciΔ…
  • TypeScript 5.9.3 - Typowany nadzbiΓ³r JavaScript zapewniajΔ…cy bezpieczeΕ„stwo typΓ³w i lepsze wsparcie IDE
  • Vite 7.1.7 - Nowoczesny build tool zapewniajΔ…cy szybkie hot module replacement (HMR) i optymalizacjΔ™ bundlowania

State Management & Routing

  • Redux Toolkit 2.3.0 - Oficjalny, uproszczony sposΓ³b pisania logiki Redux z wbudowanymi najlepszymi praktykami
  • React Redux 9.1.2 - Oficjalne bindings React dla Redux
  • React Router DOM 6.28.0 - Biblioteka routingu dla aplikacji React z obsΕ‚ugΔ… protected routes

Content & Editor

  • MDX Editor 3.48.0 - Zaawansowany edytor WYSIWYG dla dokumentacji MDX z obsΕ‚ugΔ… React components
  • MDX JS React 3.0.1 - Integracja MDX z React, umoΕΌliwiajΔ…ca pisanie dokumentacji w formacie Markdown z komponentami React
  • MDX JS Rollup 3.0.1 - Plugin Rollup/Vite do przetwarzania plikΓ³w MDX podczas buildowania

HTTP Client & Styling

  • Axios 1.7.9 - Promise-based HTTP client z automatycznΔ… obsΕ‚ugΔ… JWT tokenΓ³w i interceptors
  • Styled Components 6.1.19 - CSS-in-JS library umoΕΌliwiajΔ…ca stylowanie komponentΓ³w z wykorzystaniem template literals
  • CSS3 - Tradycyjne style CSS dla globalnych stylΓ³w i layoutu

Development Tools

  • ESLint 9.36.0 - Linter JavaScript/TypeScript z konfiguracjΔ… dla React
  • TypeScript ESLint 8.45.0 - ESLint plugin dla TypeScript z dodatkowymi reguΕ‚ami
  • Vite Plugin React 5.0.4 - Oficjalny plugin Vite dla React z Fast Refresh

Backend Technologies

Core Framework & Language

  • Express.js 4.18.2 - Minimalistyczny i elastyczny framework webowy dla Node.js
  • TypeScript 5.3.3 - Typowany nadzbiΓ³r JavaScript zapewniajΔ…cy bezpieczeΕ„stwo typΓ³w po stronie serwera
  • Node.js - Środowisko uruchomieniowe JavaScript (wymagane v18+)

Database & ORM

  • MySQL2 3.6.5 - Oficjalny driver MySQL dla Node.js z obsΕ‚ugΔ… Promise i connection pooling
  • Sequelize 6.37.7 - PotΔ™ΕΌny ORM (Object-Relational Mapping) dla Node.js z obsΕ‚ugΔ… migracji, asocjacji i transakcji
  • Sequelize TypeScript 2.1.6 - Rozszerzenie Sequelize zapewniajΔ…ce peΕ‚ne wsparcie TypeScript z dekoratorami i typami

Authentication & Security

  • bcrypt 5.1.1 - Biblioteka do hashowania haseΕ‚ z wykorzystaniem algorytmu bcrypt (10 rounds)
  • jsonwebtoken 9.0.2 - Implementacja JSON Web Tokens (JWT) dla autentykacji bezstanowej
  • CORS 2.8.5 - Middleware Express do konfiguracji Cross-Origin Resource Sharing

Development & Configuration

  • dotenv 16.3.1 - Ładowanie zmiennych Ε›rodowiskowych z pliku .env
  • nodemon 3.0.2 - NarzΔ™dzie do automatycznego restartowania serwera podczas developmentu
  • ts-node 10.9.2 - TypeScript execution engine dla Node.js umoΕΌliwiajΔ…cy bezpoΕ›rednie uruchamianie plikΓ³w .ts
  • OpenSSL - NarzΔ™dzie do generowania certyfikatΓ³w SSL/TLS dla obsΕ‚ugi HTTPS (opcjonalne)

Database

  • MySQL 8.0+ - Relacyjna baza danych wykorzystywana do przechowywania uΕΌytkownikΓ³w, kategorii i artykuΕ‚Γ³w

Build & Development Tools

  • npm/yarn - MenadΕΌery pakietΓ³w Node.js
  • TypeScript Compiler - Kompilacja TypeScript do JavaScript (ES2020)
  • Vite Build - Produkcyjne bundlowanie frontendu z optymalizacjΔ… i minifikacjΔ…

πŸ“– Detailed Documentation

πŸ”’ Security Features

  • JWT token authentication with automatic logout on token expiration
  • Password hashing with bcrypt (10 rounds)
  • HTTPS support with OpenSSL certificates (optional)
  • Private routes protection with authentication guards
  • Secure API communication via Axios with automatic token injection
  • Input validation and sanitization
  • CORS configuration
  • Environment-based configuration
  • Single shared user authentication system

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ž Contact

Developed by MaxSoft

For questions, support, or collaboration opportunities, please visit our website at https://maxsoft.pl

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

KnowledgePedia - Full-Stack Documentation Platform | React 19 + Typescript + Vite + Redux Toolkit + Redux Router + Redux 9 + MDX + CSS3 + Node.js + Express.js + MySQL + Sequelize ORM + JWT

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages