# StudyQuest  

StudyQuest is an innovative daily planner designed to track tasks and enhance productivity through a unique blend of RPG (Role-Playing Game) elements. It incorporates virtual study rooms to promote collaborative learning, as well as AI-powered quiz creation, gamification, and social features to build an engaging and supportive user community.  

## Features  
- **Task Management:** Track daily tasks with deadlines and priority levels.  
- **Gamification:** Earn rewards for completing tasks and stay motivated with RPG-inspired elements.  
- **Virtual Study Rooms:** Collaborate with peers in real-time virtual spaces.  
- **AI-Powered Quizzes:** Create personalized quizzes to enhance learning.  
- **Community Hub:** Share tips, ask questions, and connect with friends through messaging and community features.  

## System Benefits  
- Increases user engagement through gamification.  
- Fosters a collaborative learning environment.  
- Encourages productivity and consistent task management.  
- Builds a supportive community for knowledge sharing and peer support.  

---

## Getting Started  

This is a Next.js project bootstrapped with `create-next-app`.  

### Prerequisites  
- **Node.js** (latest LTS version recommended)  
- **npm**, **yarn**, or **pnpm** for package management  

### Installation  
1. Clone the repository:  
   ```bash  
   git clone https://github.com/yourusername/your-repo.git  
   cd your-repo
   
2. Install dependencies:
npm install  

3. Create an .env.local file in the root directory to store your environment variables, e.g.:
GROQ_API_KEY=your_api_key_here

4. Run the development server:
npm run dev  

5. Open http://localhost:3000 with your browser to see the app in action.

### Project Structure
- Frontend: HTML5, CSS
- Backend: Built with Next.js, leveraging its optimized routing and server-side rendering features.
- Database: Firebase Firestore and Authentication
- Font: Uses next/font to optimize and load the Geist font family by Vercel.
- AI Integration: Powered by the Groq API for AI-enhanced features.
- Development Tools: Visual Studio Code, GitHub 

### Database Structure

users (collection)
  ├── <userId> (document)
      ├── userId: "abc123"
      ├── userName: "john_doe"
      ├── email: "john.doe@gmail.com
      ├── totalPoints: 100 //from taskManager
      ├── friends (subcollection)
      │     ├── <friendUserId> (document)
      │           ├── userId: "friend123"
      │           ├── userName: "jane_doe"
      ├── friendRequests (subcollection)
            ├── <requestId> (document)
                  ├── senderId: "friend123"
                  ├── senderName: "jane_doe"
                  ├── status: "pending"
                  ├── sentAt: <timestamp>

posts (collection)
  ├── <postId> (document)
      ├── postTitle: "My First Post"
      ├── postContent: "This is a sample post content..."
      ├── userName: "john_doe"
      ├── datePublished: <timestamp>
      ├── comments (subcollection)
            ├── <commentId> (document)
                  ├── content: "This is a comment."
                  ├── userName: "jane_doe"
                  ├── date: <timestamp>

rooms (collection)
  ├── <collectionId> (document)
     ├── createdAt: <timestamp>
     ├── roomName: “Math Room”
     ├── roomTopic: “Calculus 1, limits”
     ├── messages (subcollection) 
         ├── <messageId> (document)
              ├── createdAt: <timestamp>
              ├── text: “This is a sample of a message”

tasks (collection)
  ├── <collectionId> (document)
     ├── deadline: <timestamp>
     ├── description: “this is a description sample”
     ├── status: “Completded”
     ├── priority: “high/medium/low”
     ├── title: “this is a title for the task”
     ├── userId: <userId> (document)

### Learn More
#### Next.js Resources
- Next.js Documentation - https://nextjs.org/docs
#### React Resources
- React Documentation - https://react.dev/
#### Firebase Resources
- Firebase Documentation - https://firebase.google.com/docs
- Firebase Web Setup - https://firebase.google.com/docs/web/setup
- React + Firebase Guide - https://firebase.google.com/docs/web/setup#using_firebase_with_a_framework

### Deployment
The easiest way to deploy your Next.js app is by using the Vercel Platform, created by the developers of Next.js.

For more details, refer to the Next.js Deployment Documentation.

### Contributing
We welcome contributions! Please feel free to submit a pull request or open an issue if you encounter bugs or have feature suggestions.

### License
This project is licensed under the MIT License.


