redis migration

Signed-off-by: ale <ale@manalejandro.com>
Este commit está contenido en:
ale
2025-12-15 17:43:08 +01:00
padre da89037125
commit 4d9545d0ec
Se han modificado 18 ficheros con 1218 adiciones y 1065 borrados

Ver fichero

@@ -2,7 +2,7 @@
## 📋 Project Overview
**Hasher** is a modern, high-performance hash search and generation tool built with Next.js and powered by Elasticsearch. It provides a beautiful web interface for searching hash values and generating cryptographic hashes from plaintext.
**Hasher** is a modern, high-performance hash search and generation tool built with Next.js and powered by Redis. It provides a beautiful web interface for searching hash values and generating cryptographic hashes from plaintext.
### Version: 1.0.0
### Status: ✅ Production Ready
@@ -25,7 +25,7 @@
- Copy-to-clipboard functionality
### 📊 Backend
- Elasticsearch 8.x integration
- Redis integration with ioredis
- 10-shard index for horizontal scaling
- RESTful API with JSON responses
- Automatic index creation and initialization
@@ -52,7 +52,7 @@
### Stack
- **Frontend**: Next.js 16.0, React 19.2, Tailwind CSS 4.x
- **Backend**: Next.js API Routes, Node.js 18+
- **Database**: Elasticsearch 8.x
- **Database**: Redis 6.x+
- **Language**: TypeScript 5.x
- **Icons**: Lucide React
@@ -68,7 +68,7 @@ hasher/
│ └── globals.css # Global styles
├── lib/
│ ├── elasticsearch.ts # ES client & config
│ ├── redis.ts # Redis client & config
│ └── hash.ts # Hash utilities
├── scripts/
@@ -106,7 +106,7 @@ Search for hashes or generate from plaintext
- **Output**: Hash results or generated hashes
### GET /api/health
Check system health and Elasticsearch status
Check system health and Redis status
- **Output**: System status and statistics
---
@@ -139,13 +139,15 @@ npm run index-file wordlist.txt -- --batch-size 500
### Environment Configuration
```bash
# Optional: Set Elasticsearch endpoint
export ELASTICSEARCH_NODE=http://localhost:9200
# Optional: Set Redis connection
export REDIS_HOST=localhost
export REDIS_PORT=6379
export REDIS_PASSWORD=your-password
```
---
## 🗄️ Elasticsearch Configuration
## 🗄️ Redis Data Structure
### Index: `hasher`
- **Shards**: 10 (horizontal scaling)
@@ -220,9 +222,9 @@ export ELASTICSEARCH_NODE=http://localhost:9200
### Requirements
- Node.js 18.x or higher
- Elasticsearch 8.x
- Redis 6.x or higher
- 512MB RAM minimum
- Internet connection for Elasticsearch
- Redis server (local or remote)
---
@@ -285,7 +287,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
## 🙏 Acknowledgments
- Built with [Next.js](https://nextjs.org/)
- Powered by [Elasticsearch](https://www.elastic.co/)
- Powered by [Redis](https://redis.io/)
- Icons by [Lucide](https://lucide.dev/)
- Styled with [Tailwind CSS](https://tailwindcss.com/)
@@ -313,7 +315,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
### Completed ✅
- [x] Core hash search functionality
- [x] Hash generation from plaintext
- [x] Elasticsearch integration
- [x] Redis integration
- [x] Modern responsive UI
- [x] Bulk indexing script
- [x] API endpoints