A full-stack password manager application built with React, Node.js, and MongoDB.
password_manager_mongodb/
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── components/
│ │ │ ├── Manager.jsx # Main password manager component
│ │ │ └── Navbar.jsx # Navigation component
│ │ ├── App.jsx # Main App component
│ │ └── main.jsx # React entry point
│ ├── package.json # Frontend dependencies
│ ├── vite.config.js # Vite configuration
│ └── index.html # HTML template
├── backend/ # Node.js backend server
│ ├── server.js # Express server with MongoDB integration
│ ├── package.json # Backend dependencies
│ └── .env # Environment variables
└── README.md # This file
- ✅ Add Passwords: Store website, username, and password combinations
- ✅ View Passwords: Display all saved passwords in a clean table
- ✅ Edit Passwords: Modify existing password entries
- ✅ Delete Passwords: Remove unwanted password entries
- ✅ Copy to Clipboard: One-click password copying
- ✅ Show/Hide Password: Toggle password visibility
- ✅ Responsive Design: Works on desktop and mobile devices
- ✅ Toast Notifications: User feedback for all actions
- ✅ MongoDB Integration: Persistent data storage
- React - UI framework
- Vite - Build tool and dev server
- Tailwind CSS - Styling framework
- React Toastify - Toast notifications
- Lord Icon - Animated icons
- Node.js - Runtime environment
- Express - Web framework
- MongoDB - Database
- CORS - Cross-origin resource sharing
- dotenv - Environment variable management
- Node.js (v14 or higher)
- MongoDB (local installation or MongoDB Atlas)
-
Clone the repository
git clone <repository-url> cd password_manager_mongodb
-
Install Backend Dependencies
cd backend npm install -
Install Frontend Dependencies
cd ../frontend npm install -
Configure Environment Variables Create a
.envfile in thebackenddirectory:MONGO_URI=mongodb://localhost:27017
For MongoDB Atlas, use your connection string:
MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net
-
Start MongoDB
- Local MongoDB: Ensure MongoDB service is running
- MongoDB Atlas: Ensure your cluster is running and accessible
cd backend
node server.jsThe backend will start on http://localhost:3000
cd frontend
npm run devThe frontend will start on http://localhost:5173
Open your browser and navigate to http://localhost:5173
- GET / - Retrieve all passwords
- POST / - Save a new password
- DELETE / - Delete a password by ID
- Password encryption/hashing
- User authentication and authorization
- HTTPS/SSL encryption
- Input validation and sanitization
- Rate limiting
- Security headers
- Add a Password: Fill in the website, username, and password fields, then click "Add"
- View Passwords: All saved passwords are displayed in the table below the form
- Copy Password: Click the copy icon next to any password to copy it to clipboard
- Edit Password: Click the "Edit" button to modify an existing entry
- Delete Password: Click the "Delete" button to remove an entry
- Show/Hide Password: Click the "Show" button to toggle password visibility in the form
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
-
Connection Refused Error
- Ensure MongoDB is running
- Check the MONGO_URI in your .env file
- Verify the backend server is running on port 3000
-
CORS Issues
- Ensure the backend CORS middleware is properly configured
- Check that frontend is making requests to the correct backend URL
-
Dependencies Issues
- Delete
node_modulesandpackage-lock.json - Run
npm installagain in both frontend and backend directories
- Delete
If you encounter any issues or have questions, please create an issue in the repository.