{"id":31561022,"url":"https://github.com/tecteluy/ask-my-bot","last_synced_at":"2026-04-17T01:01:57.448Z","repository":{"id":316462937,"uuid":"1059735783","full_name":"tecteluy/ask-my-bot","owner":"tecteluy","description":"A high-performance, AI-powered chatbot built with Go 1.24.6 featuring Post-Quantum Cryptography (PQC) implementation using Cloudflare CIRCL. This project demonstrates enterprise-grade Go architecture with clean code patterns, advanced security features, and AI/ML integration.","archived":false,"fork":false,"pushed_at":"2025-09-23T21:04:43.000Z","size":60963,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-15T07:16:28.151Z","etag":null,"topics":["api","gin","golang","gorm","jwt","oauth2","post-quantum-cryptography","rag-chatbot","rbac","swagger"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tecteluy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-18T21:42:41.000Z","updated_at":"2025-09-25T10:26:03.000Z","dependencies_parsed_at":"2025-09-26T00:18:42.724Z","dependency_job_id":null,"html_url":"https://github.com/tecteluy/ask-my-bot","commit_stats":null,"previous_names":["tecteluy/ask-my-bot","tecteluy/ask-my-go-bot"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tecteluy/ask-my-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecteluy%2Fask-my-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecteluy%2Fask-my-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecteluy%2Fask-my-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecteluy%2Fask-my-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tecteluy","download_url":"https://codeload.github.com/tecteluy/ask-my-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecteluy%2Fask-my-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31910585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","gin","golang","gorm","jwt","oauth2","post-quantum-cryptography","rag-chatbot","rbac","swagger"],"created_at":"2025-10-05T02:47:09.375Z","updated_at":"2026-04-17T01:01:57.435Z","avatar_url":"https://github.com/tecteluy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ask My Bot 🤖 - AI-Powered Chat Platform\n\nA high-performance, AI-powered chatbot built with **Go 1.24.6** featuring **Post-Quantum Cryptography (PQC)** implementation using Cloudflare CIRCL. This project demonstrates enterprise-grade Go architecture with clean code patterns, advanced security features, and AI/ML integration.\n\n[![Go Version](https://img.shields.io/badge/Go-1.24.6-blue.svg)](https://golang.org)\n[![PQC](https://img.shields.io/badge/PQC-Kyber768-green.svg)](https://github.com/cloudflare/circl)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![Docker](https://img.shields.io/badge/Docker-supported-blue.svg)](https://docker.com)\n\n## � Key Features\n\n### **🔐 Post-Quantum Cryptography (PQC)**\n- **Cloudflare CIRCL Integration**: Production-ready PQC implementation\n- **Kyber768 KEM Algorithm**: NIST-standardized lattice-based encryption\n- **Quantum-Safe Operations**: Key generation, encapsulation, and decapsulation\n- **Future-Proof Security**: Protection against quantum computer attacks\n\n### **🤖 AI-Powered Chat System**\n- **OpenAI GPT Integration**: Intelligent responses using latest AI models\n- **Vector Similarity Search**: Semantic analysis using PostgreSQL pgvector\n- **Contextual Conversations**: Memory-aware chat interactions\n- **Real-time Processing**: WebSocket support for live communication\n\n### **🏗️ Enterprise Go Architecture**\n- **Clean Architecture**: Service/Repository pattern implementation\n- **Dependency Injection**: Modular and testable component design\n- **Interface-Driven**: Pluggable service architectures\n- **SOLID Principles**: Maintainable and scalable codebase\n\n### **🛡️ Advanced Security**\n- **OAuth 2.0 Integration**: Google and GitHub authentication\n- **JWT Token Management**: Secure session handling\n- **Role-Based Access Control**: Admin and user permission systems\n- **Security Middleware**: CORS, rate limiting, and request validation\n\n### **� Production Features**\n- **PostgreSQL + pgvector**: Advanced database with vector operations\n- **Comprehensive Testing**: Unit and integration test coverage\n- **Docker Support**: Containerized deployment ready\n- **API Documentation**: OpenAPI/Swagger specifications\n- **Health Monitoring**: Service health checks and observability\n\n## 🛠️ Technology Stack\n\n### **Backend Technologies**\n- **Go 1.24.6** - Latest Go version with enhanced performance\n- **Gin Framework** - High-performance HTTP web framework\n- **GORM** - Type-safe ORM for database operations\n- **PostgreSQL 15+** - Advanced relational database\n- **pgvector** - Vector similarity search extension\n- **Cloudflare CIRCL** - Post-Quantum Cryptography library\n- **JWT** - Secure token-based authentication\n- **Viper** - Configuration management\n- **Docker** - Containerization and deployment\n\n### **AI \u0026 ML Integration**\n- **OpenAI API** - GPT models for intelligent responses\n- **Vector Embeddings** - Semantic search and similarity\n- **Real-time Processing** - WebSocket communication\n\n### **Security \u0026 Authentication**\n- **OAuth 2.0** - Google and GitHub integration\n- **JWT Tokens** - Stateless authentication\n- **CORS Protection** - Cross-origin request security\n- **Rate Limiting** - Request throttling\n- **Post-Quantum Cryptography** - Future-proof encryption\n\n## 🏗️ Architecture Overview\n\n```\n┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐\n│   Next.js UI    │────│   Go Backend    │────│   PostgreSQL    │\n│  (Port 3000)    │    │  (Port 8080)    │    │   + pgvector    │\n│                 │    │                 │    │                 │\n│ - React 19      │    │ - Gin Framework │    │ - User Data     │\n│ - TypeScript    │    │ - GORM ORM      │    │ - Chat History  │\n│ - Tailwind CSS  │    │ - PQC Service   │    │ - Embeddings    │\n│ - NextAuth      │    │ - AI Service    │    │ - Quantum Keys  │\n└─────────────────┘    └─────────────────┘    └─────────────────┘\n                              │\n                       ┌─────────────────┐\n                       │  External APIs  │\n                       │                 │\n                       │ - OpenAI GPT    │\n                       │ - Google OAuth  │\n                       │ - GitHub OAuth  │\n                       └─────────────────┘\n```\n\n### **Core Service Architecture**\n\n```go\n// Main service interfaces\ntype Services struct {\n    Auth     AuthService      // Authentication \u0026 authorization\n    Chat     ChatService      // Chat conversation management\n    Vector   VectorService    // Embedding operations\n    AI       AIService        // OpenAI integration\n    CV       CVService        // Content management\n    User     UserService      // User operations\n    PqCrypto PqCryptoService  // Post-Quantum Cryptography\n}\n\n// PQC Service Example\ntype PqCryptoService interface {\n    GenerateKeyPair(ctx context.Context, algorithm PQCAlgorithm) (*PQCKeyPair, error)\n    Encapsulate(ctx context.Context, publicKey []byte) ([]byte, []byte, error)\n    Decapsulate(ctx context.Context, ciphertext []byte, privateKey []byte) ([]byte, error)\n}\n```\n\n## 📋 Prerequisites\n\n- **Go 1.21+** - [Download Go](https://golang.org/dl/)\n- **PostgreSQL 15+** - [PostgreSQL Installation](https://www.postgresql.org/)\n- **pgvector Extension** - [pgvector Setup](https://github.com/pgvector/pgvector)\n- **Docker \u0026 Docker Compose** - [Docker Installation](https://docs.docker.com/get-docker/) (optional)\n- **OpenAI API Key** - [Get API Key](https://platform.openai.com/api-keys)\n- **OAuth Apps** - Google/GitHub OAuth credentials for authentication\n\n## 🚀 Quick Start\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/tecteluy/ask-my-bot.git\ncd ask-my-go-bot\n```\n\n### 2. Environment Setup\n\n```bash\n# 4. Environment Setup\n# Copy environment template\ncp .env.example .env.local\n\n# Edit with your configuration\nvim .env.local (set AI_PROVIDER=openai and OPENAI_API_KEY)\n```\n\n### 3. Database Setup (Docker - Recommended)\n\n```bash\n# Start PostgreSQL with pgvector\ndocker-compose up -d db\n\n# Or use local PostgreSQL\n# createdb askmygobot\n# psql askmygobot -c \"CREATE EXTENSION vector;\"\n```\n\n### 4. Install Dependencies \u0026 Run\n\n```bash\n# Install Go dependencies\ngo mod download\n\n# Run database migrations\nmake migrate\n\n# Seed with sample data\nmake seed\n\n# Start development server\nmake dev\n```\n\n### 5. Access the Application\n\n- **API Server**: http://localhost:8080\n- **API Documentation**: http://localhost:8080/docs (OpenAPI/Swagger)\n- **Health Check**: http://localhost:8080/api/health\n- **Frontend UI**: http://localhost:3000 (if using the Next.js frontend)\n\n## 🔧 Development\n\n### Available Commands\n\n```bash\n# Development\nmake dev              # Start development server with hot reload\nmake test             # Run all tests\nmake test-coverage    # Run tests with coverage report\nmake lint             # Run linter\nmake fmt              # Format code\n\n# Database\nmake migrate          # Run database migrations\nmake migrate-down     # Rollback migrations\nmake seed             # Seed database with sample data\nmake db-reset         # Reset database (caution!)\n\n# Build \u0026 Deploy\nmake build            # Build production binary\nmake docker-build     # Build Docker image\nmake docker-up        # Start all services with Docker\nmake docker-down      # Stop all Docker services\n\n # Documentation\n make docs             # Generate/serve API documentation\n make serve-docs       # Start documentation server\n```\n\n### Project Structure\n\n```\nask-my-go-bot/\n├── cmd/\n│   └── server/              # Application entry point (main.go)\n├── internal/\n│   ├── api/                # HTTP routes and handlers\n│   ├── auth/               # Authentication logic\n│   ├── chat/               # Chat service implementation\n│   ├── config/             # Configuration management\n│   ├── database/           # Database connection and migrations\n│   ├── handlers/           # HTTP request handlers\n│   ├── middleware/         # HTTP middleware (CORS, auth, etc.)\n│   ├── models/             # Data models and structures\n│   ├── repositories/       # Data access layer\n│   └── services/           # Business logic (AI, PQC, etc.)\n├── migrations/             # Database schema migrations\n├── scripts/                # Utility scripts\n├── web/                    # Static files and templates\n├── docs/                   # Documentation\n├── docker/                 # Docker configurations\n├── .env.example           # Environment template\n├── docker-compose.yml     # Docker services configuration\n├── Makefile              # Development commands\n└── go.mod               # Go dependencies\n```\n\n## 🐳 Docker Deployment\n\n### Development with Docker\n\n```bash\n# Start all services\ndocker-compose up -d\n\n# View logs\ndocker-compose logs -f app\n\n# Execute commands in container\ndocker-compose exec app go test ./...\n```\n\n### Production Deployment\n\n```bash\n# Build and deploy\ndocker-compose -f docker-compose.prod.yml up -d\n\n# Health check\ncurl http://localhost:8080/api/health\n```\n\n## 🔧 Configuration\n\n### Environment Variables\n\n| Variable | Description | Default | Required |\n|----------|-------------|---------|----------|\n| `PORT` | Server port | `8080` | No |\n| `DATABASE_URL` | PostgreSQL connection string | - | Yes |\n| `OPENAI_API_KEY` | OpenAI API key | - | Yes |\n| `JWT_SECRET` | JWT signing secret | - | Yes |\n| `GOOGLE_CLIENT_ID` | Google OAuth client ID | - | Yes |\n| `GOOGLE_CLIENT_SECRET` | Google OAuth secret | - | Yes |\n| `GITHUB_CLIENT_ID` | GitHub OAuth client ID | - | Yes |\n| `GITHUB_CLIENT_SECRET` | GitHub OAuth secret | - | Yes |\n| `ADMIN_EMAILS` | Comma-separated admin emails | - | No |\n| `CORS_ORIGINS` | Allowed CORS origins | `*` | No |\n| `LOG_LEVEL` | Logging level (debug, info, warn, error) | `info` | No |\n\n### Database Configuration\n\nThe application requires PostgreSQL with the pgvector extension:\n\n```sql\n-- Enable vector extension\nCREATE EXTENSION IF NOT EXISTS vector;\n\n-- Example vector column\nALTER TABLE cv_sections ADD COLUMN embeddings vector(1536);\n```\n\n## 📚 Additional Documentation\n\n- **[Development Setup](docs/development-setup.md)** - Detailed setup instructions\n- **[Architecture Guide](docs/architecture.md)** - System design and components\n- **[PQC Architecture](docs/pqc-architecture.md)** - Post-Quantum Cryptography details\n- **[API Documentation](docs/api.md)** - REST API reference\n- **[Deployment Guide](docs/deployment.md)** - Production deployment\n- **[Contributing Guidelines](docs/contributing.md)** - How to contribute\n- **[Troubleshooting](docs/troubleshooting.md)** - Common issues and solutions\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guidelines](docs/contributing.md) for details.\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- **[Gin Web Framework](https://gin-gonic.com/)** - High-performance HTTP framework\n- **[GORM](https://gorm.io/)** - Developer-friendly ORM for Go\n- **[Cloudflare CIRCL](https://github.com/cloudflare/circl)** - Post-Quantum Cryptography library\n- **[pgvector](https://github.com/pgvector/pgvector)** - Vector similarity search for PostgreSQL\n- **[OpenAI](https://openai.com/)** - AI language models and APIs\n- **[Next.js](https://nextjs.org/)** - React framework for the frontend UI\n\n## 📞 Support \u0026 Contact\n\n- **� Issues**: [GitHub Issues](https://github.com/tecteluy/ask-my-bot/issues)\n- **� Discussions**: [GitHub Discussions](https://github.com/tecteluy/ask-my-bot/discussions)\n- **📧 Email**: For enterprise support and inquiries\n\n---\n\n**Made with ❤️ Have a lot of fun...**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftecteluy%2Fask-my-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftecteluy%2Fask-my-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftecteluy%2Fask-my-bot/lists"}