Skip to content

Conversation

@sanjana2505006
Copy link
Contributor

This makes the project more beginner-friendly, clear to set up, and ready for open-source collaboration

Expanded README with detailed features, installation instructions, API documentation, and security features.
README.md Outdated
Comment on lines 10 to 19
## 🎯 Features

- 🔐 **Password Security** - Bcrypt hashing (10 salt rounds)
-**Input Validation** - Joi validation for emails, passwords, and user data
- 🔑 **JWT Authentication** - Secure token-based auth
- 📦 **MongoDB Integration** - Mongoose ORM with pagination
- 🛡️ **CORS Protection** - Cross-origin request handling
- 📝 **Request Logging** - Morgan HTTP request logger
- 📧 **Email Support** - SendGrid integration ready
- 🚀 **Production Ready** - Error handling and security best practices
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove emojis

@@ -1,14 +1,359 @@
# root-template-express
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i prefer the earlier heading

README.md Outdated
Comment on lines 21 to 29
## 📸 Demo

Here's how the API works:

```
POST /api/users - Create User
POST /api/auth/login - Login
GET /api/users - List Users (requires token)
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is needed. Maybe we can have autogenerated API docs

README.md Outdated
```

## 🛠️ Tech Stack

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is needed. Maybe we can have autogenerated API docs

README.md Outdated

```bash
# Clone the repository
git clone https://github.com/sanjana2505006/template-express-mongodb.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong url?

README.md Outdated
Comment on lines 107 to 128
## 📚 API Documentation

### Authentication Endpoints

#### Login
```http
POST /api/auth/login
Content-Type: application/json
{
"email": "[email protected]",
"password": "MyPass@123",
"type": "root"
}
```

**Response:**
```json
{
"status": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for lines 107 to 202. We should not add API docs here

README.md Outdated
Comment on lines 202 to 230
## 📁 Project Structure

```
.
├── controllers/ # Business logic for routes
│ ├── auth.js # Authentication logic
│ ├── user.js # User management logic
│ └── util.js # Utility functions
├── models/ # Mongoose schemas
│ └── user.js # User schema
├── routes/ # API route definitions
│ ├── index.js # Main router
│ ├── auth.js # Auth routes
│ ├── user.js # User routes
│ └── util.js # Utility routes
├── middlewares/ # Custom middleware
│ ├── validateToken.js # JWT validation
│ └── allowRoot.js # Role-based access
├── utils/ # Utility functions
│ ├── validators.js # Joi validation schemas
│ ├── generate.js # Key/secret generation
│ ├── asyncForEach.js # Async helpers
│ ├── mkdirSync.js # Directory creation
│ └── unlinkSync.js # File deletion
├── data/ # Test data
│ └── test.http # HTTP client requests
├── server.js # Main server file
├── package.json # Dependencies
└── README.md # This file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed, maybe we can have folder level only

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay sure!

@sanjana2505006
Copy link
Contributor Author

Hi @krushndayshmookh,
I have updated the README as requested.
Please review and let me know if any other changes are needed.

@krushndayshmookh krushndayshmookh merged commit e21cd65 into root-kings:master Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants