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.
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
- Node.js (v18+)
- MySQL Server (v8.0+)
- npm or yarn
-
Clone the repository:
git clone https://github.com/your-username/knowledgepedia.git cd knowledgepedia -
Set up the backend:
cd backend npm install # Create .env file with database configuration npm run build npm run dev
-
Set up the frontend (in a new terminal):
cd ../knowledgepedia-docs npm install npm run dev -
Set up the database:
- Create MySQL database named
knowledgepedia - Run
mysql -u root -p < backend/database-setup.sql - Default user:
admin@example.com/password123
- Create MySQL database named
-
Access the application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
- 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)
- 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
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
- 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
- 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
- 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
- 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
- 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
- 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+)
- 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
- 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
- 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)
- MySQL 8.0+ - Relacyjna baza danych wykorzystywana do przechowywania uΕΌytkownikΓ³w, kategorii i artykuΕΓ³w
- npm/yarn - MenadΕΌery pakietΓ³w Node.js
- TypeScript Compiler - Kompilacja TypeScript do JavaScript (ES2020)
- Vite Build - Produkcyjne bundlowanie frontendu z optymalizacjΔ i minifikacjΔ
- 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
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Developed by MaxSoft
For questions, support, or collaboration opportunities, please visit our website at https://maxsoft.pl
This project is licensed under the MIT License - see the LICENSE file for details.