A comprehensive notes sharing platform for students and teachers, built with React.js frontend and Express.js backend with MongoDB database.
- User Authentication: Register, login, password reset
- Role-based Access: Student, Teacher, and Admin roles
- Notes Management: Upload, view, download, rate and comment on notes
- Subject Organization: Browse notes by subjects and categories
- File Upload: Support for multiple file formats
- Search & Filter: Advanced search with filters
- User Profiles: Personal profiles with uploaded notes
- Responsive Design: Mobile-friendly interface with Tailwind CSS
- React 18
- React Router v6
- Tailwind CSS
- React Icons
- Axios
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT Authentication
- Bcrypt for password hashing
- Multer for file uploads
- Express Validator
Before running this application, make sure you have the following installed:
- Node.js (v16 or higher)
- MongoDB (locally or MongoDB Atlas)
- npm or yarn
git clone <repository-url>
cd Notes-Finder
cd frontend
npm install
cd backend
npm install
cd ..
Create environment files from examples:
# Root environment
cp .env.example .env
# Frontend environment
cp frontend/.env.example frontend/.env
Update the .env
file with your configuration:
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/notes_finder
JWT_SECRET=your_super_secure_jwt_secret_32_chars_minimum
JWT_EXPIRE=30d
UPLOAD_PATH=./uploads
MAX_FILE_SIZE=5000000
FRONTEND_URL=http://localhost:3000
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
- Never commit
.env
files to git - Use strong, random JWT_SECRET (32+ characters)
- For production, use environment-specific values
Make sure MongoDB is running on your system:
# If using local MongoDB
mongod
# Or if using MongoDB as a service
sudo systemctl start mongod
To add sample data to your database:
cd backend
node seeder.js
This will create sample users, subjects, and notes. Login credentials:
- Teacher: john.smith@university.edu / password123
- Student: jane.doe@student.edu / password123
- Admin: admin@notesfinder.com / admin123
npm run dev
Backend (Terminal 1):
cd backend
npm run dev
Frontend (Terminal 2):
cd frontend
npm start
The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
Notes-Finder/
βββ frontend/ # React frontend application
β βββ public/ # Public assets
β βββ src/ # Frontend source code
β β βββ components/ # React components
β β βββ services/ # API services
β β βββ App.js # Main App component
β β βββ index.js # Entry point
β βββ .env # Frontend environment variables
β βββ package.json # Frontend dependencies
β βββ README.md # Frontend documentation
βββ backend/ # Express.js backend application
β βββ controllers/ # Route controllers
β βββ middleware/ # Custom middleware
β βββ models/ # MongoDB models
β βββ routes/ # API routes
β βββ .env # Backend environment variables
β βββ seeder.js # Database seeder
β βββ server.js # Entry point
β βββ package.json # Backend dependencies
βββ .env # Main environment variables
βββ README.md # Main documentation
POST /api/auth/register
- Register new userPOST /api/auth/login
- Login userGET /api/auth/me
- Get current userPUT /api/auth/profile
- Update profilePUT /api/auth/change-password
- Change password
GET /api/notes
- Get all notesGET /api/notes/:id
- Get single notePOST /api/notes
- Create new notePUT /api/notes/:id
- Update noteDELETE /api/notes/:id
- Delete noteGET /api/notes/featured
- Get featured notes
GET /api/subjects
- Get all subjectsGET /api/subjects/:id
- Get single subjectPOST /api/subjects
- Create subject (Teacher/Admin)PUT /api/subjects/:id
- Update subject (Teacher/Admin)GET /api/subjects/:id/notes
- Get notes for subject
GET /api/users/:id
- Get user profileGET /api/users/:id/notes
- Get user's notes
The application uses JWT-based authentication with role-based access control:
- Public: View notes and subjects
- Students: Upload notes, comment, rate
- Teachers: All student privileges + create subjects
- Admins: All privileges + user management
- Personal information (name, email, university, course)
- Authentication (password, role)
- Profile data (bio, avatar, reputation)
- Relationships (uploaded notes, saved notes)
- Subject details (name, code, department)
- Academic info (credits, semester, year)
- Metadata (difficulty, tags, prerequisites)
- Content (title, description, files)
- Academic context (subject, semester, type)
- Interactions (ratings, comments, likes)
- Metadata (views, downloads, tags)
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
-
MongoDB Connection Error
- Ensure MongoDB is running
- Check the MONGODB_URI in .env file
-
Port Already in Use
- Change the PORT in .env file
- Kill the process using the port:
lsof -ti:5000 | xargs kill
-
Module Not Found Errors
- Delete node_modules and package-lock.json
- Run
npm install
again
Make sure all required environment variables are set in your .env
file:
MONGODB_URI
- MongoDB connection stringJWT_SECRET
- Secret key for JWT tokensPORT
- Backend server port (default: 5000)
If you encounter any issues or have questions, please:
- Check the troubleshooting section above
- Search existing issues in the repository
- Create a new issue with detailed information
Happy Coding! π