A modern, microservices-based knowledge management platform built to facilitate document sharing, searching, and collaboration.
Knowledge Garden is a comprehensive knowledge management system that enables users to upload, organize, search, and share various knowledge resources. The application is built using a microservices architecture with a React frontend and a Node.js backend.
The system consists of two main components:
- Single-page application built with React, TypeScript, and Redux
- Modern UI with Tailwind CSS
- Responsive design for optimal experience on all devices
- Microservices architecture with four main services:
- API Gateway: Entry point for all client requests
- Authentication Service: Manages user authentication and authorization
- Resources Service: Handles file uploads, storage, and management
- Search Service: Provides advanced search functionality
- 🔐 User authentication and authorization
- 📁 Resource management (upload, download, update, delete)
- 🔍 Advanced search with Elasticsearch
- 🏷️ Resource categorization and tagging
- 📊 User profiles and resource analytics
- 🌐 Service discovery with Consul
- 📨 Event-driven architecture with Kafka
- Framework: React 19
- Language: TypeScript
- State Management: Redux with Redux Toolkit
- Styling: Tailwind CSS
- Routing: React Router v7
- HTTP Client: Axios
- Build Tool: Vite
- Runtime: Node.js (v16+)
- API Framework: Express
- Languages: JavaScript and TypeScript
- Databases:
- PostgreSQL (user data)
- MongoDB (document metadata)
- Elasticsearch (search index)
- Authentication: JWT
- Storage: S3-compatible (MinIO or AWS S3)
- Service Discovery: Consul
- Message Broker: Kafka
- Containerization: Docker (optional)
Before you begin, ensure you have the following installed:
- Node.js v16+
- npm v8+
- PostgreSQL v14+
- MongoDB v5+
- Elasticsearch v8+
- Consul v1.14+
- Kafka v3.3+ and ZooKeeper v3.8+
- MinIO or AWS S3 access
-
Clone the repository:
git clone https://github.com/your-username/knowledge-garden.git cd knowledge-garden/backend -
Install Consul for Service Discovery:
# macOS brew install consul consul agent -dev # Linux # Download and extract Consul wget https://releases.hashicorp.com/consul/1.14.4/consul_1.14.4_linux_amd64.zip unzip consul_1.14.4_linux_amd64.zip sudo mv consul /usr/local/bin/ consul agent -dev
-
Install Kafka and ZooKeeper:
# Using Docker (recommended for development) docker-compose up -d zookeeper kafka # macOS brew install kafka brew services start zookeeper brew services start kafka # Linux # See backend/README.md for detailed instructions
-
Set up S3-compatible Storage:
# Using MinIO docker run -p 9000:9000 -p 9001:9001 --name minio \ -v ~/minio/data:/data \ -e "MINIO_ROOT_USER=minioadmin" \ -e "MINIO_ROOT_PASSWORD=minioadmin" \ quay.io/minio/minio server /data --console-address ":9001"
-
Configure environment variables:
# Create environment files for each service cp .env.example api-gateway/.env cp .env.example authentication/.env cp .env.example resources/.env cp .env.example search/.env # Edit each file to configure your specific environment
-
Install dependencies and start services:
# Install API Gateway dependencies cd api-gateway && npm install # Install Authentication Service dependencies cd ../authentication && npm install # Install Resources Service dependencies cd ../resources && npm install # Install Search Service dependencies cd ../search && npm install # Start all services (in separate terminal windows) cd api-gateway && npm run dev cd ../authentication && npm run dev cd ../resources && npm run dev cd ../search && npm run dev
-
Navigate to the frontend directory:
cd ../frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open http://localhost:5173 in your browser
The API documentation is available at:
http://localhost:5000/api-docs
# Run unit tests
npm run test:unit
# Run integration tests
npm run test:integration
# Run E2E tests
npm run test:e2e
# Run performance tests
npm run test:performance# Run unit tests
npm test
# Run E2E tests with Cypress
npm run cypress:run- API Gateway: Must handle 100 requests/second with <500ms response time
- Authentication Service: Must handle 50 logins/second with <1s response time
- Search Service: Must handle 20 search queries/second with <2s response time
See the detailed troubleshooting guides in the backend and frontend README files for common issues and solutions.
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
