This project includes authentication, community creation, and member management functionalities. It uses Node.js with Express for the backend, MongoDB as the database, and Postman for testing API endpoints.
- Authentication: Sign up and sign in using JWT for token-based authentication.
- Community: Create, retrieve, and manage communities.
- Member Management: Add and remove members from communities based on user roles.
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JSON Web Tokens (JWT)
- Endpoint:
POST /auth/signup
- Request Payload:
name
: User's nameemail
: User's emailpassword
: User's password
- Endpoint:
POST /auth/signin
- Request Payload:
email
: User's emailpassword
: User's password
- Endpoint:
GET /auth/me
- Request Headers:
Authorization
: Bearer token
- Endpoint:
POST /community
- Request Payload:
name
: Name of the community
- Endpoint:
GET /community
- Endpoint:
POST /member
- Request Headers:
Authorization
: Bearer token
- Request Payload:
community
: ID of the communityuser
: ID of the userrole
: ID of the role
- Endpoint:
DELETE /member/:id
- Request Headers:
Authorization
: Bearer token
- Path Variables:
id
: ID of the member to be removed
Make sure you have the following installed on your machine:
- Clone the repository:
git clone https://github.com/yourusername/your-repo.git
cd your-repo
npm install