Helping students discover their perfect university match through intelligent conversation
Features β’ Quick Start β’ Architecture β’ Tech Stack β’ Contributing
AdmissionAgent is a production-ready RAG (Retrieval-Augmented Generation) chatbot built with Golang that helps students navigate university admissions. Unlike typical Python-based RAG systems, this project demonstrates high-performance AI applications in Go, leveraging LangChain Go, pgvector, and Neo4j for intelligent document retrieval and conversational AI.
While most RAG systems are built with Python, AdmissionAgent showcases Go's capabilities for AI/ML applications:
- β‘ High concurrency - Handle thousands of concurrent chat sessions
- π₯ Low latency - Sub-second response times with efficient vector search
- π¦ Single binary deployment - No dependency hell, just compile and run
- π‘οΈ Type safety - Catch errors at compile time, not runtime
- ποΈ Clean architecture - Hexagonal design with clear separation of concerns
- π― Personalized Recommendations - Get university suggestions tailored to your profile
- π¬ Natural Conversations - Chat naturally about your admission concerns
- π Knowledge-Backed Answers - Responses grounded in real university data
- π Smart Search - Vector-based semantic search across university documents
- π Real-time Processing - Instant responses with async document processing
- π€ AI-Powered Chat Interface - Natural language conversations with context awareness
- π Document Processing - Automatic PDF parsing, chunking, and embedding
- π Semantic Search - Vector similarity search using pgvector (3072-dim embeddings)
- π€ User Authentication - Secure JWT-based authentication system
- πΎ Conversation History - Persistent chat sessions with Redis caching
- π Knowledge Graph - Neo4j-powered relationship mapping between universities
- β‘ Async Processing - Background workers for document indexing via Redis Streams
- ποΈ Hexagonal Architecture - Clean separation of concerns with ports & adapters
- π RESTful API - Well-structured backend API with Gin framework
- π¨ Modern Frontend - Responsive Vue 3 interface with Vite
- π³ Containerized - Full Docker Compose setup for easy deployment
- π Scalable - Microservices-ready architecture with worker pools
| Technology | Purpose | Version |
|---|---|---|
| Go | Backend language | 1.24.6 |
| Gin | HTTP web framework | 1.11.0 |
| PostgreSQL | Primary database | 17 |
| pgvector | Vector similarity search | Latest |
| Redis | Caching & message broker | 7.0 |
| Neo4j | Graph database | 5.26.0 |
| MinIO | Object storage (S3-compatible) | Latest |
| Technology | Purpose |
|---|---|
| LangChain Go | LLM orchestration framework |
| Gemini AI | Embedding model (gemini-embedding-001) |
| Vector Embeddings | 3072-dimensional semantic search |
| Technology | Purpose | Version |
|---|---|---|
| Vue 3 | Frontend framework | 3.5.24 |
| Vite | Build tool & dev server | 7.2.4 |
| Vue Router | Client-side routing | 4.6.4 |
| Axios | HTTP client | 1.13.2 |
- Docker & Docker Compose - Containerization and orchestration
- Air - Live reload for Go development
- golang-migrate - Database migration management
graph TB
subgraph "Client Layer"
UI[Vue 3 Frontend]
end
subgraph "API Layer"
API[Gin REST API]
Auth[JWT Authentication]
end
subgraph "Application Layer"
Chat[Chat Service]
RAG[RAG Pipeline]
Upload[Document Upload]
end
subgraph "AI Services"
Embed[Embedding Service<br/>Gemini AI]
LLM[LLM Service<br/>LangChain]
end
subgraph "Data Layer"
PG[(PostgreSQL<br/>+ pgvector)]
Redis[(Redis<br/>Cache & Queue)]
Neo4j[(Neo4j<br/>Knowledge Graph)]
MinIO[(MinIO<br/>Object Storage)]
end
subgraph "Background Processing"
Worker[Document Worker]
Indexer[Vector Indexer]
end
UI --> API
API --> Auth
API --> Chat
API --> Upload
Chat --> RAG
Chat --> Redis
RAG --> Embed
RAG --> LLM
RAG --> PG
Upload --> MinIO
MinIO --> Worker
Worker --> Indexer
Indexer --> Embed
Indexer --> PG
Indexer --> Neo4j
style UI fill:#4FC08D
style API fill:#00ADD8
style RAG fill:#FF6B6B
style PG fill:#336791
style Redis fill:#DC382D
style Neo4j fill:#008CC1
sequenceDiagram
participant User
participant Frontend
participant API
participant RAG
participant Vector DB
participant LLM
User->>Frontend: Ask question
Frontend->>API: POST /chat/message
API->>RAG: Process query
RAG->>Vector DB: Semantic search
Vector DB-->>RAG: Relevant documents
RAG->>LLM: Generate response with context
LLM-->>RAG: AI-generated answer
RAG-->>API: Response
API-->>Frontend: JSON response
Frontend-->>User: Display answer
graph LR
A[Upload PDF] --> B[MinIO Storage]
B --> C[Redis Stream Event]
C --> D[Worker Picks Up]
D --> E[Extract Text]
E --> F[Chunk Text]
F --> G[Generate Embeddings]
G --> H[Store in pgvector]
G --> I[Build Knowledge Graph]
I --> J[Neo4j]
style A fill:#4FC08D
style B fill:#C72E49
style D fill:#00ADD8
style H fill:#336791
style J fill:#008CC1
Before you begin, ensure you have the following installed:
- Docker (v20.10+) and Docker Compose (v2.0+)
- Git for cloning the repository
- Gemini API Key (get it from Google AI Studio)
- Clone the repository
git clone http://github.com/bienwithcode/AdmissionAgent.git
cd AdmissionAgent- Configure environment variables
# Copy the example environment file
cp .env.example .env
# Edit .env and add your Gemini API key
# Required variables:
# - GEMINI_API_KEY=your_api_key_here
# - MINIO_ROOT_USER=minioadmin
# - MINIO_ROOT_PASSWORD=minioadmin
# - S3_BUCKET=documents- Start the application
# Start all services (backend, frontend, databases, workers)
docker-compose up -d
# Check if all services are running
docker-compose ps- Access the application
- Frontend: http://localhost:8081
- Backend API: http://localhost:8080
- MinIO Console: http://localhost:9001 (minioadmin/minioadmin)
- Neo4j Browser: http://localhost:7474 (neo4j/password)
- Initialize the database
# Run database migrations
docker-compose exec backend /scripts/migrate.sh up# Check backend health
curl http://localhost:8080/health
# Check if worker is processing
docker-compose logs -f worker- Register an account at http://localhost:8081/register
- Login with your credentials
- Upload a university document (PDF format)
- Start chatting about university admissions!
AdmissionAgent/
βββ cmd/ # Application entry points
β βββ api/ # REST API server
β βββ worker/ # Background worker
βββ internal/ # Private application code
β βββ adapters/ # External adapters (DB, APIs)
β βββ core/ # Business logic & domain models
β βββ ports/ # Interface definitions
β βββ services/ # Application services
βββ pkg/ # Public libraries
βββ ui/ # Vue 3 frontend
β βββ src/
β β βββ components/ # Vue components
β β βββ views/ # Page views
β β βββ router/ # Vue Router config
β βββ public/ # Static assets
βββ scripts/ # Utility scripts
βββ docker-compose.yml # Docker orchestration
βββ .env.example # Environment template
βββ AGENTS.md # AI agent guidelines
βββ README.md # This file
Backend:
# Install dependencies
go mod download
# Run with hot reload
air
# Or run directly
go run cmd/api/main.goFrontend:
cd ui
npm install
npm run dev# Run all tests
go test ./...
# Run with coverage
go test -cover ./...
# Run specific package tests
go test ./internal/core/...# Create a new migration
migrate create -ext sql -dir migrations -seq create_users_table
# Run migrations
docker-compose exec backend /scripts/migrate.sh up
# Rollback migrations
docker-compose exec backend /scripts/migrate.sh down 1# Format code
go fmt ./...
# Run linter
golangci-lint run
# Vet code
go vet ./...We welcome contributions from the community! Here's how you can help:
-
Read the guidelines
- Check AGENTS.md for development guidelines and best practices
-
Fork the repository
git clone http://github.com/YOUR_USERNAME/AdmissionAgent.git
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the existing code style
- Write tests for new features
- Update documentation as needed
-
Commit your changes
git commit -m "feat: add amazing feature"Follow Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesrefactor:- Code refactoringtest:- Test additions/changes
-
Push and create a Pull Request
git push origin feature/your-feature-name
- Architecture: Follow hexagonal architecture principles
- Testing: Maintain test coverage above 70%
- Documentation: Update documentation for new features
- Code Style: Use
gofmtand follow Go best practices - Commits: Write clear, descriptive commit messages
- π Bug Fixes - Check the Issues page
- β¨ New Features - Propose features via GitHub Discussions
- π Documentation - Improve README, add tutorials, write guides
- π§ͺ Testing - Increase test coverage
- π¨ UI/UX - Enhance the frontend interface
- π Internationalization - Add multi-language support
This project is licensed under the MIT License - see the LICENSE file for details.
- LangChain - For the excellent LLM orchestration framework
- Google Gemini - For powerful embedding models
- pgvector - For efficient vector similarity search
- Neo4j - For graph database capabilities
- Vue.js Team - For the amazing frontend framework
- Issues: GitHub Issues
- Discussions: GitHub Discussions
β Star this repository if you find it helpful!
Made with β€οΈ by bienwithcode
