main
- Fix navigation transparency with proper backdrop blur and contrast - Change currency from USD to OMR for Omani market - Add video section to landing page with proper looping - Improve hero section readability with better contrast - Fix navigation positioning in layout.tsx - Enhance color coordination across all components - Add proper glass effect styling for modern UI
University Portal - AI-Enhanced Multi-Tenant Platform
A modern, AI-powered university portal built with Next.js 15, React 19, and Prisma. Features advanced AI integration with conversation memory, university-specific knowledge bases, and multi-tenant architecture.
🚀 Features
Core Features
- Multi-University Support: White-label solution for multiple universities
- AI-Powered Chat: Intelligent chatbot with conversation memory
- Knowledge Base Management: University-specific Q&A system
- Modern UI/UX: Beautiful, responsive design with Tailwind CSS
- Multi-Language Support: English and Arabic support
- Role-Based Access: Student, Staff, Admin, and Super Admin roles
AI Integration
- Conversation Memory: AI remembers entire conversations
- University-Specific Knowledge: Custom Q&A for each university
- Personalized Responses: Context-aware based on user role and profile
- Ollama Integration: Local AI models with fallback to cloud APIs
- Real-time Chat: Professional chat interface with loading states
Technical Features
- Next.js 15: Latest App Router with Turbopack
- React 19: Latest React features and optimizations
- Prisma ORM: Type-safe database operations
- SQLite Database: Lightweight, file-based database
- TypeScript: Full type safety throughout
- Tailwind CSS: Utility-first styling
- ESLint: Code quality and consistency
🛠️ Installation
Prerequisites
- Node.js 18+
- npm or yarn
- Ollama (for local AI models)
Setup
-
Clone the repository
git clone <repository-url> cd university-portal -
Install dependencies
npm install -
Set up the database
npx prisma generate npx prisma db push -
Seed the database
npm run seed npm run seed:knowledge-base -
Start the development server
npm run dev -
Open your browser Navigate to http://localhost:3000
🗄️ Database Setup
The project uses SQLite with Prisma ORM. Key models include:
- University: Multi-tenant university configurations
- User: User accounts with role-based access
- AcademicProgram: University programs and courses
- AIKnowledgeBase: University-specific Q&A for AI
- ChatSession/ChatMessage: Conversation memory system
- DomainConfig: Multi-domain support for universities
🤖 AI Configuration
Local AI (Ollama)
- Install Ollama: https://ollama.ai
- Start Ollama service:
ollama serve - Pull a model:
ollama pull llama2
Environment Variables
Create a .env.local file:
# Database
DATABASE_URL="file:./dev.db"
# AI Configuration
OLLAMA_HOST="http://localhost:11434"
OPENROUTER_API_KEY="your-api-key" # Optional fallback
# Authentication
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"
📁 Project Structure
university-portal/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── api/ # API routes
│ │ │ ├── chat/ # AI chat endpoints
│ │ │ └── knowledge-base/ # Knowledge base management
│ │ ├── admin/ # Admin dashboard
│ │ └── ... # Public pages
│ ├── components/ # React components
│ │ ├── Chat/ # AI chat components
│ │ ├── Navigation/ # Navigation components
│ │ └── ... # Other components
│ └── lib/ # Utility libraries
├── prisma/ # Database schema and migrations
├── public/ # Static assets
├── docs/ # Documentation
└── scripts/ # Utility scripts
🎯 Key Features in Detail
AI Chat System
- Conversation Memory: Stores chat history in database
- University Context: Uses university-specific knowledge base
- User Personalization: Adapts responses based on user role
- Real-time Interface: Professional chat UI with typing indicators
Knowledge Base Management
- Admin Interface: Full CRUD operations for Q&A items
- Bilingual Support: English and Arabic content
- Priority System: Important items appear first in AI responses
- Active/Inactive Toggle: Control which items are used by AI
Multi-University Support
- White-Label: Each university gets its own branded experience
- Domain Management: Custom domains and subdomains
- Content Isolation: University-specific content and assets
- Branch Management: Multiple campuses per university
🧪 Testing
Manual Testing
- AI Chat: Test conversation memory and knowledge base integration
- Knowledge Base: Add/edit/delete Q&A items in admin panel
- Multi-University: Test different university contexts
- Responsive Design: Test on mobile and desktop
API Testing
# Test AI chat
curl -X POST http://localhost:3000/api/chat/ollama \
-H "Content-Type: application/json" \
-d '{"message": "What are admission requirements?", "universitySlug": "default-university"}'
# Test knowledge base
curl http://localhost:3000/api/knowledge-base
🚀 Deployment
Vercel (Recommended)
- Connect repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
Other Platforms
- Netlify: Compatible with Next.js
- Railway: Good for full-stack applications
- DigitalOcean App Platform: Scalable deployment
📚 Documentation
🤝 Contributing
- Fork the repository
- Create a 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
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
- Issues: Create an issue on GitHub
- Documentation: Check the
/docsfolder - AI Configuration: See AI setup guide in documentation
🎉 Acknowledgments
- Next.js Team: For the amazing framework
- Prisma Team: For the excellent ORM
- Tailwind CSS: For the utility-first CSS framework
- Ollama Team: For local AI model support
Built with ❤️ for modern university portals
Languages
TypeScript
96.7%
Shell
2%
CSS
0.9%
JavaScript
0.4%