Skip to content

KeepDesk is a full-stack note-taking app built with React, Node.js, Express, and MongoDB. It features JWT auth, session-based drafts, and Dockerized deployment on Azure App Services. Includes CI/CD via GitHub Actions and API testing with Keploy.

Notifications You must be signed in to change notification settings

dhingralakshya/KeepDesk

Repository files navigation

📝 KeepDesk - Notes Management Web Application

KeepDesk is a full-stack web application designed to help users manage personal notes with features like user registration, authentication, and full CRUD operations for notes. It includes a React-based frontend, Node.js + Express backend, and MongoDB for data storage.


⚙️ Features

  • User registration and secure login with hashed passwords
  • JWT-based authentication for secure API access
  • Create, read, update, and delete notes
  • User-specific data storage using MongoDB
  • React frontend for seamless user experience
  • Docker support for easy deployment

🛠️ Tech Stack

Layer Technology
Frontend React.js
Backend Node.js, Express.js
Database MongoDB / MongoDB Atlas
Auth JWT, bcrypt
Tools Docker, dotenv, cors

🚀 Getting Started

📁 Clone the Repository

git clone https://github.com/dhingralakshya/KeepDesk.git
cd KeepDesk

Environment Variable configuration

Add the following envs:

port=4000
JWT_SECRET=your_jwt_secret
server=mongodb://localhost:27017/keepdesk

For MongoDB Atlas (cloud), use:

server=mongodb+srv://<username>:<password>@cluster.mongodb.net/keepdesk?retryWrites=true&w=majority

How to Run the Server

Option 1: Using Docker (Recommended)

  1. Clone the repository
git clone https://github.com/dhingralakshya/KeepDesk.git
cd KeepDesk
  1. Run with Docker Compose
docker-compose up --build

Option 2: Manual Setup

  1. Clone and setup backend
git clone https://github.com/dhingralakshya/KeepDesk.git
cd KeepDesk/backend
npm install
  1. Start backend server using
node server.js
  1. Setup frontend (in a new terminal)
cd KeepDesk
npm install
  1. Start the frontend
npm start

API Documentation

All APIs are protected (except register and login). Use a valid JWT in the Authorization header:

Authorization: Bearer <your_token>
Method Endpoint Description Auth Required
POST /register Register a new user ❌ No
POST /login Login and get JWT token ❌ No
GET / Get all notes of the logged-in user ✅ Yes
POST / Create a new note ✅ Yes
PATCH /update/:id Update a specific note by ID ✅ Yes
POST /delete Delete a specific note (pass ID in body) ✅ Yes

Testing & Coverage

How to Run Tests

npm test
  • Uses Jest, Supertest, and mongodb-memory-server.
  • Covers unit, integration, and API tests.
Metric Coverage
Statements 76.82%
Branches 50.00%
Functions 88.88%
Lines 82.66%

✅ Goal of 70%+ coverage achieved!

Test Coverage

🧪 Keploy API Test Report

Keploy Test Report

About

KeepDesk is a full-stack note-taking app built with React, Node.js, Express, and MongoDB. It features JWT auth, session-based drafts, and Dockerized deployment on Azure App Services. Includes CI/CD via GitHub Actions and API testing with Keploy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published