This project implements a backend API for storing writing sessions and keystroke data as part of the Vi-Notes authenticity verification system. The system now uses MongoDB for persistent data storage.
- Create writing sessions
- Retrieve stored sessions
- Delete sessions
- Store keystroke data (typing patterns)
- Persistent storage using MongoDB
- REST API using Express.js
- Node.js
- Express.js
- MongoDB
- Mongoose
vi-notes/ │── app.js │── package.json │── .env │── README.md
Returns API status and available endpoints.
Response: { "message": "Vi-Notes Backend Running" }
Stores a new writing session in MongoDB.
Example Request: { "content": "Hello world", "keystrokes": [ { "key": "H", "time": 1 }, { "key": "e", "time": 2 } ] }
Response: { "message": "Session saved", "data": { "_id": "mongodb_id", "content": "Hello world", "keystrokes": [...] } }
Retrieves all stored sessions from MongoDB.
Response: [ { "_id": "mongodb_id", "content": "Hello world", "keystrokes": [...] } ]
Deletes a session by MongoDB ID.
Response: { "message": "Session deleted" }
-
Install dependencies
npm install -
Create
.envfile
Add:
MONGO_URI=your_mongodb_connection_string
PORT=3000
-
Start server
node app.js -
Server runs on
http://localhost:3000
The backend is deployed on Render and uses environment variables for secure MongoDB connection.
- Add authentication (login/signup)
- Implement validation for input data
- Detect pasted text patterns
- Improve keystroke behavior analysis
This project focuses on building a scalable backend system for handling writing session data and keystroke tracking with database integration as part of the Vi-Notes platform.