This project is an advanced application using microservice architecture to provide an AI-powered document search and query platform. Users can upload documents to the system and utilize text mining and artificial intelligence technologies for advanced search and question-answering capabilities.
- Document Upload and Processing: Supports PDF, TXT, DOCX, and other document formats
- Automatic OCR: Automatically converts scanned documents and images to text
- Semantic Search: Quickly find relevant documents with meaning-based search
- AI Queries: Ask complex questions based on the content of your documents
- Multi-language Support: Support for multiple languages including Turkish and English
- Secure Access Control: Role-based authorization system
This system has a modular structure that includes the following microservices:
- API Gateway: Receives all client requests and routes them to relevant services
- Document Processing: Document processing, text extraction, and OCR
- Search Service: Full-text search and indexing
- Storage Service: Document storage and metadata management
- Vector Service: Document vector embeddings and semantic search
- Query Engine: Natural language queries and AI responses
- Backend: Node.js, Fastify, gRPC
- Frontend: SvelteKit
- Database: PostgreSQL, Drizzle ORM
- Search Engines: Typesense (text search), Qdrant (vector search)
- Messaging: Apache Kafka
- Storage: MinIO (S3-compatible object storage)
- AI/ML: OpenAI (embeddings, question-answering)
- Node.js 18+
- PostgreSQL
- MinIO (optional, for file storage)
- Apache Kafka (optional, for asynchronous communication)
- Typesense (optional, for full-text search)
- Qdrant (optional, for vector search)
- OpenAI API key (for AI functionality)
-
Clone the project:
git clone https://github.com/username/intelligent-document-search.git cd intelligent-document-search -
Install dependencies:
npm install
-
Configure the
.envfile (copy.env.examplefor reference) -
Initialize the database:
npm run db:push
-
Start the application:
npm run dev
The application will be running at http://localhost:5000 by default.
| Variable | Description | Default |
|---|---|---|
| DATABASE_URL | PostgreSQL database connection URL | postgresql://user:password@localhost:5432/docusearch |
| OPENAI_API_KEY | OpenAI API key | - |
| FRONTEND_PORT | Frontend service port | 5000 |
| SERVER_PORT | API Gateway port | 8000 |
| JWT_SECRET | JWT token encryption key | your-secret-key |
Core API endpoints:
POST /auth/register- New user registrationPOST /auth/login- User loginGET /documents- Document listPOST /documents/upload- Upload new documentGET /documents/:id- Document detailsPOST /search- Search within documentsPOST /query- Ask questions in natural language about documents
When adding new features or modifying existing code, please follow these steps:
- Create a new branch
- Make and test your changes
- Run test suites:
npm test - Commit your changes
- Create a pull request
Contributions are welcome! Please read our contribution guidelines before contributing.
This project is licensed under the MIT License.
- OpenAI - For AI models
- Svelte - Reactive UI library
- Fastify - Fast web framework
- PostgreSQL - Reliable relational database
© 2025 Intelligent Document Search and Query System