Skip to content

Commit 026a71f

Browse files
authored
Create README.md
1 parent 3a11b60 commit 026a71f

1 file changed

Lines changed: 192 additions & 0 deletions

File tree

README.md

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
2+
3+
─────────────────────────────────────────────
4+
# Campus Connect🎓
5+
─────────────────────────────────────────────
6+
7+
Campus Connect is a full-stack academic support application designed to help students access their academic information instantly. This web application provides functionalities like AI chatbot assistance, course details, attendance tracking, credit and enrollment status, as well as student comparison tools for academic performance. The project is built with Python Flask as its backend framework and uses MongoDB for data storage. The user interface leverages Tailwind CSS and vanilla JavaScript to provide a responsive and modern UX.
8+
9+
─────────────────────────────
10+
## Table of Contents 📑
11+
─────────────────────────────
12+
- **Project Overview**
13+
- **Technologies Used**
14+
- **Features**
15+
- **Installation and Setup**
16+
- **Configuration**
17+
- **File Structure**
18+
- **API Endpoints and Usage**
19+
- **Testing and Running Scripts**
20+
- **Contribution Guidelines**
21+
- **License**
22+
23+
─────────────────────────────
24+
## Project Overview
25+
─────────────────────────────
26+
Campus Connect v2 is designed to streamline the process of retrieving and analyzing academic data. The application provides an AI chatbot that can answer queries about a student’s courses, GPA, attendance, credit status, and more. It supports user authentication, including traditional email/password login and Google OAuth integration, and offers tools for both students and administrative staff.
27+
28+
─────────────────────────────
29+
## Technologies Used 💻
30+
─────────────────────────────
31+
32+
| **Technology** | **Description** |
33+
|---------------------|-------------------------------------------------------------------------------|
34+
| **Python** | Primary language used to build the Flask backend. |
35+
| **Flask** | Lightweight web framework powering the server and routing logic. |
36+
| **MongoDB** | NoSQL database for storing student and academic information. |
37+
| **pymongo** | Python library for interacting with MongoDB. |
38+
| **Flask-Bcrypt** | For secure hashing of user passwords. |
39+
| **spaCy** | Utilized for natural language processing in the Academic Chatbot module. |
40+
| **Tailwind CSS** | CSS framework used for styling the HTML templates. |
41+
| **JavaScript** | Handles client-side interactions, including dynamic updates and sorting. |
42+
| **Flask-Dance** | Used to integrate Google OAuth for user authentication. |
43+
44+
─────────────────────────────
45+
## Features 🚀
46+
─────────────────────────────
47+
48+
- **AI Chatbot Assistant:**
49+
The chatbot (implemented in modules like test2.py) uses spaCy for parsing natural language queries. It supports multiple intents such as overall performance, course details, attendance, semester-specific performance, credit status, and course load information.
50+
51+
- **User Authentication:**
52+
The application supports login and signup functionalities with encrypted password storage. It also integrates Google OAuth using Flask-Dance.
53+
54+
- **MongoDB Integration:**
55+
The system uses MongoDB Atlas to store and retrieve student academic data. Utility scripts (such as insert.py) handle data insertion.
56+
57+
- **Email Functionality:**
58+
The mail module uses SMTP to send emails. This feature is useful for account verifications, password resets, or notifications.
59+
60+
- **Dynamic Student Comparison:**
61+
Users can compare academic details between two students. Data such as GPA, credits completed, and attendance are displayed in interactive tables.
62+
63+
- **Dynamic Sorting and Filtering:**
64+
Client-side JavaScript in the static files enables the sorting of common academic details dynamically.
65+
66+
─────────────────────────────
67+
## Installation and Setup
68+
─────────────────────────────
69+
70+
### Requirements
71+
- Python 3.8+
72+
- MongoDB Atlas Account (or local MongoDB instance)
73+
- pip package installer
74+
75+
### Installation Steps
76+
1. **Clone the Repository:**
77+
Run the following command in your terminal:
78+
<code>git clone https://github.com/hari8github/campusconnect_v2.git</code>
79+
80+
2. **Create a Virtual Environment:**
81+
For example:
82+
<pre>
83+
python -m venv venv
84+
source venv/bin/activate # On Windows use: venv\Scripts\activate
85+
</pre>
86+
87+
3. **Install Dependencies:**
88+
Navigate to the project root directory and install all required packages:
89+
<pre>
90+
pip install -r requirements.txt
91+
</pre>
92+
93+
4. **Set Up Environment Variables:**
94+
Create a <code>.env</code> file in the root directory and define the following variables:
95+
<pre>
96+
MONGODB_URI=<YOUR_MONGODB_URI>
97+
EMAIL_ADDRESS=<YOUR_EMAIL_ADDRESS>
98+
EMAIL_PASSWORD=<YOUR_EMAIL_PASSWORD>
99+
GOOGLE_CLIENT_ID=<YOUR_GOOGLE_CLIENT_ID>
100+
GOOGLE_CLIENT_SECRET=<YOUR_GOOGLE_CLIENT_SECRET>
101+
</pre>
102+
103+
─────────────────────────────
104+
## Configuration ⚙️
105+
─────────────────────────────
106+
107+
- **Database:**
108+
Update the MongoDB URI in the <code>.env</code> file. The collection and database names are configured in both the main Flask application (<code>std_bot.py</code>) and the chatbot module (<code>test2.py</code>).
109+
110+
- **Email Settings:**
111+
The <code>mail.py</code> module reads email credentials from the <code>.env</code> file. Adjust these credentials as required.
112+
113+
- **Google OAuth:**
114+
Use your credentials from the Google Cloud Console to authorize users via Google login.
115+
116+
─────────────────────────────
117+
## File Structure Overview 📁
118+
─────────────────────────────
119+
120+
The project is organized as follows:
121+
122+
| **File/Folder** | **Purpose** |
123+
|----------------------|-------------------------------------------------------------------|
124+
| **std_bot.py** | Main Flask application that initializes routes, authentication, and chatbot integration. |
125+
| **test2.py** | Contains the StudentAcademicChatbot class with NLP, MongoDB connection, and multiple intent mapping. |
126+
| **insert.py** | Script to insert student data into MongoDB from a JSON file. |
127+
| **mail.py** | Module to handle email sending via SMTP with attachment support. |
128+
| **templates/** | HTML templates for various pages (login, signup, forgot password, etc.). |
129+
| **static/** | JavaScript files (e.g., test.js) and CSS assets for frontend interactions. |
130+
| **.env** | Contains environment variables used for configuration. |
131+
132+
─────────────────────────────
133+
## API Endpoints and Usage 🔌
134+
─────────────────────────────
135+
136+
Below is a summary table of commonly used API endpoints and their functionalities:
137+
138+
| **Endpoint** | **Method** | **Description** |
139+
|--------------------------------------|------------|------------------------------------------------------------------------------------------------|
140+
| <code>/</code> | GET | Loads the login page. |
141+
| <code>/login</code> | GET/POST | Handles user login with standard form data or JSON payload. |
142+
| <code>/signup</code> | GET/POST | Manages user registration (handled with a Flask Blueprint in <code>signup.py</code>). |
143+
| <code>/handle_common_details_query</code> | GET | Retrieves common academic details and returns sorted student academic information. |
144+
| <code>/reset_password</code> (template) | GET | Displays a form for resetting the user password (handled in the forgot_password.html template). |
145+
146+
**Usage Example:**
147+
To launch the application locally, use the command:
148+
<pre>
149+
flask run
150+
</pre>
151+
Then, navigate to <code>http://localhost:5000</code> in your web browser.
152+
153+
─────────────────────────────
154+
## Testing and Running Scripts 🧪
155+
─────────────────────────────
156+
157+
- **Data Insertion:**
158+
Run the <code>insert.py</code> script to populate the MongoDB database:
159+
<pre>
160+
python insert.py
161+
</pre>
162+
163+
- **Email Test:**
164+
Use the <code>mail.py</code> script to send a test email. Ensure your environment variables are set correctly.
165+
166+
- **JavaScript:**
167+
The <code>static/test.js</code> file contains client-side logic for handling AJAX calls, student comparisons, and dynamic data sorting in the common details table.
168+
169+
─────────────────────────────
170+
## Contribution Guidelines 🤝
171+
─────────────────────────────
172+
173+
Contributions to Campus Connect are welcome! Please follow these guidelines when contributing:
174+
175+
- **Fork** the repository and create a new branch for your feature or bug fix.
176+
- **Write clean, documented code** that follows the project’s style.
177+
- **Test your changes** thoroughly before submitting a pull request.
178+
- **Submit a pull request** with a clear description of your changes and the problem they solve.
179+
180+
─────────────────────────────
181+
## License 📄
182+
─────────────────────────────
183+
184+
This project is licensed under an open-source license. Please check the LICENSE file in the repository for more details.
185+
186+
─────────────────────────────
187+
## Final Notes
188+
─────────────────────────────
189+
190+
Campus Connect v2 integrates modern web practices with robust backend functionality to provide an effective academic support tool. Its use of natural language processing for interpreting multiple academic query intents, along with dynamic data presentation on the front end, makes it a powerful resource for both students and administrators. Enjoy exploring and contributing to the project!
191+
192+
Happy Coding! 🚀

0 commit comments

Comments
 (0)