A modern, secure note-taking application built with React and Firebase
A full-featured notes management application with Firebase authentication, real-time synchronization, and a clean, intuitive interface. Create, edit, search, and organize your notes with ease while enjoying secure user authentication and cloud storage.
- Full CRUD Operations: Create, read, update, and delete notes
- Firebase Authentication: Secure user registration and login system
- Real-time Synchronization: Instant updates across devices using Firestore
- Protected Routes: Authentication-required access to notes functionality
- Search Functionality: Search notes by title or content
- Redux State Management: Efficient state management with Redux Toolkit and persistence
- Responsive Design: Built with Bootstrap for mobile-friendly interface
- Form Validation: Client-side validation for note titles and content
- User-friendly Alerts: SweetAlert2 integration for elegant notifications
- React
^18.2.0- UI library - React Router DOM
^6.3.0- Client-side routing - React Bootstrap Icons
^1.8.4- Icon library
- Redux Toolkit
^1.8.6- State management - React Redux
^8.0.4- React bindings for Redux - Redux Persist
^6.0.0- Persist and rehydrate Redux store
- Firebase
^10.9.0- Authentication and Firestore database - Axios
^1.6.8- HTTP client
- React Scripts
5.0.1- Create React App tooling - json-server - Mock API server (optional development tool)
- Bootstrap
5.2.0- CSS framework (loaded via CDN) - SweetAlert2
^11.10.7- Beautiful alerts
notes-manager-react/
βββ public/
β βββ index.html # HTML template
βββ src/
β βββ api/ # API service layers
β β βββ auth.js # Firebase authentication API
β β βββ note-api.js # Firestore notes API
β βββ assets/ # Static assets (images, etc.)
β β βββ images/
β βββ components/ # Reusable UI components
β β βββ ButtonPrimary/
β β βββ FieldError/
β β βββ Header/
β β βββ Input/
β β βββ Logo/
β β βββ NoteForm/
β β βββ SearchBar/
β β βββ TextCard/
β βββ containers/ # Container components
β β βββ NoteList/
β βββ hoc/ # Higher-order components
β β βββ withAuthRequired.jsx # Authentication guard HOC
β βββ layouts/ # Layout components
β β βββ AuthLayout.jsx
β βββ pages/ # Page components
β β βββ Note/ # Individual note view/edit
β β βββ NoteBrowse/ # Notes list view
β β βββ NoteCreate/ # Create new note
β β βββ PageNotFound/ # 404 page
β β βββ Signin/ # Login page
β β βββ Signup/ # Registration page
β βββ store/ # Redux store configuration
β β βββ auth/ # Authentication slice
β β βββ notes/ # Notes slice
β β βββ index.js # Store setup with persistence
β βββ utils/ # Utility functions
β β βββ firebase.js # Firebase initialization
β β βββ sweet-alert.js # Alert helpers
β β βββ validator.js # Form validation
β βββ App.jsx # Main app component with routing
β βββ config.js # Firebase configuration
β βββ index.js # Application entry point
βββ .gitignore
βββ db.json # Mock database for development
βββ jsconfig.json # JavaScript configuration
βββ package.json # Dependencies and scripts
βββ README.md # Project documentation
- Node.js (v14 or higher)
- npm or yarn
- Firebase account with a configured project
- A modern web browser
Create a .env file in the root directory with your Firebase configuration:
REACT_APP_API_KEY=your_firebase_api_key
REACT_APP_AUTH_DOMAIN=your_project_id.firebaseapp.com
REACT_APP_PROJECT_ID=your_project_id
REACT_APP_STORAGE_BUCKET=your_project_id.appspot.com
REACT_APP_MESSAGING_SENDER_ID=your_messaging_sender_id
REACT_APP_ID=your_app_idImportant: Never commit your .env file to version control. It's already included in .gitignore.
- Create a new Firebase project at Firebase Console
- Enable Authentication with Email/Password provider
- Create a Firestore Database
- Configure Firestore security rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /notes/{noteId} {
allow read, write: if request.auth != null;
}
}
}- Get your Firebase configuration from Project Settings
- Clone the repository
git clone https://github.com/favio102/notes-manager-react.git
cd notes-manager-react- Install dependencies
npm install- Configure environment variables
Create a .env file and add your Firebase credentials (see Environment Variables section above)
- Start the development server
npm startThe app will open at http://localhost:3000
# Build for production
npm run build
# Run tests
npm test
# Run mock JSON server (optional, for development)
npm run dev-serverTest Account: For testing purposes, you can use:
- Email:
test1@gmail.com - Password:
test1test1
- Sign Up: Navigate to
/signupto create a new account - Sign In: Navigate to
/signinto log into an existing account
- View Notes: After logging in, you'll see all your notes on the home page
- Create Note: Click the
+button to create a new note - Edit Note: Click on any note to view and edit it
- Delete Note: Use the trash icon to delete a note (confirmation required)
- Search Notes: Use the search bar to filter notes by title or content
- Title: 3-20 characters required
- Content: Minimum 3 characters required
Contains Firebase configuration loaded from environment variables.
Redux store configuration with persistence settings. Currently persists authentication state to localStorage.
Enables absolute imports from the src directory.
- Change validation rules: Edit
src/components/NoteForm/NoteForm.jsx(VALIDATOR object) - Adjust persistence: Modify the
whitelistinsrc/store/index.js - Update routes: Edit the Routes component in
src/index.js(lines 25-34) - Customize theme: Update Bootstrap classes or add custom styles
- Protected routes requiring authentication
- Firebase Authentication with email/password
- Firestore security rules enforcing authenticated access
- Client-side form validation
- Password confirmation on signup
We welcome contributions from the community! To ensure a smooth process, please follow these basic steps:
- Open an Issue: For bug reports or feature suggestions, please first open an Issue to discuss your proposed change or problem.
- Fork the Repository: Create your own fork of the project.
- Implement Fixes: Create a new branch (
git checkout -b feature/your-feature-nameorgit checkout -b fix/issue-number) and implement your changes. - Submit a Pull Request (PR): Target the main branch with your pull request, ensuring your branch is up-to-date and all tests pass.
This project is open source and available under the MIT License.
- The application requires an active internet connection for Firebase services
- Strict mode is disabled to prevent double rendering with useEffect
For issues, questions, or contributions, please visit the GitHub repository.
Built with β€οΈ using React and Firebase
