b2b12a419780c328485ae1418b44cebe3ea1e362
EduCat - AI-Powered Note Revision Platform
EduCat is a modern web application that helps students improve their study notes using AI. Built with Node.js, Express, and EJS, it features file upload capabilities, AI-powered note revision, and an interactive chatbot.
Features
- <EFBFBD> User Authentication: Secure login and registration system
- <EFBFBD>📁 File Upload: Upload notes in various formats (PDF, DOC, TXT, images)
- 🤖 AI-Powered Revision: Automatically improve, summarize, and generate study questions
- 💬 Interactive Chatbot: Chat with AI for study assistance
- 📊 Dashboard: Manage and track your uploaded notes
- 🎨 Modern UI: Beautiful, responsive design with Bootstrap
- 🔗 Flowise Integration: Connected to Flowise at https://flowise.suika.cc/
Technologies Used
- Backend: Node.js, Express.js
- Frontend: EJS templates, Bootstrap 5, Font Awesome
- Authentication: bcrypt for password hashing, express-session
- File Handling: Multer for file uploads
- AI Integration: Flowise API integration
- Session Management: Express Session with flash messages
- Styling: Custom CSS with Bootstrap
Installation
-
Clone the repository:
git clone <repository-url> cd EduCat -
Install dependencies:
npm install -
Configure environment variables:
- Copy
.env.exampleto.env(if exists) or create a new.envfile - Update the following variables:
PORT=3000 SESSION_SECRET=your-secret-key-here FLOWISE_API_URL=https://flowise.suika.cc/api/v1/prediction FLOWISE_CHATFLOW_ID=your-chatflow-id-here
- Copy
-
Set up your Flowise chatflow:
- Go to https://flowise.suika.cc/
- Create or find your chatflow
- Copy the chatflow ID and update it in the
.envfile
-
Start the application:
npm startFor development with auto-reload:
npm run dev -
Access the application:
- Open your browser and navigate to
http://localhost:3000
- Open your browser and navigate to
Usage
Authentication
- Visit
http://localhost:3000 - Click "Login" or "Register" to create an account
- Use demo accounts:
- Admin: username
admin, passwordpassword - Student: username
student, passwordpassword
- Admin: username
Uploading Notes
- After logging in, click "Upload Notes" in the navigation
- Drag and drop your file or click to browse
- Select a file (PDF, DOC, TXT, or image)
- Click "Upload & Process"
Revising Notes
- Go to your Dashboard to see uploaded files
- Click "Revise with AI" on any file
- Choose revision type:
- Improve & Enhance: Makes notes more comprehensive
- Summarize: Creates concise summaries
- Generate Questions: Creates study questions
- Click "Revise with AI" to process
Using the Chatbot
- Navigate to the "Chat" section
- Type your questions about study materials or academic topics
- Get instant AI-powered responses
Project Structure
EduCat/
├── public/
│ ├── css/
│ │ └── style.css
│ ├── js/
│ │ └── main.js
│ └── images/
│ └── logo.png
├── views/
│ ├── partials/
│ │ ├── header.ejs
│ │ └── footer.ejs
│ ├── index.ejs
│ ├── upload.ejs
│ ├── revise.ejs
│ ├── chat.ejs
│ ├── dashboard.ejs
│ └── error.ejs
├── uploads/
├── server.js
├── package.json
└── .env
API Endpoints
GET /- Home pageGET /upload- File upload pagePOST /upload- Handle file uploadsGET /revise/:fileId- Note revision pagePOST /api/revise- AI revision endpointGET /chat- Chat interfacePOST /api/chat- Chat API endpointGET /dashboard- User dashboard
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
PORT |
Server port | 3000 |
SESSION_SECRET |
Session encryption key | educat-secret-key |
FLOWISE_API_URL |
Flowise API base URL | https://flowise.suika.cc/api/v1/prediction |
FLOWISE_CHATFLOW_ID |
Your Flowise chatflow ID | Required |
File Upload Settings
- Maximum file size: 10MB
- Allowed formats: PDF, DOC, DOCX, TXT, JPG, JPEG, PNG, GIF
- Upload directory:
uploads/
Customization
Styling
- Edit
public/css/style.cssto customize the appearance - The design uses Bootstrap 5 with custom CSS variables
AI Integration
- Modify the Flowise API calls in
server.js - Update prompts in the
/api/reviseendpoint - Customize chat responses in the
/api/chatendpoint
Adding Features
- Add new routes in
server.js - Create corresponding EJS templates in
views/ - Add client-side JavaScript in
public/js/main.js
Troubleshooting
Common Issues
-
File upload fails:
- Check file size (max 10MB)
- Verify file format is supported
- Ensure
uploads/directory exists
-
AI responses don't work:
- Verify Flowise API URL is correct
- Check if your chatflow ID is valid
- Ensure Flowise server is accessible
-
Session issues:
- Verify SESSION_SECRET is set
- Check if sessions are properly configured
Development
To run in development mode with auto-reload:
npm install -g nodemon
npm run dev
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
This project is licensed under the MIT License.
Support
For support or questions, please contact the EduCat development team.
Made with ❤️ by the EduCat Team
Description
Languages
EJS
57.7%
JavaScript
36.1%
CSS
6.2%