Unlock the full potential of your university experience with uniQuest, where questions find answers, connections become opportunities, and your journey to success begins.
- 🌟 Features
- 🛠️ Tech Stack
- 🚀 Getting Started
- 📁 Project Structure
- 🔧 API Endpoints
- 🎨 UI Components
- 🔐 Authentication
- 📊 Database Schema
- 🎯 Key Features Explained
- 🔄 Development Workflow
- 🚀 Deployment
- 🤝 Contributing
- 📝 License
- 👨💻 Author
- Secure Registration & Login with JWT tokens
- Email Verification system for account activation
- Password Reset functionality with secure tokens
- User Profile Management with customizable avatars
- Session Management with automatic token refresh
- Anonymous Question Posting - Ask without revealing identity
- Topic-based Organization - Categorize questions by subjects
- Rich Text Descriptions - Detailed question explanations
- Answer System - Community-driven responses
- Search Functionality - Find relevant questions quickly
- Slug-based URLs - SEO-friendly question links
- Dynamic Topic Creation - Add new categories on-the-fly
- Topic-based Filtering - Browse questions by subject
- Admin Topic Management - Organized content structure
- University Community Building - Connect with fellow students
- Peer-to-Peer Learning - Share knowledge and experiences
- Mentorship Opportunities - Connect with seniors and alumni
- Professional Networking - Build career connections
- Responsive Design - Works perfectly on all devices
- Dark/Light Theme Support - Customizable appearance
- Smooth Animations - Powered by Framer Motion
- Interactive Elements - Engaging user experience
- Loading States - Professional loading indicators
- TypeScript Support - Type-safe development
- ESLint Configuration - Code quality enforcement
- Hot Reload - Instant development feedback
- Modular Architecture - Clean, maintainable code
- Next.js 14.0.4 - React framework with App Router
- React 18 - Modern React with hooks and concurrent features
- TailwindCSS - Utility-first CSS framework
- Framer Motion - Production-ready motion library
- Lucide React - Beautiful & consistent icon toolkit
- React Hot Toast - Elegant notifications
- Next.js API Routes - Full-stack application
- MongoDB - NoSQL database for flexible data storage
- Mongoose - MongoDB object modeling for Node.js
- JWT (jsonwebtoken) - Secure authentication tokens
- bcryptjs - Password hashing and verification
- Nodemailer - Email sending capabilities
- ESLint - Code linting and formatting
- PostCSS - CSS processing
- Autoprefixer - CSS vendor prefixing
- Node.js (v18 or higher)
- MongoDB (local or cloud instance)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/bhavesh1129/uniQuest-next.git cd uniQuest-next -
Install dependencies
npm install # or yarn install -
Environment Setup Create a
.env.localfile in the root directory:MONGODB_URI=your_mongodb_connection_string TOKEN_SECRET=your_jwt_secret_key EMAIL_USER=your_email@gmail.com EMAIL_PASS=your_email_password NEXTAUTH_URL=http://localhost:3000
-
Run the development server
npm run dev # or yarn dev -
Open your browser Navigate to http://localhost:3000
uniQuest-next/
├── 📁 public/ # Static assets
│ ├── next.svg
│ └── vercel.svg
├── 📁 src/
│ ├── 📁 app/ # Next.js App Router
│ │ ├── 📁 (authentication)/ # Auth route group
│ │ │ ├── 📁 signin/
│ │ │ └── 📁 signup/
│ │ ├── 📁 api/ # API routes
│ │ │ ├── 📁 answers/
│ │ │ ├── 📁 questions/
│ │ │ └── 📁 users/
│ │ ├── 📁 about/ # About page
│ │ ├── 📁 add-question/ # Question creation
│ │ ├── 📁 add-topic/ # Topic management
│ │ ├── 📁 contact/ # Contact page
│ │ ├── 📁 find-friends/ # Community features
│ │ ├── 📁 questions/ # Q&A listing
│ │ │ └── 📁 [slug]/ # Dynamic question pages
│ │ ├── globals.css # Global styles
│ │ ├── layout.js # Root layout
│ │ ├── loading.jsx # Loading component
│ │ ├── not-found.jsx # 404 page
│ │ └── page.js # Home page
│ ├── 📁 components/ # Reusable components
│ │ ├── Footer.jsx
│ │ ├── Navbar.jsx
│ │ └── index.js
│ ├── 📁 dbConfig/ # Database configuration
│ │ └── dbConfig.js
│ ├── 📁 models/ # Database models
│ │ ├── answerModel.js
│ │ ├── questionModel.js
│ │ ├── topicModel.js
│ │ └── userModel.js
│ ├── 📁 utils/ # Utility functions
│ │ ├── cn.js
│ │ ├── fomattedTime.js
│ │ ├── getDataFromToken.js
│ │ └── mailer.js
│ └── middleware.js # Authentication middleware
├── jsconfig.json # JavaScript configuration
├── next.config.js # Next.js configuration
├── package.json # Dependencies and scripts
├── postcss.config.js # PostCSS configuration
└── tailwind.config.js # TailwindCSS configuration
POST /api/users/signup # User registration
POST /api/users/signin # User login
GET /api/users/signout # User logout
GET /api/users/user # Get current user
GET /api/users/users # Get all users
POST /api/users/verifyEmail # Email verification
GET /api/users/user/[id] # Get user by ID
GET /api/questions/data # Get all questions
POST /api/questions/data # Create new question
GET /api/questions/data/[slug] # Get question by slug
GET /api/questions/topic # Get all topics
POST /api/questions/topic # Create new topic
GET /api/questions/topic/[id] # Get topic by ID
GET /api/answers/data # Get all answers
POST /api/answers/data # Create new answer
GET /api/answers/data/[slug] # Get answers by question slug
- Responsive Design - Mobile-first approach
- Dynamic Menu - Context-aware navigation
- User Profile - Avatar and status indicators
- Search Functionality - Quick question search
- Authentication State - Login/logout management
- Hero Section - Compelling call-to-action
- Interactive Background - Animated grid pattern
- Feature Highlights - Key platform benefits
- Call-to-Action Buttons - Direct user engagement
- Question List - Paginated question display
- Question Detail - Full question view with answers
- Question Form - Rich question creation interface
- Topic Selector - Dynamic topic management
- Secure Token Generation - Industry-standard JWT tokens
- Token Expiration - Configurable session duration
- Middleware Protection - Route-level authentication
- Cookie Management - HttpOnly cookies for security
- bcrypt Hashing - Secure password storage
- Salt Rounds - Configurable encryption strength
- Password Validation - Client and server-side validation
- Token-based Verification - Secure email confirmation
- Expiration Handling - Time-limited verification links
- Resend Functionality - User-friendly verification process
{
name: String (required),
email: String (required, unique),
password: String (required),
image: String (default avatar),
isVerified: Boolean (default: false),
isAdmin: Boolean (default: false),
forgetPasswordToken: String,
forgetPasswordTokenExpiry: Date,
verifyToken: String,
verifyTokenExpiry: Date,
timestamps: true
}{
name: String (required),
title: String (required),
topicName: ObjectId (ref: 'topics'),
description: String (required),
userId: String (required),
slug: String (required, unique),
timestamps: true
}{
qnsId: String (required),
answer: String (required),
name: String (required),
userId: String (required),
timestamps: true
}{
topicName: String (required, unique),
userId: String (required),
timestamps: true
}- Users can post questions without revealing their identity
- Maintains privacy while encouraging open dialogue
- Option to post as "Anonymous" or with real name
- Questions are categorized by topics for better discoverability
- Dynamic topic creation allows for flexible content organization
- Topic-based filtering helps users find relevant content
- University-specific community features
- Peer-to-peer learning opportunities
- Professional networking capabilities
- Responsive design works on all devices
- Smooth animations enhance user experience
- Intuitive navigation and user flows
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint- ESLint Configuration - Enforces coding standards
- Prettier Integration - Consistent code formatting
- TypeScript Support - Type safety (optional)
- Create feature branch from
main - Make changes and commit with descriptive messages
- Push branch and create pull request
- Code review and merge to
main
- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on every push to main branch
- Build the application:
npm run build - Start production server:
npm run start - Configure reverse proxy (nginx/Apache)
- Set up SSL certificates
Ensure all required environment variables are set:
MONGODB_URI- MongoDB connection stringTOKEN_SECRET- JWT secret keyEMAIL_USER- Email service usernameEMAIL_PASS- Email service password
We welcome contributions! Here's how you can help:
- 🐛 Bug Reports - Report issues you encounter
- 💡 Feature Requests - Suggest new features
- 🔧 Code Contributions - Submit pull requests
- 📖 Documentation - Improve documentation
- 🎨 UI/UX Improvements - Enhance user experience
- 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
- Follow existing code style and patterns
- Write meaningful commit messages
- Add comments for complex logic
- Test your changes thoroughly
This project is licensed under the MIT License - see the LICENSE file for details.