This repository contains the backend code for the Anonymous Messaging App anon-notes, a web application that allows users to create threads with titles and receive anonymous replies.
- User registration and authentication
- Create threads with titles
- Receive anonymous messages for threads > Responses
- Favourite and Archive Replies
- Share Replies to Socials as image or plain text.
- Light and Dark mode support for the UI (handled in the frontend)
- Notifications via Firebase
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JSON Web Tokens (JWT)
- Notifications: Firebase
- Validation: express-validator
- Programming Language: TypeScript
- Node.js (v20 or later)
- npm or yarn
- MongoDB (local or cloud instance)
- Firebase project (not necessary)
-
Clone the repository:
git clone [https://github.com/your-username/anonymous-messaging-backend.git](https://github.com/eimaam/anon-notes-api.git) cd anon-notes-api -
Install dependencies:
npm install
or
yarn install
Create a .env file in the root directory and add the env as listed in .env.example file
Start the development server:
npm run devor
yarn devThe server will start on http://localhost:3000 (Here the PORT you served via `env).
{
"success": true,
"message": "User registered successfully",
"data": {
"id": "60d21b4667d0d8992e610c85",
"username": "john_doe",
"email": "john@example.com"
}
}