Skip to content

[DOCS] Enhance Clarity of Project Structure and API Documentation #29

@Vedantu2005

Description

@Vedantu2005

The current README.md is excellent and very detailed. This issue proposes two small enhancements to further improve clarity for new backend contributors and reduce their onboarding time.

  1. Expand Project Structure Diagram

Goal: To help developers quickly navigate the backend codebase.

Observation: The current Project Structure diagram provides a good high-level overview but omits the specific locations for key backend files like API routes and database models.

Suggestion: Please expand the diagram to include these important directories. This will give contributors an immediate map of where to find and add backend logic.

Example of enhanced structure:

classroom-platform/
├── app/
│ ├── api/ # API routes (e.g., /api/auth/login)
│ ├── dashboard/
│ └── ...
├── components/
├── lib/
│ ├── models/ # Mongoose schemas/models
│ └── utils/ # Utility functions
...
2. Show Login API Response

Goal: To clarify the authentication flow for API consumers.

Observation: The API Documentation provides a great curl example for the login endpoint but does not show what a successful response looks like. This makes it slightly unclear how the session is established (e.g., via a cookie) and what user data is returned.

Suggestion: After the curl example for POST /api/auth/login, please add an example of the JSON response body for a successful login.

Example of a successful response:

JSON

// Successful login response (sets a secure HTTP-only cookie)
{
"message": "Logged in successfully",
"user": {
"id": "60d0fe4f5311236168a109ca",
"name": "John Doe",
"email": "[email protected]",
"role": "student"
}
}
Implementing these two changes will make the documentation even more robust and will significantly help new contributors understand the project's backend architecture and API behavior.

Tools

Metadata

Metadata

Assignees

Labels

gssoc25GirlScript Summer Of Code 2025level1basic level issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions