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.