The Note-Taker App is a full-featured note-taking application built using the MERN stack (MongoDB, Express, React, Node.js). The application allows users to sign up, log in, create, edit, delete, and view notes. Notes can be written in Markdown, allowing for rich text formatting. The application also includes a user profile page where users can update their profile picture.
- User authentication (login and signup)
- Dashboard displaying all user notes
- Create, edit, and delete notes
- Markdown support for writing notes
- User profile management
- Logging with Pino
- Backend testing with Mocha/Chai
- Frontend testing with Jest
- Code quality analysis with SonarQube
- Frontend: React, React Router, Bootstrap
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens)
- Logging: Pino
- Testing: Mocha, Chai (backend); Jest (frontend)
- Code Quality: SonarQube
- Node.js (>= 14.x)
- MongoDB
-
Clone the repository
git clone https://github.com/yourusername/note-taker-app.git cd note-taker-app -
Backend Setup
cd backend npm install -
Frontend Setup
cd ../frontend npm install -
Environment Variables Create a
.development.envfile in thebackenddirectory with the following variables:PORT=5000 MONGO_URI=mongodb://localhost:27017/note-taker SECRET=your_jwt_secret
-
Run the Application
- Start the backend server
cd backend npm start - Start the frontend development server
cd ../frontend npm run dev
- Start the backend server
- Run Mocha/Chai tests
cd backend npm test
- Run Jest tests
cd frontend npm test
server.js: Entry point of the backend applicationroutes/: Contains all the routes for the applicationmodels/: Contains the Mongoose modelscontrollers/: Contains the controller logic for the routesmiddlewares/: Contains middleware functions
src/: Contains all the React components and pagessrc/components/: Reusable React componentssrc/screens/: Page components corresponding to different routessrc/context/: Context API for state managementsrc/hooks/: Custom hookssrc/constants/: Constants used across the applicationsrc/test/: Jest tests for the frontend
The application uses Pino for logging. Logs are written to files based on the day, and the log configuration can be found in backend/logger.js.
The project uses SonarQube for static code analysis. Ensure that SonarQube is running and configured properly to analyze the codebase.
Contributions are welcome! Please create a pull request or open an issue for any feature requests, bug reports, or general improvements.
This project is licensed under the MIT License.